| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
extcap_argument_multiselect.h
Go to the documentation of this file.
1
10#ifndef UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_
11#define UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_
12
13#include <QObject>
14#include <QWidget>
15#include <QStandardItem>
16#include <QTreeView>
17#include <QAbstractItemModel>
18#include <QItemSelection>
19#include <QLineEdit>
20#include <QPushButton>
21#include <QAction>
22#include <QTableView>
23#include <QToolBar>
24#include <QDialog>
25#include <QMap>
26
27#include <extcap_parser.h>
28#include <extcap_argument.h>
29
30#include "extcap_options_dialog.h"
31
32 class ExtArgMultiSelect : public ExtcapArgument
33{
34 Q_OBJECT
35public:
36 ExtArgMultiSelect(extcap_arg * argument, QObject *parent = Q_NULLPTR);
37 virtual ~ExtArgMultiSelect();
38
39 virtual QString value();
40 virtual bool isValid();
41 virtual QString defaultValue();
42 virtual bool isSetDefaultValueSupported();
43
44public Q_SLOTS:
45 virtual void setDefaultValue();
46
47protected:
48 virtual QList<QStandardItem *> valueWalker(ExtcapValueList list, QStringList &defaults);
49 void checkItemsWalker(QStandardItem * item, QStringList defaults);
50 virtual QWidget * createEditor(QWidget * parent);
51 virtual QStringList checkedValues();
52 QStandardItemModel* viewModel;
53 /* This stores the displays associated with a value */
54 QMap<QString, QString> displayNames;
55
56private:
57 QTreeView * treeView;
58
59};
60
61
62 class ExtArgTable : public ExtArgMultiSelect
63{
64 Q_OBJECT
65
66public:
67 ExtArgTable(extcap_arg* argument, QObject* parent = Q_NULLPTR);
68 virtual ~ExtArgTable();
69
70 virtual QString value();
71
72public Q_SLOTS:
73 virtual void setDefaultValue();
74
75protected:
76 virtual QWidget* createEditor(QWidget* parent);
77 void addKnown();
78 void addCustom();
79 void removeSelected();
80 void addChecked(QStringList checked, QStringList options);
81 virtual void showExtcapOptionsDialogForOptionValue(QStandardItem* item, QString& option_value);
82 virtual void extcap_options_finished(QStandardItem* item);
83
84private:
85 ExtcapOptionsDialog* extcap_options_dialog;
86 QDialog* addDialog;
87
88 QStandardItemModel* tableViewModel;
89 QTableView* tableView;
90
91 QVBoxLayout* paneLayout;
92 QToolBar* toolbar;
93};
94
95 class ExtArgTableAddDialog : public QDialog
96{
97 Q_OBJECT
98
99public:
100 ExtArgTableAddDialog(QWidget* parent, QWidget* selector);
101};
102
103#endif /* UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_ */
ExtArgMultiSelect
Definition extcap_argument_multiselect.h:33
ExtArgTableAddDialog
Definition extcap_argument_multiselect.h:96
ExtArgTable
Definition extcap_argument_multiselect.h:63
ExtcapArgument
Definition extcap_argument.h:71
ExtcapOptionsDialog
Definition extcap_options_dialog.h:33
extcap_argument.h
extcap_options_dialog.h
extcap_parser.h
_extcap_arg
Definition extcap_parser.h:106