10#ifndef UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_
11#define UI_QT_EXTCAP_ARGUMENT_MULTISELECT_H_
15#include <QStandardItem>
17#include <QAbstractItemModel>
18#include <QItemSelection>
26#include <QSortFilterProxyModel>
45 bool filterAcceptsRow(
int sourceRow,
const QModelIndex& sourceParent)
const override;
50 using QSortFilterProxyModel::QSortFilterProxyModel;
76 virtual QString
value()
override;
82 virtual bool isValid()
override;
109 virtual QList<QStandardItem *>
valueWalker(ExtcapValueList list, QStringList &defaults);
123 virtual QWidget *
createEditor(QWidget * parent)
override;
139 QTreeView * treeView;
166 virtual QString
value()
override;
180 virtual QWidget*
createEditor(QWidget* parent)
override;
202 void addChecked(QStringList checked, QStringList options);
225 QStandardItemModel* tableViewModel;
228 QTableView* tableView;
231 QVBoxLayout* paneLayout;
virtual QList< QStandardItem * > valueWalker(ExtcapValueList list, QStringList &defaults)
Traverses the value list to create standard items.
Definition extcap_argument_multiselect.cpp:40
virtual ~ExtArgMultiSelect()
Destroys the ExtArgMultiSelect.
Definition extcap_argument_multiselect.cpp:35
virtual QString value() override
Retrieves the currently selected values.
Definition extcap_argument_multiselect.cpp:205
virtual bool isSetDefaultValueSupported() override
Checks if setting default values is supported.
Definition extcap_argument_multiselect.cpp:242
QStandardItemModel * viewModel
Definition extcap_argument_multiselect.h:132
void checkItemsWalker(QStandardItem *item, QStringList defaults)
Traverses and checks items recursively based on default values.
Definition extcap_argument_multiselect.cpp:78
ExtArgMultiSelect(extcap_arg *argument, QObject *parent=Q_NULLPTR)
Constructs an ExtArgMultiSelect.
Definition extcap_argument_multiselect.cpp:32
virtual QString defaultValue() override
Retrieves the default values for the selector.
Definition extcap_argument_multiselect.cpp:232
virtual bool isValid() override
Checks if the current selection is valid.
Definition extcap_argument_multiselect.cpp:210
virtual QStringList checkedValues()
Retrieves a list of all currently checked values.
Definition extcap_argument_multiselect.cpp:182
QMap< QString, QString > displayNames
Definition extcap_argument_multiselect.h:135
virtual QWidget * createEditor(QWidget *parent) override
Creates the editor widget for the multi-select argument.
Definition extcap_argument_multiselect.cpp:111
virtual void setDefaultValue() override
Sets the selector to its default values.
Definition extcap_argument_multiselect.cpp:247
ExtArgTableAddDialog(QWidget *parent, QWidget *selector)
Constructs a new ExtArgTableAddDialog.
Definition extcap_argument_multiselect.cpp:275
virtual void showExtcapOptionsDialogForOptionValue(QStandardItem *item, QString &option_value)
Displays the extcap options dialog for a specific item.
Definition extcap_argument_multiselect.cpp:480
virtual ~ExtArgTable()
Destroys the ExtArgTable.
Definition extcap_argument_multiselect.cpp:262
ExtArgTable(extcap_arg *argument, QObject *parent=Q_NULLPTR)
Constructs an ExtArgTable.
Definition extcap_argument_multiselect.cpp:259
void addCustom()
Opens a dialog to add a custom entry to the table.
Definition extcap_argument_multiselect.cpp:452
virtual void extcap_options_finished(QStandardItem *item)
Handles the completion of the extcap options dialog.
Definition extcap_argument_multiselect.cpp:521
void addChecked(QStringList checked, QStringList options)
Adds a list of checked items to the table.
Definition extcap_argument_multiselect.cpp:374
virtual QString value() override
Retrieves the serialized string representing the table's values.
Definition extcap_argument_multiselect.cpp:353
virtual QWidget * createEditor(QWidget *parent) override
Creates the editor widget for the table argument.
Definition extcap_argument_multiselect.cpp:292
void removeSelected()
Removes the currently selected entries from the table.
Definition extcap_argument_multiselect.cpp:470
virtual void setDefaultValue() override
Sets the table to its default state.
Definition extcap_argument_multiselect.cpp:425
void addKnown()
Adds a known entry to the table.
Definition extcap_argument_multiselect.cpp:437
virtual extcap_arg * argument()
Retrieves the underlying extcap_arg structure.
Definition extcap_argument.h:173
ExtcapArgument(QObject *parent=Q_NULLPTR)
Constructs an empty ExtcapArgument.
Definition extcap_argument.cpp:755
A dialog for configuring extcap device options.
Definition extcap_options_dialog.h:36
A proxy model that filters rows in a tree structure.
Definition extcap_argument_multiselect.h:37
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
Determines if a row from the source model should be included.
Definition extcap_argument_multiselect.cpp:172
struct _extcap_arg extcap_arg
A fully parsed extcap argument sentence with all its associated options.