Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
additional_toolbar.h
Go to the documentation of this file.
1
10#ifndef UI_QT_ADDITIONAL_TOOLBAR_H_
11#define UI_QT_ADDITIONAL_TOOLBAR_H_
12
13#include <epan/plugin_if.h>
14
15#include <QToolBar>
16#include <QWidgetAction>
17
18/* Class for all display widgets.
19 *
20 * Inherits QWidgetAction, otherwise the extension popup might not work for the toolbar
21 */
22class AdditionalToolbarWidgetAction: public QWidgetAction
23{
24 Q_OBJECT
25
26public:
27
28 AdditionalToolbarWidgetAction(QObject * parent = 0);
29 AdditionalToolbarWidgetAction(ext_toolbar_t * item, QObject * parent = 0);
32
33protected:
34 virtual QWidget * createWidget(QWidget * parent);
35
36 static const char * propertyName;
37
38private:
39
40 ext_toolbar_t * toolbar_item;
41
42 QWidget * createButton(ext_toolbar_t * item, QWidget * parent);
43 QWidget * createBoolean(ext_toolbar_t * item, QWidget * parent);
44 QWidget * createTextEditor(ext_toolbar_t * item, QWidget * parent);
45 QWidget * createSelector(ext_toolbar_t * item, QWidget * parent);
46
47 QWidget * createLabelFrame(ext_toolbar_t * item, QWidget * parent);
48
49 ext_toolbar_t * extractToolbarItemFromObject(QObject *);
50
51private slots:
52 void onButtonClicked();
53#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
54 void onCheckBoxChecked(Qt::CheckState);
55#else
56 void onCheckBoxChecked(int);
57#endif
58 void sendTextToCallback();
59 void onSelectionInWidgetChanged(int idx);
60
61 void captureActive(int);
62};
63
64class AdditionalToolBar: public QToolBar
65{
66 Q_OBJECT
67
68public:
69 AdditionalToolBar(ext_toolbar_t * toolbar, QWidget * parent = 0);
70 virtual ~AdditionalToolBar();
71
72 static AdditionalToolBar * create(QWidget * parent, ext_toolbar_t * toolbar);
73
74 QString menuName();
75
76private:
77 ext_toolbar_t * toolbar;
78};
79
80#endif /* UI_QT_ADDITIONAL_TOOLBAR_H_ */
Definition additional_toolbar.h:65
Definition additional_toolbar.h:23
Definition plugin_if.h:101