QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
An abstract base class for icon generators for a QgsStyleModel. More...
#include <qgsstylemodel.h>
Signals | |
void | iconGenerated (QgsStyle::StyleEntity type, const QString &name, const QIcon &icon) |
Emitted when the icon for the style entity with matching type and name has been generated. | |
Public Member Functions | |
QgsAbstractStyleEntityIconGenerator (QObject *parent) | |
Constructor for QgsAbstractStyleEntityIconGenerator, with the specified parent object. | |
virtual void | generateIcon (QgsStyle *style, QgsStyle::StyleEntity type, const QString &name)=0 |
Triggers generation of an icon for an entity from the specified style database, with matching entity type and name. | |
QList< QSize > | iconSizes () const |
Returns the list of icon sizes to generate. | |
void | setIconSizes (const QList< QSize > &sizes) |
Sets the list of icon sizes to generate. | |
void | setTargetScreenProperties (const QSet< QgsScreenProperties > &properties) |
Sets the target screen properties to use when generating icons. | |
QSet< QgsScreenProperties > | targetScreenProperties () const |
Returns the target screen properties to use when generating icons. | |
An abstract base class for icon generators for a QgsStyleModel.
This base class allows for creation of specialized icon generators for entities in a style database, and allows for deferred icon generation.
Definition at line 44 of file qgsstylemodel.h.
QgsAbstractStyleEntityIconGenerator::QgsAbstractStyleEntityIconGenerator | ( | QObject * | parent | ) |
Constructor for QgsAbstractStyleEntityIconGenerator, with the specified parent object.
Definition at line 39 of file qgsstylemodel.cpp.
|
pure virtual |
Triggers generation of an icon for an entity from the specified style database, with matching entity type and name.
|
signal |
Emitted when the icon for the style entity with matching type and name has been generated.
QList< QSize > QgsAbstractStyleEntityIconGenerator::iconSizes | ( | ) | const |
Returns the list of icon sizes to generate.
Definition at line 49 of file qgsstylemodel.cpp.
void QgsAbstractStyleEntityIconGenerator::setIconSizes | ( | const QList< QSize > & | sizes | ) |
Sets the list of icon sizes to generate.
Definition at line 44 of file qgsstylemodel.cpp.
void QgsAbstractStyleEntityIconGenerator::setTargetScreenProperties | ( | const QSet< QgsScreenProperties > & | properties | ) |
Sets the target screen properties to use when generating icons.
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 54 of file qgsstylemodel.cpp.
QSet< QgsScreenProperties > QgsAbstractStyleEntityIconGenerator::targetScreenProperties | ( | ) | const |
Returns the target screen properties to use when generating icons.
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 59 of file qgsstylemodel.cpp.