QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
A QgsSingleItemModel subclass which contains a single read-only item. More...
#include <qgssingleitemmodel.h>
Public Member Functions | |
QgsSingleItemModel (QObject *parent, const QList< QMap< int, QVariant > > &columnData, Qt::ItemFlags flags=Qt::NoItemFlags) | |
Constructor for a multi-column QgsSingleItemModel with the specified parent object. | |
QgsSingleItemModel (QObject *parent=nullptr, const QString &text=QString(), const QMap< int, QVariant > &data=QMap< int, QVariant >(), Qt::ItemFlags flags=Qt::NoItemFlags) | |
Constructor for QgsSingleItemModel with the specified parent object and display text. | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | parent (const QModelIndex &index) const override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
A QgsSingleItemModel subclass which contains a single read-only item.
Definition at line 31 of file qgssingleitemmodel.h.
|
explicit |
Constructor for QgsSingleItemModel with the specified parent object and display text.
The data map specifies the data which should be returned for the specified roles, where map keys are Qt item roles.
Custom flags can also be specified for the item.
Definition at line 20 of file qgssingleitemmodel.cpp.
|
explicit |
Constructor for a multi-column QgsSingleItemModel with the specified parent object.
The columnData list specifies the data which should be returned for the specified roles for each column in the model, where each entry in the list must be a QMap of Qt item role to value.
Custom flags can also be specified for the item.
Definition at line 29 of file qgssingleitemmodel.cpp.
|
override |
Definition at line 103 of file qgssingleitemmodel.cpp.
|
override |
Definition at line 36 of file qgssingleitemmodel.cpp.
|
override |
Definition at line 64 of file qgssingleitemmodel.cpp.
|
override |
Definition at line 76 of file qgssingleitemmodel.cpp.
|
override |
Definition at line 89 of file qgssingleitemmodel.cpp.
|
override |
Definition at line 94 of file qgssingleitemmodel.cpp.