Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
filter_dialog.h
Go to the documentation of this file.
1
10#ifndef FILTER_DIALOG_H
11#define FILTER_DIALOG_H
12
14
16
17#include <QStyledItemDelegate>
18#include <QValidator>
19
20class QItemSelection;
22
23namespace Ui {
24class FilterDialog;
25}
26
28{
29 Q_OBJECT
30
31public:
32 enum FilterType { CaptureFilter, DisplayFilter, DisplayMacro };
33 explicit FilterDialog(QWidget *parent = 0, FilterType filter_type = CaptureFilter, const QString new_filter = QString());
35
36private:
37 Ui::FilterDialog *ui;
38
39 FilterListModel * model_;
40
41 enum FilterType filter_type_;
42 FilterTreeDelegate *filter_tree_delegate_;
43
44 void addFilter(QString name, QString filter, bool start_editing = false);
45
46private slots:
47 void updateWidgets();
48
49 void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
50
51 void on_newToolButton_clicked();
52 void on_deleteToolButton_clicked();
53 void on_copyToolButton_clicked();
54 void on_buttonBox_accepted();
55 void on_buttonBox_helpRequested();
56};
57
58
59//
60// FilterTreeDelegate
61// Delegate for editing capture and display filters.
62//
63
64class FilterTreeDelegate : public QStyledItemDelegate
65{
66 Q_OBJECT
67
68public:
69 FilterTreeDelegate(QObject *parent, FilterDialog::FilterType filter_type);
70
71 virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
72 virtual void setEditorData(QWidget *editor, const QModelIndex &index) const override;
73
74private:
75 FilterDialog::FilterType filter_type_;
76};
77
78class FilterValidator : public QValidator
79{
80public:
81 virtual QValidator::State validate(QString & input, int & pos) const override;
82};
83
84class MacroNameValidator : public QValidator
85{
86public:
87 virtual QValidator::State validate(QString & input, int & pos) const override;
88};
89
90#endif // FILTER_DIALOG_H
Definition filter_dialog.h:28
Definition filter_list_model.h:22
Definition filter_dialog.h:65
Definition filter_dialog.h:79
Definition geometry_state_dialog.h:17
Definition filter_dialog.h:85
Definition tvbuff_lz77huff.c:32