A specialized line edit for entering and validating field filters with auto-completion.
More...
#include <field_filter_edit.h>
|
| bool | checkFilter () |
| | Checks the validity of the current filter text.
|
| |
| void | setStyleSheet (const QString &style_sheet) |
| | Sets the base style sheet; the state-driven style is composited on top.
|
| |
| void | insertFilter (const QString &filter) |
| | Inserts filter text at the cursor position, adding surrounding spaces where necessary to keep the expression well-formed.
|
| |
| bool | checkDisplayFilter (QString filter) |
| | Validates filter as a Wireshark display filter and updates the syntax state and error message accordingly.
|
| |
| void | checkFieldName (QString field) |
| | Validates field as a protocol field name and updates the syntax state.
|
| |
| void | checkCustomColumn (QString fields) |
| | Validates fields as a custom-column field expression and updates the syntax state.
|
| |
| void | checkInteger (QString number) |
| | Validates number as a well-formed integer and updates the syntax state.
|
| |
|
| void | pushFilterSyntaxStatus (const QString &status) |
| | Signal emitted to display a syntax status message.
|
| |
|
void | popFilterSyntaxStatus () |
| | Signal emitted to remove or pop the current syntax status message.
|
| |
| void | pushFilterSyntaxWarning (const QString &warning) |
| | Signal emitted to display a syntax warning message.
|
| |
|
| | FieldFilterEdit (QWidget *parent=0) |
| | Constructs a new FieldFilterEdit.
|
| |
| | SyntaxLineEdit (QWidget *parent=0) |
| | Constructs the SyntaxLineEdit in the Empty state with no completer.
|
| |
| SyntaxState | syntaxState () const |
| | Returns the current syntax validation state.
|
| |
| void | setSyntaxState (SyntaxState state=Empty) |
| | Sets the syntax state and updates the widget's style sheet to reflect it.
|
| |
| QString | syntaxErrorMessage () |
| | Returns a short, human-readable description of the current syntax error.
|
| |
| QString | syntaxErrorMessageFull () |
| | Returns a full error message that includes the filter expression and the location of the error within it.
|
| |
| QString | styleSheet () const |
| | Returns the base style sheet, excluding any state-driven overrides.
|
| |
| QString | deprecatedToken () |
| | Returns the deprecated token string when the state is Deprecated.
|
| |
| void | setCompleter (QCompleter *c) |
| | Installs a QCompleter for token-based autocompletion.
|
| |
| QCompleter * | completer () const |
| | Returns the currently installed completer.
|
| |
| void | allowCompletion (bool enabled) |
| | Enables or disables autocompletion without removing the completer.
|
| |
|
| void | keyPressEvent (QKeyEvent *event) |
| | Handles key press events, routing them to completion logic.
|
| |
| void | focusInEvent (QFocusEvent *event) |
| | Handles focus in events, triggering completion logic if necessary.
|
| |
| void | focusOutEvent (QFocusEvent *event) |
| | Handles focus out events.
|
| |
| void | setCompletionTokenChars (const QString &token_chars) |
| | Sets the characters that may appear in a completion token (e.g. letters, digits, underscores, dots). Must be called by subclasses before completion is used.
|
| |
| bool | isComplexFilter (const QString &filter) |
| | Returns true if filter contains operators or structure that make it too complex for token-level autocompletion.
|
| |
| QPoint | getTokenUnderCursor () |
| | Returns the start position and length of the token under the cursor.
|
| |
| QStringList | splitLineUnderCursor () |
| | Splits the line at the cursor into the preamble and the current token.
|
| |
| virtual bool | event (QEvent *event) |
| | Intercepts Tab and other keys to trigger or dismiss the completer.
|
| |
| void | completionKeyPressEvent (QKeyEvent *event) |
| | Handles key press events while the completer popup is visible, forwarding navigation keys to the popup and committing on Enter/Tab.
|
| |
| void | completionFocusInEvent (QFocusEvent *event) |
| | Triggers a completion refresh when the widget gains focus.
|
| |
| virtual void | paintEvent (QPaintEvent *event) |
| | Paints the widget, overlaying a state-appropriate background colour.
|
| |
A specialized line edit for entering and validating field filters with auto-completion.
◆ FieldFilterEdit()
| FieldFilterEdit::FieldFilterEdit |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
Constructs a new FieldFilterEdit.
- Parameters
-
| parent | The parent widget, defaults to 0. |
◆ checkFilter
| bool FieldFilterEdit::checkFilter |
( |
| ) |
|
|
slot |
Checks the validity of the current filter text.
- Returns
- True if the filter is valid, false otherwise.
◆ focusInEvent()
| void FieldFilterEdit::focusInEvent |
( |
QFocusEvent * |
event | ) |
|
|
inlineprotected |
Handles focus in events, triggering completion logic if necessary.
- Parameters
-
◆ focusOutEvent()
| void FieldFilterEdit::focusOutEvent |
( |
QFocusEvent * |
event | ) |
|
|
protectedvirtual |
Handles focus out events.
- Parameters
-
Reimplemented from SyntaxLineEdit.
◆ keyPressEvent()
| void FieldFilterEdit::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
inlineprotected |
Handles key press events, routing them to completion logic.
- Parameters
-
◆ pushFilterSyntaxStatus
| void FieldFilterEdit::pushFilterSyntaxStatus |
( |
const QString & |
status | ) |
|
|
signal |
Signal emitted to display a syntax status message.
- Parameters
-
| status | The status message string. |
◆ pushFilterSyntaxWarning
| void FieldFilterEdit::pushFilterSyntaxWarning |
( |
const QString & |
warning | ) |
|
|
signal |
Signal emitted to display a syntax warning message.
- Parameters
-
| warning | The warning message string. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/field_filter_edit.h
- /builds/wireshark/wireshark/ui/qt/widgets/field_filter_edit.cpp