blob: 3ea9d4486e0a4f29f2155e07ca6debe8b4dd5e37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/** @file
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef UI_QT_ADDITIONAL_TOOLBAR_H_
#define UI_QT_ADDITIONAL_TOOLBAR_H_
#include <epan/plugin_if.h>
#include <QToolBar>
#include <QWidgetAction>
/* Class for all display widgets.
*
* Inherits QWidgetAction, otherwise the extension popup might not work for the toolbar
*/
class AdditionalToolbarWidgetAction: public QWidgetAction
{
Q_OBJECT
public:
AdditionalToolbarWidgetAction(QObject * parent = 0);
AdditionalToolbarWidgetAction(ext_toolbar_t * item, QObject * parent = 0);
AdditionalToolbarWidgetAction(const AdditionalToolbarWidgetAction & copy_object);
~AdditionalToolbarWidgetAction();
protected:
virtual QWidget * createWidget(QWidget * parent);
static const char * propertyName;
private:
ext_toolbar_t * toolbar_item;
QWidget * createButton(ext_toolbar_t * item, QWidget * parent);
QWidget * createBoolean(ext_toolbar_t * item, QWidget * parent);
QWidget * createTextEditor(ext_toolbar_t * item, QWidget * parent);
QWidget * createSelector(ext_toolbar_t * item, QWidget * parent);
QWidget * createLabelFrame(ext_toolbar_t * item, QWidget * parent);
ext_toolbar_t * extractToolbarItemFromObject(QObject *);
private slots:
void onButtonClicked();
void onCheckBoxChecked(int);
void sendTextToCallback();
void onSelectionInWidgetChanged(int idx);
void captureActive(int);
};
class AdditionalToolBar: public QToolBar
{
Q_OBJECT
public:
AdditionalToolBar(ext_toolbar_t * toolbar, QWidget * parent = 0);
virtual ~AdditionalToolBar();
static AdditionalToolBar * create(QWidget * parent, ext_toolbar_t * toolbar);
QString menuName();
private:
ext_toolbar_t * toolbar;
};
#endif /* UI_QT_ADDITIONAL_TOOLBAR_H_ */
|