QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
A model which contains entities from multiple QgsStyle databases. More...
#include <qgscombinedstylemodel.h>
Public Member Functions | |
QgsCombinedStyleModel (QObject *parent=nullptr) | |
Constructor for QgsCombinedStyleModel with the specified parent object. | |
void | addDefaultStyle () |
Adds the default style (QgsStyle::defaultStyle()) to the model. | |
void | addDesiredIconSize (QSize size) |
Adds an additional icon size to generate for Qt::DecorationRole data. | |
void | addStyle (QgsStyle *style) |
Adds a style to the model. | |
void | addTargetScreenProperties (const QgsScreenProperties &properties) |
Adds additional target screen properties to use when generating icons for Qt::DecorationRole data. | |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
void | removeStyle (QgsStyle *style) |
Removes a style from the model. | |
QList< QgsStyle * > | styles () const |
Returns a list of all styles shown in the model. | |
A model which contains entities from multiple QgsStyle databases.
Definition at line 39 of file qgscombinedstylemodel.h.
|
explicit |
Constructor for QgsCombinedStyleModel with the specified parent object.
Definition at line 22 of file qgscombinedstylemodel.cpp.
void QgsCombinedStyleModel::addDefaultStyle | ( | ) |
Adds the default style (QgsStyle::defaultStyle()) to the model.
Definition at line 106 of file qgscombinedstylemodel.cpp.
void QgsCombinedStyleModel::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.
Definition at line 151 of file qgscombinedstylemodel.cpp.
void QgsCombinedStyleModel::addStyle | ( | QgsStyle * | style | ) |
Adds a style to the model.
Ownership of style is not transferred.
Definition at line 33 of file qgscombinedstylemodel.cpp.
void QgsCombinedStyleModel::addTargetScreenProperties | ( | const QgsScreenProperties & | properties | ) |
Adds additional target screen properties to use when generating icons for Qt::DecorationRole data.
This allows style icons to be generated at an icon device pixel ratio and DPI which corresponds exactly to the view's screen properties in which this model is used.
Definition at line 167 of file qgscombinedstylemodel.cpp.
|
override |
Definition at line 28 of file qgscombinedstylemodel.cpp.
void QgsCombinedStyleModel::removeStyle | ( | QgsStyle * | style | ) |
Removes a style from the model.
Definition at line 88 of file qgscombinedstylemodel.cpp.
QList< QgsStyle * > QgsCombinedStyleModel::styles | ( | ) | const |
Returns a list of all styles shown in the model.
Definition at line 146 of file qgscombinedstylemodel.cpp.