Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
filter_expression_toolbar.h
Go to the documentation of this file.
1
11
12#include <QMenu>
13
14#ifndef FILTER_EXPRESSION_TOOLBAR_H
15#define FILTER_EXPRESSION_TOOLBAR_H
16
21{
22 Q_OBJECT
23public:
28 explicit FilterExpressionToolBar(QWidget * parent = Q_NULLPTR);
29
30protected:
36 virtual bool event(QEvent *event) override;
37
44 virtual bool eventFilter(QObject *obj, QEvent *ev) override;
45
52 virtual WiresharkMimeData * createMimeData(QString name, int position) override;
53
54public slots:
59
60signals:
66 void filterSelected(QString filter, bool apply);
67
72
77 void filterEdit(int uatIndex);
78
79protected slots:
84 void onCustomMenuHandler(const QPoint &pos);
85
92 void onActionMoved(QAction * action, int oldPos, int newPos);
93
99 void onFilterDropped(QString description, QString filter);
100
101private slots:
105 void removeFilter();
106
110 void disableFilter();
111
115 void editFilter();
116
120 void filterClicked();
121
125 void toolBarShowPreferences();
126
130 void closeMenu(QAction *);
131
132private:
136 void updateStyleSheet();
137
144 int uatRowIndexForFilter(QString label, QString expression);
145
152 void customMenu(QWidget* target, QAction * filterAction, const QPoint& pos);
153
161 static bool filter_expression_add_action(const void *key, void *value, void *user_data);
162
170 static QMenu * findParentMenu(const QStringList tree, void *fed_data, QMenu *parent = Q_NULLPTR);
171};
172
173#endif //FILTER_EXPRESSION_TOOLBAR_H
A customized QToolBar that supports drag-and-drop reordering of its actions and handling external dro...
Definition drag_drop_toolbar.h:22
A toolbar that displays filter expressions and supports drag-and-drop operations.
Definition filter_expression_toolbar.h:21
virtual WiresharkMimeData * createMimeData(QString name, int position) override
Creates MIME data representing a dragged filter expression.
Definition filter_expression_toolbar.cpp:169
virtual bool eventFilter(QObject *obj, QEvent *ev) override
Filters events for watched objects.
Definition filter_expression_toolbar.cpp:301
void onFilterDropped(QString description, QString filter)
Slot triggered when a filter is dropped onto the toolbar.
Definition filter_expression_toolbar.cpp:239
virtual bool event(QEvent *event) override
Handles events directed to the toolbar.
Definition filter_expression_toolbar.cpp:68
void filterExpressionsChanged()
Slot triggered when the underlying list of filter expressions changes.
Definition filter_expression_toolbar.cpp:131
void filterEdit(int uatIndex)
Signal emitted to edit a filter expression at a specific index.
void filterPreferences()
Signal emitted to open the filter preferences dialog.
void filterSelected(QString filter, bool apply)
Signal emitted when a filter expression is selected.
void onActionMoved(QAction *action, int oldPos, int newPos)
Slot triggered when an action is dragged and moved within the toolbar.
Definition filter_expression_toolbar.cpp:187
void onCustomMenuHandler(const QPoint &pos)
Handles custom context menu requests on the toolbar.
Definition filter_expression_toolbar.cpp:81
Base class for Wireshark specific MIME data.
Definition wireshark_mime_data.h:18