summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.cpp23
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.h1
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.ui19
3 files changed, 42 insertions, 1 deletions
diff --git a/ui/qt/bluetooth_hci_summary_dialog.cpp b/ui/qt/bluetooth_hci_summary_dialog.cpp
index e7ec986683..250646fe6c 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.cpp
+++ b/ui/qt/bluetooth_hci_summary_dialog.cpp
@@ -112,6 +112,7 @@ BluetoothHciSummaryDialog::BluetoothHciSummaryDialog(QWidget &parent, CaptureFil
connect(ui->interfaceComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(interfaceCurrentIndexChanged(int)));
connect(ui->adapterComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(adapterCurrentIndexChanged(int)));
+ connect(ui->displayFilterLineEdit, SIGNAL(returnPressed()), this, SLOT(displayFilterLineEditAccepted()));
for (int i = 0; i < ui->tableTreeWidget->columnCount(); i++) {
ui->tableTreeWidget->resizeColumnToContents(i);
@@ -782,6 +783,28 @@ void BluetoothHciSummaryDialog::on_buttonBox_clicked(QAbstractButton *)
/* if (button == foo_button_) */
}
+void BluetoothHciSummaryDialog::displayFilterLineEditAccepted()
+{
+ GString *error_string;
+
+ remove_tap_listener(&tapinfo_);
+ error_string = register_tap_listener("bluetooth.hci_summary", &tapinfo_,
+ ui->displayFilterLineEdit->text().toUtf8().constData(),
+ 0,
+ bluetooth_hci_summary_tap_reset,
+ bluetooth_hci_summary_tap_packet,
+ NULL
+ );
+
+ if (error_string != NULL) {
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
+ "%s", error_string->str);
+ g_string_free(error_string, TRUE);
+ }
+
+ cap_file_.retapPackets();
+}
+
/*
* Editor modelines
*
diff --git a/ui/qt/bluetooth_hci_summary_dialog.h b/ui/qt/bluetooth_hci_summary_dialog.h
index 9f9488b819..39bcc1f57c 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.h
+++ b/ui/qt/bluetooth_hci_summary_dialog.h
@@ -109,6 +109,7 @@ private slots:
void tableItemCollapsed(QTreeWidgetItem *item);
void interfaceCurrentIndexChanged(int index);
void adapterCurrentIndexChanged(int index);
+ void displayFilterLineEditAccepted();
};
#endif // BLUETOOTH_HCI_SUMMARY_DIALOG_H
diff --git a/ui/qt/bluetooth_hci_summary_dialog.ui b/ui/qt/bluetooth_hci_summary_dialog.ui
index 4b34b7c37b..3e8f20802c 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.ui
+++ b/ui/qt/bluetooth_hci_summary_dialog.ui
@@ -536,7 +536,7 @@
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
+ <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0">
<property name="spacing">
<number>-1</number>
</property>
@@ -547,6 +547,16 @@
<number>0</number>
</property>
<item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Display filter:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="DisplayFilterEdit" name="displayFilterLineEdit"/>
+ </item>
+ <item>
<widget class="QComboBox" name="interfaceComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@@ -639,6 +649,13 @@
</property>
</action>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>DisplayFilterEdit</class>
+ <extends>QLineEdit</extends>
+ <header>display_filter_edit.h</header>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections>
<connection>