QgsStyleModel class
A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle database.
Contents
Public types
Constructors, destructors, conversion operators
- QgsStyleModel(QgsStyle* style, QObject* parent = nullptr) explicit
- Constructor for QgsStyleModel, for the specified style and parent object.
Public functions
- void addDesiredIconSize(QSize size)
- Adds an additional icon size to generate for Qt::DecorationRole data.
Enum documentation
enum QgsStyleModel:: Role
Custom model roles.
| Enumerators | |
|---|---|
| TypeRole |
Style entity type, see QgsStyle:: |
| TagRole |
String list of tags. |
| SymbolTypeRole |
Symbol type (for symbol entities) |
Function documentation
QgsStyleModel:: QgsStyleModel(QgsStyle* style,
QObject* parent = nullptr) explicit
Constructor for QgsStyleModel, for the specified style and parent object.
The style object must exist for the lifetime of this model.
void QgsStyleModel:: addDesiredIconSize(QSize size)
Adds an additional icon size to generate for Qt::DecorationRole data.
This allows style icons to be generated at an icon size which corresponds exactly to the view's icon size in which this model is used.