aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2016-04-18 19:31:17 +0200
committerMichal Labedzki <michal.labedzki@tieto.com>2016-05-20 14:53:13 +0000
commit9cbad0207eda99f476393e1628cf9562b3730132 (patch)
tree9e383dc526b795298af307c0aeba51707d0fd3b9 /ui
parent7a7d790e7b42d133fceb1a1cf3ef3e3488dde84d (diff)
Qt/Bluetooth: Allow to use Enter button for jump to frames
Implement keyPressEvent and do nothing... However it "takes focus" from button box and jump to frame that some items in tree widget point. Change-Id: Ib08f1588f20bce66fa945bf952770600c625233c Reviewed-on: https://code.wireshark.org/review/15455 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/bluetooth_att_server_attributes_dialog.cpp7
-rw-r--r--ui/qt/bluetooth_att_server_attributes_dialog.h1
-rw-r--r--ui/qt/bluetooth_devices_dialog.cpp7
-rw-r--r--ui/qt/bluetooth_devices_dialog.h1
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.cpp7
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.h1
6 files changed, 24 insertions, 0 deletions
diff --git a/ui/qt/bluetooth_att_server_attributes_dialog.cpp b/ui/qt/bluetooth_att_server_attributes_dialog.cpp
index 530efe67d0..c427895e52 100644
--- a/ui/qt/bluetooth_att_server_attributes_dialog.cpp
+++ b/ui/qt/bluetooth_att_server_attributes_dialog.cpp
@@ -127,6 +127,13 @@ void BluetoothAttServerAttributesDialog::changeEvent(QEvent *event)
}
+void BluetoothAttServerAttributesDialog::keyPressEvent(QKeyEvent *)
+{
+/* NOTE: Do nothing, but in real it "takes focus" from button_box so allow user
+ * to use Enter button to jump to frame from tree widget */
+}
+
+
void BluetoothAttServerAttributesDialog::tableContextMenu(const QPoint &pos)
{
context_menu_.exec(ui->tableTreeWidget->viewport()->mapToGlobal(pos));
diff --git a/ui/qt/bluetooth_att_server_attributes_dialog.h b/ui/qt/bluetooth_att_server_attributes_dialog.h
index 46835308fd..292bda217b 100644
--- a/ui/qt/bluetooth_att_server_attributes_dialog.h
+++ b/ui/qt/bluetooth_att_server_attributes_dialog.h
@@ -64,6 +64,7 @@ signals:
void goToPacket(int packet_num);
protected:
+ void keyPressEvent(QKeyEvent *event);
protected slots:
void changeEvent(QEvent* event);
diff --git a/ui/qt/bluetooth_devices_dialog.cpp b/ui/qt/bluetooth_devices_dialog.cpp
index ba6ff1544a..9523105de0 100644
--- a/ui/qt/bluetooth_devices_dialog.cpp
+++ b/ui/qt/bluetooth_devices_dialog.cpp
@@ -140,6 +140,13 @@ void BluetoothDevicesDialog::changeEvent(QEvent *event)
}
+void BluetoothDevicesDialog::keyPressEvent(QKeyEvent *)
+{
+/* NOTE: Do nothing, but in real it "takes focus" from button_box so allow user
+ * to use Enter button to jump to frame from tree widget */
+}
+
+
void BluetoothDevicesDialog::tableContextMenu(const QPoint &pos)
{
context_menu_.exec(ui->tableTreeWidget->viewport()->mapToGlobal(pos));
diff --git a/ui/qt/bluetooth_devices_dialog.h b/ui/qt/bluetooth_devices_dialog.h
index ddfe732d18..98691dface 100644
--- a/ui/qt/bluetooth_devices_dialog.h
+++ b/ui/qt/bluetooth_devices_dialog.h
@@ -63,6 +63,7 @@ signals:
void goToPacket(int packet_num);
protected:
+ void keyPressEvent(QKeyEvent *event);
protected slots:
void changeEvent(QEvent* event);
diff --git a/ui/qt/bluetooth_hci_summary_dialog.cpp b/ui/qt/bluetooth_hci_summary_dialog.cpp
index fffe12a449..89570c909c 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.cpp
+++ b/ui/qt/bluetooth_hci_summary_dialog.cpp
@@ -180,6 +180,13 @@ void BluetoothHciSummaryDialog::changeEvent(QEvent *event)
}
+void BluetoothHciSummaryDialog::keyPressEvent(QKeyEvent *)
+{
+/* NOTE: Do nothing, but in real it "takes focus" from button_box so allow user
+ * to use Enter button to jump to frame from tree widget */
+}
+
+
void BluetoothHciSummaryDialog::tableContextMenu(const QPoint &pos)
{
context_menu_.exec(ui->tableTreeWidget->viewport()->mapToGlobal(pos));
diff --git a/ui/qt/bluetooth_hci_summary_dialog.h b/ui/qt/bluetooth_hci_summary_dialog.h
index 1ac24a0d25..2fd3999067 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.h
+++ b/ui/qt/bluetooth_hci_summary_dialog.h
@@ -64,6 +64,7 @@ signals:
void goToPacket(int packet_num);
protected:
+ void keyPressEvent(QKeyEvent *event);
protected slots:
void changeEvent(QEvent* event);