QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Model for layer style categories. More...
#include <qgsmaplayerstylecategoriesmodel.h>
Public Types | |
enum class | Role : int { NameRole = Qt::UserRole + 1 } |
Custom model roles. More... | |
Public Member Functions | |
QgsMapLayerStyleCategoriesModel (Qgis::LayerType type, QObject *parent=nullptr) | |
Constructor for QgsMapLayerStyleCategoriesModel, for the specified layer type. | |
QgsMapLayer::StyleCategories | categories () const |
Returns the categories as defined in the model. | |
int | columnCount (const QModelIndex &=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role) const override |
Qt::ItemFlags | flags (const QModelIndex &) const override |
int | rowCount (const QModelIndex &=QModelIndex()) const override |
void | setCategories (QgsMapLayer::StyleCategories categories) |
Reset the model data. | |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
void | setShowAllCategories (bool showAll) |
Defines if the model should list the AllStyleCategories entry. | |
Model for layer style categories.
Definition at line 32 of file qgsmaplayerstylecategoriesmodel.h.
|
strong |
Custom model roles.
Enumerator | |
---|---|
NameRole |
Definition at line 39 of file qgsmaplayerstylecategoriesmodel.h.
|
explicit |
Constructor for QgsMapLayerStyleCategoriesModel, for the specified layer type.
Definition at line 20 of file qgsmaplayerstylecategoriesmodel.cpp.
QgsMapLayer::StyleCategories QgsMapLayerStyleCategoriesModel::categories | ( | ) | const |
Returns the categories as defined in the model.
Definition at line 73 of file qgsmaplayerstylecategoriesmodel.cpp.
|
override |
Definition at line 93 of file qgsmaplayerstylecategoriesmodel.cpp.
|
override |
Definition at line 98 of file qgsmaplayerstylecategoriesmodel.cpp.
|
override |
Definition at line 487 of file qgsmaplayerstylecategoriesmodel.cpp.
|
override |
Definition at line 85 of file qgsmaplayerstylecategoriesmodel.cpp.
void QgsMapLayerStyleCategoriesModel::setCategories | ( | QgsMapLayer::StyleCategories | categories | ) |
Reset the model data.
Definition at line 63 of file qgsmaplayerstylecategoriesmodel.cpp.
|
override |
Definition at line 462 of file qgsmaplayerstylecategoriesmodel.cpp.
void QgsMapLayerStyleCategoriesModel::setShowAllCategories | ( | bool | showAll | ) |
Defines if the model should list the AllStyleCategories entry.
Definition at line 78 of file qgsmaplayerstylecategoriesmodel.cpp.