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