Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

filter_dialog.h
1 /* filter_dialog.cpp
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10 #ifndef FILTER_DIALOG_H
11 #define FILTER_DIALOG_H
12
13 #include "geometry_state_dialog.h"
14
15 //class CaptureFilterSyntaxWorker;
16 class FilterTreeDelegate;
17
18 namespace Ui {
19 class FilterDialog;
20 }
21
22 class FilterDialog : public GeometryStateDialog
23 {
24 Q_OBJECT
25
26 public:
27 enum FilterType { CaptureFilter, DisplayFilter };
28 explicit FilterDialog(QWidget *parent = 0, FilterType filter_type = CaptureFilter, const QString new_filter = QString());
29 ~FilterDialog();
30
31 protected:
32 void showEvent(QShowEvent * event);
33
34 private:
35 Ui::FilterDialog *ui;
36
37 enum FilterType filter_type_;
38 // CaptureFilterSyntaxWorker *syntax_worker_;
39 FilterTreeDelegate *filter_tree_delegate_;
40 QString new_filter_;
41
42 void addFilter(QString name, QString filter, bool start_editing = false);
43
44 private slots:
45 void updateWidgets();
46 // void setFilterSyntaxState(QString filter, bool valid, QString err_msg);
47
48 void on_filterTreeWidget_itemSelectionChanged();
49 void on_newToolButton_clicked();
50 void on_deleteToolButton_clicked();
51 void on_copyToolButton_clicked();
52 void on_buttonBox_accepted();
53 void on_buttonBox_helpRequested();
54 };
55
56
57 //
58 // FilterTreeDelegate
59 // Delegate for editing capture and display filters.
60 //
61
62 #include <QStyledItemDelegate>
63
64 class FilterTreeDelegate : public QStyledItemDelegate
65 {
66 Q_OBJECT
67
68 public:
69 FilterTreeDelegate(QObject *parent, FilterDialog::FilterType filter_type) :
70 QStyledItemDelegate(parent),
71 filter_type_(filter_type)
72 {}
73 ~FilterTreeDelegate() {}
74
75 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
76
77 private:
78 FilterDialog::FilterType filter_type_;
79
80 private slots:
81 };
82
83 #endif // FILTER_DIALOG_H
84
85 /*
86 * Editor modelines
87 *
88 * Local Variables:
89 * c-basic-offset: 4
90 * tab-width: 8
91 * indent-tabs-mode: nil
92 * End:
93 *
94 * ex: set shiftwidth=4 tabstop=8 expandtab:
95 * :indentSize=4:tabSize=8:noTabs=true:
96 */
GeometryStateDialog
Definition: geometry_state_dialog.h:15
Ui
Definition: ui_about_dialog.h:291
FilterTreeDelegate
Definition: filter_dialog.h:64
option
Definition: pcapng.c:148
Ui::FilterDialog
Definition: ui_filter_dialog.h:141
FilterDialog
Definition: filter_dialog.h:22