QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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. More...
 

Public Member Functions

 QgsAbstractStyleEntityIconGenerator (QObject *parent)
 Constructor for QgsAbstractStyleEntityIconGenerator, with the specified parent object. More...
 
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. More...
 
QList< QSize > iconSizes () const
 Returns the list of icon sizes to generate. More...
 
void setIconSizes (const QList< QSize > &sizes)
 Sets the list of icon sizes to generate. More...
 

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 39 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.


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