summaryrefslogtreecommitdiff
path: root/ui/qt/filter_expressions_preferences_frame.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-02-06 18:22:54 +0000
committerGerald Combs <gerald@wireshark.org>2013-02-06 18:22:54 +0000
commit1c0deb0fc818252904878fe5419c75df3873a901 (patch)
treeb44a3986fa473e3c6872c21c1036abe9d573b225 /ui/qt/filter_expressions_preferences_frame.h
parentae527cbf109a054ba10e3e313fb42e0b2ec0f342 (diff)
downloadwireshark-1c0deb0fc818252904878fe5419c75df3873a901.tar.gz
Add Filter Expressions^WButton^WShortcut^WBookmark preferences.
Add comments noting that - We might want to do something different when the bookmark button is pressed. - The display filters (dfilters file) and gui.filter_expressions preferences should be merged. - Many buttons on Qt4 + OS X + unifiedTitleAndToolBarOnMac makes the main window really wide. Add a qstring_strdup convenience routine. Add "disabled" display filter edit icons. Fix up whitespace and descriptions in a couple of places. svn path=/trunk/; revision=47522
Diffstat (limited to 'ui/qt/filter_expressions_preferences_frame.h')
-rw-r--r--ui/qt/filter_expressions_preferences_frame.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/ui/qt/filter_expressions_preferences_frame.h b/ui/qt/filter_expressions_preferences_frame.h
new file mode 100644
index 0000000000..90ee5a38aa
--- /dev/null
+++ b/ui/qt/filter_expressions_preferences_frame.h
@@ -0,0 +1,69 @@
+/* filter_expressions_preferences_frame.h
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef FILTER_EXPRESSIONS_PREFERENCES_FRAME_H
+#define FILTER_EXPRESSIONS_PREFERENCES_FRAME_H
+
+#include <QFrame>
+#include <QLineEdit>
+#include <QTreeWidgetItem>
+
+namespace Ui {
+class FilterExpressionsPreferencesFrame;
+}
+
+class FilterExpressionsPreferencesFrame : public QFrame
+{
+ Q_OBJECT
+
+public:
+ explicit FilterExpressionsPreferencesFrame(QWidget *parent = 0);
+ ~FilterExpressionsPreferencesFrame();
+
+ void unstash();
+
+protected:
+ void keyPressEvent(QKeyEvent *evt);
+
+private:
+ Ui::FilterExpressionsPreferencesFrame *ui;
+
+ int cur_column_;
+ QLineEdit *cur_line_edit_;
+ QString saved_col_string_;
+
+ void addExpression(bool enabled, const char *label, char *expression);
+
+private slots:
+ void updateWidgets(void);
+ void on_expressionTreeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
+ void on_expressionTreeWidget_itemActivated(QTreeWidgetItem *item, int column);
+ void lineEditDestroyed();
+ void labelEditingFinished();
+ void expressionTextChanged(QString);
+ void expressionEditingFinished();
+ void on_newToolButton_clicked();
+ void on_deleteToolButton_clicked();
+};
+
+#endif // FILTER_EXPRESSIONS_PREFERENCES_FRAME_H