QStandardItemModel subclass which makes all items checkable by default.
More...
#include <qgscheckablecombobox.h>
|
void | itemCheckStateChanged (const QModelIndex &index) |
| Emitted whenever the item's checkstate has changed.
|
|
|
| QgsCheckableItemModel (QObject *parent=nullptr) |
| Constructor for QgsCheckableItemModel.
|
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| Returns the data stored under the given role for the item referred to by the index.
|
|
Qt::ItemFlags | flags (const QModelIndex &index) const override |
| Returns a combination of the item flags: items are enabled (ItemIsEnabled), selectable (ItemIsSelectable) and checkable (ItemIsUserCheckable).
|
|
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| Sets the role data for the item at index to value.
|
|
QStandardItemModel subclass which makes all items checkable by default.
- Note
- not available in Python bindings
Definition at line 40 of file qgscheckablecombobox.h.
◆ QgsCheckableItemModel()
QgsCheckableItemModel::QgsCheckableItemModel |
( |
QObject * |
parent = nullptr | ) |
|
◆ data()
QVariant QgsCheckableItemModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
Returns the data stored under the given role for the item referred to by the index.
- Parameters
-
index | item index |
role | data role |
Definition at line 39 of file qgscheckablecombobox.cpp.
◆ flags()
Qt::ItemFlags QgsCheckableItemModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Returns a combination of the item flags: items are enabled (ItemIsEnabled), selectable (ItemIsSelectable) and checkable (ItemIsUserCheckable).
- Parameters
-
Definition at line 34 of file qgscheckablecombobox.cpp.
◆ itemCheckStateChanged
void QgsCheckableItemModel::itemCheckStateChanged |
( |
const QModelIndex & |
index | ) |
|
|
signal |
Emitted whenever the item's checkstate has changed.
◆ setData()
bool QgsCheckableItemModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
Sets the role data for the item at index to value.
- Parameters
-
index | item index |
value | data value |
role | data role |
- Returns
true
on success, false
otherwise
Definition at line 51 of file qgscheckablecombobox.cpp.
The documentation for this class was generated from the following files: