QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
QgsAbstractStyleEntityIconGenerator Class Referenceabstract

An abstract base class for icon generators for a QgsStyleModel. More...

#include <qgsstylemodel.h>

Inheritance diagram for QgsAbstractStyleEntityIconGenerator:
Inheritance graph
[legend]

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< QgsScreenPropertiestargetScreenProperties () const
 Returns the target screen properties to use when generating icons.
 

Detailed Description

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.

Note
Not available in Python bindings
Since
QGIS 3.16

Definition at line 44 of file qgsstylemodel.h.

Constructor & Destructor Documentation

◆ QgsAbstractStyleEntityIconGenerator()

QgsAbstractStyleEntityIconGenerator::QgsAbstractStyleEntityIconGenerator ( QObject *  parent)

Constructor for QgsAbstractStyleEntityIconGenerator, with the specified parent object.

Definition at line 40 of file qgsstylemodel.cpp.

Member Function Documentation

◆ generateIcon()

virtual void QgsAbstractStyleEntityIconGenerator::generateIcon ( QgsStyle style,
QgsStyle::StyleEntity  type,
const QString &  name 
)
pure virtual

Triggers generation of an icon for an entity from the specified style database, with matching entity type and name.

◆ iconGenerated

void QgsAbstractStyleEntityIconGenerator::iconGenerated ( QgsStyle::StyleEntity  type,
const QString &  name,
const QIcon &  icon 
)
signal

Emitted when the icon for the style entity with matching type and name has been generated.

◆ iconSizes()

QList< QSize > QgsAbstractStyleEntityIconGenerator::iconSizes ( ) const

Returns the list of icon sizes to generate.

See also
setIconSizes()

Definition at line 50 of file qgsstylemodel.cpp.

◆ setIconSizes()

void QgsAbstractStyleEntityIconGenerator::setIconSizes ( const QList< QSize > &  sizes)

Sets the list of icon sizes to generate.

See also
iconSizes()

Definition at line 45 of file qgsstylemodel.cpp.

◆ setTargetScreenProperties()

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.

See also
targetScreenProperties()
Since
QGIS 3.32

Definition at line 55 of file qgsstylemodel.cpp.

◆ targetScreenProperties()

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.

See also
setTargetScreenProperties()
Since
QGIS 3.32

Definition at line 60 of file qgsstylemodel.cpp.


The documentation for this class was generated from the following files: