QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Registry of available paint effects. More...
#include <qgspainteffectregistry.h>
Public Member Functions | |
QgsPaintEffectRegistry () | |
QgsPaintEffectRegistry (const QgsPaintEffectRegistry &rh)=delete | |
~QgsPaintEffectRegistry () | |
bool | addEffectType (QgsPaintEffectAbstractMetadata *metadata) |
Registers a new effect type. | |
QgsPaintEffect * | createEffect (const QDomElement &element) const |
Creates a new paint effect given a DOM element storing paint effect properties. | |
QgsPaintEffect * | createEffect (const QString &name, const QVariantMap &properties=QVariantMap()) const |
Creates a new paint effect given the effect name and properties map. | |
QgsPaintEffectAbstractMetadata * | effectMetadata (const QString &name) const |
Returns the metadata for a specific effect. | |
QStringList | effects () const |
Returns a list of known paint effects. | |
QgsPaintEffectRegistry & | operator= (const QgsPaintEffectRegistry &rh)=delete |
Static Public Member Functions | |
static QgsPaintEffect * | defaultStack () |
Returns a new effect stack consisting of a sensible selection of default effects. | |
static bool | isDefaultStack (QgsPaintEffect *effect) |
Tests whether a paint effect matches the default effects stack. | |
Registry of available paint effects.
QgsPaintEffectRegistry is not usually directly created, but rather accessed through QgsApplication::paintEffectRegistry().
Definition at line 172 of file qgspainteffectregistry.h.
QgsPaintEffectRegistry::QgsPaintEffectRegistry | ( | ) |
Definition at line 32 of file qgspainteffectregistry.cpp.
QgsPaintEffectRegistry::~QgsPaintEffectRegistry | ( | ) |
Definition at line 55 of file qgspainteffectregistry.cpp.
|
delete |
bool QgsPaintEffectRegistry::addEffectType | ( | QgsPaintEffectAbstractMetadata * | metadata | ) |
Registers a new effect type.
metadata | effect metadata. Ownership is transferred to the registry. |
true
if add was successful. Definition at line 68 of file qgspainteffectregistry.cpp.
QgsPaintEffect * QgsPaintEffectRegistry::createEffect | ( | const QDomElement & | element | ) | const |
Creates a new paint effect given a DOM element storing paint effect properties.
element | encoded DOM element of effect properties |
nullptr
if matching paint effect could not be created Definition at line 86 of file qgspainteffectregistry.cpp.
QgsPaintEffect * QgsPaintEffectRegistry::createEffect | ( | const QString & | name, |
const QVariantMap & | properties = QVariantMap() |
||
) | const |
Creates a new paint effect given the effect name and properties map.
name | unique name representing paint effect class |
properties | encoded string map of effect properties |
nullptr
if matching paint effect could not be created Definition at line 77 of file qgspainteffectregistry.cpp.
|
static |
Returns a new effect stack consisting of a sensible selection of default effects.
All effects except the standard draw source effect are disabled, but are included so that they can be easily drawn just by enabling the effect.
Definition at line 114 of file qgspainteffectregistry.cpp.
QgsPaintEffectAbstractMetadata * QgsPaintEffectRegistry::effectMetadata | ( | const QString & | name | ) | const |
Returns the metadata for a specific effect.
name | unique string name for paint effect class |
nullptr
Definition at line 60 of file qgspainteffectregistry.cpp.
QStringList QgsPaintEffectRegistry::effects | ( | ) | const |
Returns a list of known paint effects.
Definition at line 103 of file qgspainteffectregistry.cpp.
|
static |
Tests whether a paint effect matches the default effects stack.
effect | paint effect to test |
true
if effect is default stack Definition at line 134 of file qgspainteffectregistry.cpp.
|
delete |