Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
display_filter_edit.h
Go to the documentation of this file.
1
10#ifndef DISPLAYFILTEREDIT_H
11#define DISPLAYFILTEREDIT_H
12
13#include <QDrag>
14#include <QActionGroup>
15
17
18class QEvent;
20
21typedef enum {
22 DisplayFilterToApply,
23 DisplayFilterToEnter,
24 ReadFilterToApply
25} DisplayFilterEditType;
26
28{
29 Q_OBJECT
30public:
31 explicit DisplayFilterEdit(QWidget *parent = 0, DisplayFilterEditType type = DisplayFilterToEnter);
32
33protected:
34 void paintEvent(QPaintEvent *evt);
35 void resizeEvent(QResizeEvent *);
36 void keyPressEvent(QKeyEvent *event) { completionKeyPressEvent(event); }
37 void focusInEvent(QFocusEvent *event) { completionFocusInEvent(event); }
38 void focusOutEvent(QFocusEvent *event);
39
40 virtual void dragEnterEvent(QDragEnterEvent *event);
41 virtual void dragMoveEvent(QDragMoveEvent *event);
42 virtual void dropEvent(QDropEvent *event);
43 virtual void contextMenuEvent(QContextMenuEvent *menu);
44
45public slots:
46 bool checkFilter();
47 void updateBookmarkMenu();
48 void applyDisplayFilter();
49 void displayFilterSuccess(bool success);
50 void setStyleSheet(const QString &style_sheet);
51
52private slots:
53 void checkFilter(const QString &filter_text);
54 void clearFilter();
55 void changeEvent(QEvent* event);
56
57 void displayFilterExpression();
58
59 void saveFilter();
60 void removeFilter();
61 void showFilters();
62 void showExpressionPrefs();
63 void applyOrPrepareFilter();
64
65 void triggerAlignementAction();
66
67 void connectToMainWindow();
68
69private:
70 DisplayFilterEditType type_;
71 QString placeholder_text_;
72 QAction *save_action_;
73 QAction *remove_action_;
74 QActionGroup * actions_;
75 StockIconToolButton *bookmark_button_;
76 StockIconToolButton *clear_button_;
77 StockIconToolButton *apply_button_;
78 bool leftAlignActions_;
79 QString last_applied_;
80 QString filter_word_preamble_;
81 bool autocomplete_accepts_field_;
82 QString style_sheet_;
83
84 void setDefaultPlaceholderText();
85 void buildCompletionList(const QString &field_word, const QString &preamble);
86
87 void createFilterTextDropMenu(QDropEvent *event, bool prepare, QString filterText = QString());
88
89 void alignActionButtons();
90 void updateClearButton();
91
92signals:
93 void pushFilterSyntaxStatus(const QString&);
94 void popFilterSyntaxStatus();
95 void filterPackets(QString new_filter, bool force);
96 void showPreferencesDialog(QString pane_name);
97
98};
99
100#endif // DISPLAYFILTEREDIT_H
Definition display_filter_edit.h:28
Definition stock_icon_tool_button.h:16
Definition syntax_line_edit.h:23