QGIS API Documentation  2.99.0-Master (b058df7)
Signals | Public Member Functions | List of all members
QgsCheckableItemModel Class Reference

QStandardItemModel subclass which makes all items checkable by default. More...

#include <qgscheckablecombobox.h>

Inheritance diagram for QgsCheckableItemModel:
Inheritance graph
[legend]

Signals

void itemCheckStateChanged ()
 This signal is emitted whenever the items checkstate has changed. More...
 

Public Member Functions

 QgsCheckableItemModel (QObject *parent=nullptr)
 Constructor for QgsCheckableItemModel. More...
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Returns the data stored under the given role for the item referred to by the index. More...
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 Returns a combination of the item flags: items are enabled (ItemIsEnabled), selectable (ItemIsSelectable) and checkable (ItemIsUserCheckable). More...
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 Sets the role data for the item at index to value. More...
 

Detailed Description

QStandardItemModel subclass which makes all items checkable by default.

Since
QGIS 3.0
Note
not available in Python bindings

Definition at line 40 of file qgscheckablecombobox.h.

Constructor & Destructor Documentation

◆ QgsCheckableItemModel()

QgsCheckableItemModel::QgsCheckableItemModel ( QObject *  parent = nullptr)

Constructor for QgsCheckableItemModel.

Parameters
parentparent object

Definition at line 27 of file qgscheckablecombobox.cpp.

Member Function Documentation

◆ data()

QVariant QgsCheckableItemModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Returns the data stored under the given role for the item referred to by the index.

Parameters
indexitem index
roledata role

Definition at line 37 of file qgscheckablecombobox.cpp.

◆ flags()

Qt::ItemFlags QgsCheckableItemModel::flags ( const QModelIndex &  index) const
virtual

Returns a combination of the item flags: items are enabled (ItemIsEnabled), selectable (ItemIsSelectable) and checkable (ItemIsUserCheckable).

Parameters
indexitem index

Definition at line 32 of file qgscheckablecombobox.cpp.

◆ itemCheckStateChanged

void QgsCheckableItemModel::itemCheckStateChanged ( )
signal

This signal is emitted whenever the items checkstate has changed.

◆ setData()

bool QgsCheckableItemModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual

Sets the role data for the item at index to value.

Parameters
indexitem index
valuedata value
roledata role
Returns
true on success, false otherwise

Definition at line 49 of file qgscheckablecombobox.cpp.


The documentation for this class was generated from the following files: