diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /ui/qt/extcap_argument_multiselect.h | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ui/qt/extcap_argument_multiselect.h')
-rw-r--r-- | ui/qt/extcap_argument_multiselect.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/ui/qt/extcap_argument_multiselect.h b/ui/qt/extcap_argument_multiselect.h new file mode 100644 index 00000000..b64573df --- /dev/null +++ b/ui/qt/extcap_argument_multiselect.h @@ -0,0 +1,54 @@ +/** @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_EXTCAP_ARGUMENT_MULTISELECT_H_ +#define UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_ + +#include <QObject> +#include <QWidget> +#include <QStandardItem> +#include <QTreeView> +#include <QAbstractItemModel> +#include <QItemSelection> + +#include <extcap_parser.h> +#include <extcap_argument.h> + +class ExtArgMultiSelect : public ExtcapArgument +{ + Q_OBJECT +public: + ExtArgMultiSelect(extcap_arg * argument, QObject *parent = Q_NULLPTR); + virtual ~ExtArgMultiSelect(); + + virtual QString value(); + virtual bool isValid(); + virtual QString defaultValue(); + virtual bool isSetDefaultValueSupported(); + +public Q_SLOTS: + virtual void setDefaultValue(); + +protected: + virtual QList<QStandardItem *> valueWalker(ExtcapValueList list, QStringList &defaults); + void checkItemsWalker(QStandardItem * item, QStringList defaults); + virtual QWidget * createEditor(QWidget * parent); + +private Q_SLOTS: + + void itemChanged(QStandardItem *); + +private: + + QTreeView * treeView; + QAbstractItemModel * viewModel; + +}; + +#endif /* UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_ */ |