A line edit widget specialized for editing, validating, and managing capture filters.
More...
#include <capture_filter_edit.h>
|
|
void | checkFilter () |
| | Triggers a syntax check of the current filter text.
|
| |
|
void | updateBookmarkMenu () |
| | Updates the bookmark menu with current saved filters.
|
| |
|
void | saveFilter () |
| | Saves the current filter to the bookmarks/saved filters list.
|
| |
|
void | removeFilter () |
| | Removes the current filter from the saved filters list.
|
| |
|
void | showFilters () |
| | Displays the list of available filters.
|
| |
|
void | prepareFilter () |
| | Prepares the filter string for application.
|
| |
| 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 | captureFilterSyntaxChanged (bool valid) |
| | Signal emitted when the filter syntax validity changes.
|
| |
| void | captureFilterChanged (const QString filter) |
| | Signal emitted when the capture filter text changes.
|
| |
|
void | startCapture () |
| | Signal emitted to request starting a capture using the current filter.
|
| |
| void | addBookmark (const QString filter) |
| | Signal emitted to request adding a bookmark for the given filter.
|
| |
|
| | CaptureFilterEdit (QWidget *parent=0, bool plain=false) |
| | Constructs a new CaptureFilterEdit widget.
|
| |
|
| ~CaptureFilterEdit () |
| | Destroys the CaptureFilterEdit widget.
|
| |
| void | setConflict (bool conflict=false) |
| | Sets the visual conflict state of the capture filter edit.
|
| |
| | 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.
|
| |
|
| static QPair< const QString, bool > | getSelectedFilter () |
| | Gets the currently selected filter from the UI state.
|
| |
| static QString | createSyntaxErrorMessageFull (const QString &filter, const QString &err_msg, qsizetype loc_start, size_t loc_length) |
| | Builds a full syntax error message string combining the filter expression with a location-annotated error description.
|
| |
|
| void | paintEvent (QPaintEvent *evt) |
| | Handles paint events for the widget.
|
| |
| void | resizeEvent (QResizeEvent *event) |
| | Handles resize events for the widget.
|
| |
| void | keyPressEvent (QKeyEvent *event) |
| | Handles key press events, forwarding to completion logic.
|
| |
| void | focusInEvent (QFocusEvent *event) |
| | Handles focus in events, forwarding to completion logic.
|
| |
| 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 | focusOutEvent (QFocusEvent *event) |
| | Hides the completer popup when the widget loses focus.
|
| |
A line edit widget specialized for editing, validating, and managing capture filters.
◆ CaptureFilterEdit()
| CaptureFilterEdit::CaptureFilterEdit |
( |
QWidget * |
parent = 0, |
|
|
bool |
plain = false |
|
) |
| |
|
explicit |
Constructs a new CaptureFilterEdit widget.
- Parameters
-
| parent | The parent widget, defaults to 0. |
| plain | If true, creates a plain line edit without extra filter action buttons; defaults to false. |
◆ addBookmark
| void CaptureFilterEdit::addBookmark |
( |
const QString |
filter | ) |
|
|
signal |
Signal emitted to request adding a bookmark for the given filter.
- Parameters
-
| filter | The filter string to bookmark. |
◆ captureFilterChanged
| void CaptureFilterEdit::captureFilterChanged |
( |
const QString |
filter | ) |
|
|
signal |
Signal emitted when the capture filter text changes.
- Parameters
-
| filter | The new filter string. |
◆ captureFilterSyntaxChanged
| void CaptureFilterEdit::captureFilterSyntaxChanged |
( |
bool |
valid | ) |
|
|
signal |
Signal emitted when the filter syntax validity changes.
- Parameters
-
| valid | True if the current filter syntax is valid, false otherwise. |
◆ focusInEvent()
| void CaptureFilterEdit::focusInEvent |
( |
QFocusEvent * |
event | ) |
|
|
inlineprotected |
Handles focus in events, forwarding to completion logic.
- Parameters
-
◆ getSelectedFilter()
| QPair< const QString, bool > CaptureFilterEdit::getSelectedFilter |
( |
| ) |
|
|
static |
Gets the currently selected filter from the UI state.
Returns varying pairs based on selection state:
- No selections: (QString(), false)
- Selections, same filter: (filter, false)
- Selections, different filters: (QString(), true)
- Returns
- A QPair containing the filter string and a boolean indicating if multiple differing filters are selected.
◆ keyPressEvent()
| void CaptureFilterEdit::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
inlineprotected |
Handles key press events, forwarding to completion logic.
- Parameters
-
| event | The key press event. |
◆ paintEvent()
| void CaptureFilterEdit::paintEvent |
( |
QPaintEvent * |
evt | ) |
|
|
protectedvirtual |
Handles paint events for the widget.
- Parameters
-
Reimplemented from SyntaxLineEdit.
◆ resizeEvent()
| void CaptureFilterEdit::resizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
protected |
Handles resize events for the widget.
- Parameters
-
◆ setConflict()
| void CaptureFilterEdit::setConflict |
( |
bool |
conflict = false | ) |
|
Sets the visual conflict state of the capture filter edit.
- Parameters
-
| conflict | True to indicate a conflict state, false otherwise (defaults to false). |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/capture_filter_edit.h
- /builds/wireshark/wireshark/ui/qt/widgets/capture_filter_edit.cpp