A line edit widget specialized for entering, validating, and managing display filters.
More...
#include <display_filter_edit.h>
|
| bool | checkFilter () |
| | Validates the syntax of the current display filter.
|
| |
|
void | updateBookmarkMenu () |
| | Updates the bookmark menu with current saved filters.
|
| |
|
void | applyDisplayFilter () |
| | Applies the currently entered display filter.
|
| |
| void | displayFilterSuccess (bool success) |
| | Updates the UI state indicating whether the display filter was successfully applied.
|
| |
| void | setStyleSheet (const QString &style_sheet) |
| | Sets the widget's style sheet.
|
| |
| 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 &msg) |
| | Signal emitted to push a status message regarding filter syntax.
|
| |
|
void | popFilterSyntaxStatus () |
| | Signal emitted to pop (remove) the last filter syntax status message.
|
| |
| void | filterPackets (QString new_filter, bool force) |
| | Signal emitted to request packet filtering with a new filter string.
|
| |
| void | showPreferencesDialog (QString pane_name) |
| | Signal emitted to request displaying the preferences dialog.
|
| |
|
| void | paintEvent (QPaintEvent *evt) |
| | Handles paint events for the widget.
|
| |
|
void | resizeEvent (QResizeEvent *) |
| | Handles resize events for the widget.
|
| |
| void | keyPressEvent (QKeyEvent *event) |
| | Handles key press events and forwards them to the completion logic.
|
| |
| void | focusInEvent (QFocusEvent *event) |
| | Handles focus in events and forwards them to the completion logic.
|
| |
| void | focusOutEvent (QFocusEvent *event) |
| | Handles focus out events for the widget.
|
| |
| virtual void | dragEnterEvent (QDragEnterEvent *event) |
| | Handles drag enter events to accept valid drops.
|
| |
| virtual void | dragMoveEvent (QDragMoveEvent *event) |
| | Handles drag move events for visual feedback.
|
| |
| virtual void | dropEvent (QDropEvent *event) |
| | Handles drop events containing filter data.
|
| |
| virtual void | contextMenuEvent (QContextMenuEvent *menu) |
| | Handles context menu events to display appropriate actions.
|
| |
| 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.
|
| |
A line edit widget specialized for entering, validating, and managing display filters.
◆ DisplayFilterEdit()
Constructs a new DisplayFilterEdit widget.
- Parameters
-
| parent | The parent widget, defaults to 0. |
| type | The display filter edit type, defaults to DisplayFilterToEnter. |
◆ checkFilter
| bool DisplayFilterEdit::checkFilter |
( |
| ) |
|
|
slot |
Validates the syntax of the current display filter.
- Returns
- True if the filter is valid, false otherwise.
◆ contextMenuEvent()
| void DisplayFilterEdit::contextMenuEvent |
( |
QContextMenuEvent * |
menu | ) |
|
|
protectedvirtual |
Handles context menu events to display appropriate actions.
- Parameters
-
| menu | The context menu event details. |
◆ displayFilterSuccess
| void DisplayFilterEdit::displayFilterSuccess |
( |
bool |
success | ) |
|
|
slot |
Updates the UI state indicating whether the display filter was successfully applied.
- Parameters
-
| success | True if the application succeeded, false otherwise. |
◆ dragEnterEvent()
| void DisplayFilterEdit::dragEnterEvent |
( |
QDragEnterEvent * |
event | ) |
|
|
protectedvirtual |
Handles drag enter events to accept valid drops.
- Parameters
-
| event | The drag enter event details. |
◆ dragMoveEvent()
| void DisplayFilterEdit::dragMoveEvent |
( |
QDragMoveEvent * |
event | ) |
|
|
protectedvirtual |
Handles drag move events for visual feedback.
- Parameters
-
| event | The drag move event details. |
◆ dropEvent()
| void DisplayFilterEdit::dropEvent |
( |
QDropEvent * |
event | ) |
|
|
protectedvirtual |
Handles drop events containing filter data.
- Parameters
-
| event | The drop event details. |
◆ filterPackets
| void DisplayFilterEdit::filterPackets |
( |
QString |
new_filter, |
|
|
bool |
force |
|
) |
| |
|
signal |
Signal emitted to request packet filtering with a new filter string.
- Parameters
-
| new_filter | The new filter string to apply. |
| force | True to force the application even if the string hasn't changed. |
◆ focusInEvent()
| void DisplayFilterEdit::focusInEvent |
( |
QFocusEvent * |
event | ) |
|
|
inlineprotected |
Handles focus in events and forwards them to the completion logic.
- Parameters
-
| event | The focus event details. |
◆ focusOutEvent()
| void DisplayFilterEdit::focusOutEvent |
( |
QFocusEvent * |
event | ) |
|
|
protectedvirtual |
Handles focus out events for the widget.
- Parameters
-
| event | The focus event details. |
Reimplemented from SyntaxLineEdit.
◆ keyPressEvent()
| void DisplayFilterEdit::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
inlineprotected |
Handles key press events and forwards them to the completion logic.
- Parameters
-
| event | The key press event details. |
◆ paintEvent()
| void DisplayFilterEdit::paintEvent |
( |
QPaintEvent * |
evt | ) |
|
|
protectedvirtual |
Handles paint events for the widget.
- Parameters
-
| evt | The paint event details. |
Reimplemented from SyntaxLineEdit.
◆ pushFilterSyntaxStatus
| void DisplayFilterEdit::pushFilterSyntaxStatus |
( |
const QString & |
msg | ) |
|
|
signal |
Signal emitted to push a status message regarding filter syntax.
- Parameters
-
| msg | The status message string. |
◆ setStyleSheet
| void DisplayFilterEdit::setStyleSheet |
( |
const QString & |
style_sheet | ) |
|
|
slot |
Sets the widget's style sheet.
- Parameters
-
| style_sheet | The style sheet string to apply. |
◆ setType()
Sets the type of the display filter edit widget.
- Parameters
-
| type | The display filter edit type to set. |
◆ showPreferencesDialog
| void DisplayFilterEdit::showPreferencesDialog |
( |
QString |
pane_name | ) |
|
|
signal |
Signal emitted to request displaying the preferences dialog.
- Parameters
-
| pane_name | The specific preference pane to open. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/display_filter_edit.h
- /builds/wireshark/wireshark/ui/qt/widgets/display_filter_edit.cpp