Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
display_filter_entry.h
Go to the documentation of this file.
1
9
10#ifndef DISPLAY_FILTER_ENTRY_H
11#define DISPLAY_FILTER_ENTRY_H
12
14
15class QDragEnterEvent;
16class QDragMoveEvent;
17class QDropEvent;
18class QContextMenuEvent;
19
36class DisplayFilterEntry : public FilterExpressionEdit
37{
38 Q_OBJECT
39
40public:
41 explicit DisplayFilterEntry(QWidget *parent = nullptr);
42
43public slots:
45 void recheck();
46
51 void displayFilterSuccess(bool success);
52
54 void setDisplayFilter(QString filter);
55
57 void applyDisplayFilter();
58
63 bool checkDisplayFilter();
64
65signals:
67 void pushFilterSyntaxStatus(const QString &msg);
71 void filterPackets(QString new_filter, bool force);
73 void showPreferencesDialog(QString pane_name);
74
75protected:
76 void dragEnterEvent(QDragEnterEvent *event) override;
77 void dragMoveEvent(QDragMoveEvent *event) override;
78 void dropEvent(QDropEvent *event) override;
79 void contextMenuEvent(QContextMenuEvent *event) override;
80
81 void updateTranslations() override;
82
83private:
84 void connectToMainWindow();
85 void updateStatus(SyntaxState state);
86 void createFilterTextDropMenu(QDropEvent *event, bool prepare, QString filterText = QString());
87 void displayFilterExpression();
88
89 QString last_applied_;
90};
91
92#endif // DISPLAY_FILTER_ENTRY_H
void popFilterSyntaxStatus()
Pop the filter-syntax message from the status bar.
void filterPackets(QString new_filter, bool force)
Request applying new_filter to the packet list.
void applyDisplayFilter()
Applies the current expression (explicit apply).
Definition display_filter_entry.cpp:147
void pushFilterSyntaxStatus(const QString &msg)
Push a filter-syntax message to the status bar.
void setDisplayFilter(QString filter)
Sets the field text and focuses it (programmatic filter entry).
Definition display_filter_entry.cpp:141
void recheck()
Re-validates the current text (e.g. on preferences change).
Definition display_filter_entry.cpp:136
bool checkDisplayFilter()
Validates the current expression.
Definition display_filter_entry.cpp:152
void displayFilterSuccess(bool success)
Reflects whether the last applied filter succeeded; keeps the apply action disabled while the field a...
Definition display_filter_entry.cpp:158
void showPreferencesDialog(QString pane_name)
Request showing a preferences pane.
SyntaxState
Visual/semantic state of the current text, mapped from the validator.
Definition filter_edit.h:48
SyntaxState state() const
Current syntax state.
Definition filter_edit.h:61
bool event(QEvent *event) override
Re-syncs the inline insets once the style sheet has been applied.
Definition filter_expression_edit.cpp:607