| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
field_filter_edit.h
Go to the documentation of this file.
1
9
10#ifndef FIELDFILTEREDIT_H
11#define FIELDFILTEREDIT_H
12
13#include <ui/qt/widgets/syntax_line_edit.h>
14
15 class QEvent;
16 class StockIconToolButton;
17
21 class FieldFilterEdit : public SyntaxLineEdit
22{
23 Q_OBJECT
24 public:
29 explicit FieldFilterEdit(QWidget *parent = 0);
30
31 protected:
36 void keyPressEvent(QKeyEvent *event) override { completionKeyPressEvent(event); }
37
42 void focusInEvent(QFocusEvent *event) override { completionFocusInEvent(event); }
43
48 void focusOutEvent(QFocusEvent *event) override;
49
50 public slots:
55 bool checkFilter();
56
57 private slots:
62 void checkFilter(const QString &filter_text);
63
68 void changeEvent(QEvent* event) override;
69
70 private:
72 QString placeholder_text_;
73
77 void setDefaultPlaceholderText();
78
84 void buildCompletionList(const QString &field_word, const QString &preamble) override;
85
86signals:
91 void pushFilterSyntaxStatus(const QString& status);
92
96 void popFilterSyntaxStatus();
97
102 void pushFilterSyntaxWarning(const QString& warning);
103};
104
105#endif // FIELDFILTEREDIT_H
FieldFilterEdit::focusInEvent
void focusInEvent(QFocusEvent *event) override
Handles focus in events, triggering completion logic if necessary.
Definition field_filter_edit.h:42
FieldFilterEdit::pushFilterSyntaxStatus
void pushFilterSyntaxStatus(const QString &status)
Signal emitted to display a syntax status message.
FieldFilterEdit::pushFilterSyntaxWarning
void pushFilterSyntaxWarning(const QString &warning)
Signal emitted to display a syntax warning message.
FieldFilterEdit::FieldFilterEdit
FieldFilterEdit(QWidget *parent=0)
Constructs a new FieldFilterEdit.
Definition field_filter_edit.cpp:37
FieldFilterEdit::checkFilter
bool checkFilter()
Checks the validity of the current filter text.
Definition field_filter_edit.cpp:66
FieldFilterEdit::keyPressEvent
void keyPressEvent(QKeyEvent *event) override
Handles key press events, routing them to completion logic.
Definition field_filter_edit.h:36
FieldFilterEdit::popFilterSyntaxStatus
void popFilterSyntaxStatus()
Signal emitted to remove or pop the current syntax status message.
FieldFilterEdit::focusOutEvent
void focusOutEvent(QFocusEvent *event) override
Handles focus out events.
Definition field_filter_edit.cpp:59
StockIconToolButton
A tool button that displays a stock icon.
Definition stock_icon_tool_button.h:19
SyntaxLineEdit::SyntaxLineEdit
SyntaxLineEdit(QWidget *parent=0)
Constructs the SyntaxLineEdit in the Empty state with no completer.
Definition syntax_line_edit.cpp:37
SyntaxLineEdit::completionKeyPressEvent
void completionKeyPressEvent(QKeyEvent *event)
Handles key press events while the completer popup is visible, forwarding navigation keys to the popu...
Definition syntax_line_edit.cpp:336
SyntaxLineEdit::completionFocusInEvent
void completionFocusInEvent(QFocusEvent *event)
Triggers a completion refresh when the widget gains focus.
Definition syntax_line_edit.cpp:384
SyntaxLineEdit::event
virtual bool event(QEvent *event) override
Intercepts Tab and other keys to trigger or dismiss the completer.
Definition syntax_line_edit.cpp:299
syntax_line_edit.h