10#ifndef CAPTURE_FILTER_EDIT_H
11#define CAPTURE_FILTER_EDIT_H
15#include <QActionGroup>
119 void applyCaptureFilter();
133 void setFilterSyntaxState(QString filter,
int state, QString err_msg);
138 void bookmarkClicked();
152 bool field_name_only_;
153 bool enable_save_action_;
154 QString placeholder_text_;
155 QAction *save_action_;
156 QAction *remove_action_;
157 QActionGroup * actions_;
162 QThread *syntax_thread_;
163 QTimer *line_edit_timer_;
170 void buildCompletionList(
const QString &primitive_word,
const QString &preamble);
A line edit widget specialized for editing, validating, and managing capture filters.
Definition capture_filter_edit.h:26
void paintEvent(QPaintEvent *evt)
Handles paint events for the widget.
Definition capture_filter_edit.cpp:232
void removeFilter()
Removes the current filter from the saved filters list.
Definition capture_filter_edit.cpp:526
void captureFilterChanged(const QString filter)
Signal emitted when the capture filter text changes.
~CaptureFilterEdit()
Destroys the CaptureFilterEdit widget.
Definition capture_filter_edit.cpp:224
void captureFilterSyntaxChanged(bool valid)
Signal emitted when the filter syntax validity changes.
void keyPressEvent(QKeyEvent *event)
Handles key press events, forwarding to completion logic.
Definition capture_filter_edit.h:76
void updateBookmarkMenu()
Updates the bookmark menu with current saved filters.
Definition capture_filter_edit.cpp:389
void saveFilter()
Saves the current filter to the bookmarks/saved filters list.
Definition capture_filter_edit.cpp:518
void startCapture()
Signal emitted to request starting a capture using the current filter.
void focusInEvent(QFocusEvent *event)
Handles focus in events, forwarding to completion logic.
Definition capture_filter_edit.h:82
static QPair< const QString, bool > getSelectedFilter()
Gets the currently selected filter from the UI state.
Definition capture_filter_edit.cpp:302
void checkFilter()
Triggers a syntax check of the current filter text.
Definition capture_filter_edit.cpp:379
void showFilters()
Displays the list of available filters.
Definition capture_filter_edit.cpp:548
void setConflict(bool conflict=false)
Sets the visual conflict state of the capture filter edit.
Definition capture_filter_edit.cpp:286
void prepareFilter()
Prepares the filter string for application.
Definition capture_filter_edit.cpp:556
void addBookmark(const QString filter)
Signal emitted to request adding a bookmark for the given filter.
void resizeEvent(QResizeEvent *event)
Handles resize events for the widget.
Definition capture_filter_edit.cpp:260
Worker class for checking capture filter syntax in the background.
Definition capture_filter_syntax_worker.h:21
QLineEdit subclass that adds syntax-state colouring, error messaging, and partial token-based autocom...
Definition syntax_line_edit.h:28
virtual bool event(QEvent *event)
Intercepts Tab and other keys to trigger or dismiss the completer.
Definition syntax_line_edit.cpp:295
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:333
void completionFocusInEvent(QFocusEvent *event)
Triggers a completion refresh when the widget gains focus.
Definition syntax_line_edit.cpp:381