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();
109 virtual QList<QStandardItem *>
valueWalker(ExtcapValueList list, QStringList &defaults);
139 QTreeView * treeView;
166 virtual QString
value();
202 void addChecked(QStringList checked, QStringList options);
225 QStandardItemModel* tableViewModel;
228 QTableView* tableView;
231 QVBoxLayout* paneLayout;
Represents an extcap argument that allows selecting multiple values via a tree view.
Definition extcap_argument_multiselect.h:57
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
QStandardItemModel * viewModel
Definition extcap_argument_multiselect.h:132
virtual QString value()
Retrieves the currently selected values.
Definition extcap_argument_multiselect.cpp:205
void checkItemsWalker(QStandardItem *item, QStringList defaults)
Traverses and checks items recursively based on default values.
Definition extcap_argument_multiselect.cpp:78
virtual QString defaultValue()
Retrieves the default values for the selector.
Definition extcap_argument_multiselect.cpp:232
virtual void setDefaultValue()
Sets the selector to its default values.
Definition extcap_argument_multiselect.cpp:247
virtual bool isValid()
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
virtual QWidget * createEditor(QWidget *parent)
Creates the editor widget for the multi-select argument.
Definition extcap_argument_multiselect.cpp:111
QMap< QString, QString > displayNames
Definition extcap_argument_multiselect.h:135
virtual bool isSetDefaultValueSupported()
Checks if setting default values is supported.
Definition extcap_argument_multiselect.cpp:242
A dialog for adding new entries to an ExtArgTable.
Definition extcap_argument_multiselect.h:241
Represents an extcap argument displayed as an editable table.
Definition extcap_argument_multiselect.h:146
virtual QWidget * createEditor(QWidget *parent)
Creates the editor widget for the table argument.
Definition extcap_argument_multiselect.cpp:292
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
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
void removeSelected()
Removes the currently selected entries from the table.
Definition extcap_argument_multiselect.cpp:470
virtual QString value()
Retrieves the serialized string representing the table's values.
Definition extcap_argument_multiselect.cpp:353
virtual void setDefaultValue()
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
Base class representing a command line argument for an extcap utility.
Definition extcap_argument.h:127
virtual extcap_arg * argument()
Retrieves the underlying extcap_arg structure.
Definition extcap_argument.h:173
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
A fully parsed extcap argument sentence with all its associated options.
Definition extcap_parser.h:118