Wireshark  4.3.0
The Wireshark network protocol analyzer
filter_expression_toolbar.h
Go to the documentation of this file.
1 
11 
12 #include <glib.h>
13 
14 #include <QMenu>
15 
16 #ifndef FILTER_EXPRESSION_TOOLBAR_H
17 #define FILTER_EXPRESSION_TOOLBAR_H
18 
20 {
21  Q_OBJECT
22 public:
23  explicit FilterExpressionToolBar(QWidget * parent = Q_NULLPTR);
24 
25 protected:
26  virtual bool event(QEvent *event) override;
27  virtual bool eventFilter(QObject *obj, QEvent *ev) override;
28 
29  virtual WiresharkMimeData * createMimeData(QString name, int position) override;
30 
31 public slots:
32  void filterExpressionsChanged();
33 
34 signals:
35  void filterSelected(QString, bool);
36  void filterPreferences();
37  void filterEdit(int uatIndex);
38 
39 protected slots:
40  void onCustomMenuHandler(const QPoint &pos);
41  void onActionMoved(QAction * action, int oldPos, int newPos);
42  void onFilterDropped(QString description, QString filter);
43 
44 private slots:
45  void removeFilter();
46  void disableFilter();
47  void editFilter();
48  void filterClicked();
49  void toolBarShowPreferences();
50 
51  void closeMenu(QAction *);
52 
53 private:
54  void updateStyleSheet();
55  int uatRowIndexForFilter(QString label, QString expression);
56 
57  void customMenu(FilterExpressionToolBar * target, QAction * filterAction, const QPoint& pos);
58 
59  static bool filter_expression_add_action(const void *key, void *value, void *user_data);
60  static QMenu * findParentMenu(const QStringList tree, void *fed_data, QMenu *parent = Q_NULLPTR);
61 };
62 
63 #endif //FILTER_EXPRESSION_TOOLBAR_H
Definition: drag_drop_toolbar.h:19
Definition: filter_expression_toolbar.h:20
Definition: wireshark_mime_data.h:15