QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
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 40 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 50 of file qgsstylemodel.cpp.
void QgsAbstractStyleEntityIconGenerator::setIconSizes | ( | const QList< QSize > & | sizes | ) |
Sets the list of icon sizes to generate.
Definition at line 45 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 55 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 60 of file qgsstylemodel.cpp.