update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / qt / extcap_argument_multiselect.h
blobb64573df52a9dd1f2259e8cf047ab4bf8653cc56
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_
11 #define UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_
13 #include <QObject>
14 #include <QWidget>
15 #include <QStandardItem>
16 #include <QTreeView>
17 #include <QAbstractItemModel>
18 #include <QItemSelection>
20 #include <extcap_parser.h>
21 #include <extcap_argument.h>
23 class ExtArgMultiSelect : public ExtcapArgument
25 Q_OBJECT
26 public:
27 ExtArgMultiSelect(extcap_arg * argument, QObject *parent = Q_NULLPTR);
28 virtual ~ExtArgMultiSelect();
30 virtual QString value();
31 virtual bool isValid();
32 virtual QString defaultValue();
33 virtual bool isSetDefaultValueSupported();
35 public Q_SLOTS:
36 virtual void setDefaultValue();
38 protected:
39 virtual QList<QStandardItem *> valueWalker(ExtcapValueList list, QStringList &defaults);
40 void checkItemsWalker(QStandardItem * item, QStringList defaults);
41 virtual QWidget * createEditor(QWidget * parent);
43 private Q_SLOTS:
45 void itemChanged(QStandardItem *);
47 private:
49 QTreeView * treeView;
50 QAbstractItemModel * viewModel;
54 #endif /* UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_ */