A QgsSingleItemModel subclass which contains a single read-only item.
More...
#include <qgssingleitemmodel.h>
|
| 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. More...
|
|
| 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. More...
|
|
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.
- Since
- QGIS 3.26
Definition at line 31 of file qgssingleitemmodel.h.
◆ QgsSingleItemModel() [1/2]
QgsSingleItemModel::QgsSingleItemModel |
( |
QObject * |
parent = nullptr , |
|
|
const QString & |
text = QString() , |
|
|
const QMap< int, QVariant > & |
data = QMap< int, QVariant >() , |
|
|
Qt::ItemFlags |
flags = Qt::NoItemFlags |
|
) |
| |
|
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 19 of file qgssingleitemmodel.cpp.
◆ QgsSingleItemModel() [2/2]
QgsSingleItemModel::QgsSingleItemModel |
( |
QObject * |
parent, |
|
|
const QList< QMap< int, QVariant > > & |
columnData, |
|
|
Qt::ItemFlags |
flags = Qt::NoItemFlags |
|
) |
| |
|
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 28 of file qgssingleitemmodel.cpp.
◆ columnCount()
int QgsSingleItemModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ data()
QVariant QgsSingleItemModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
◆ flags()
Qt::ItemFlags QgsSingleItemModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ index()
QModelIndex QgsSingleItemModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
◆ parent()
QModelIndex QgsSingleItemModel::parent |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ rowCount()
int QgsSingleItemModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
The documentation for this class was generated from the following files: