QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
Registry of available paint effects. More...
#include <qgspainteffectregistry.h>
Public Member Functions | |
QgsPaintEffectRegistry () | |
QgsPaintEffectRegistry (const QgsPaintEffectRegistry &rh)=delete | |
QgsPaintEffectRegistry cannot be copied. More... | |
~QgsPaintEffectRegistry () | |
bool | addEffectType (QgsPaintEffectAbstractMetadata *metadata) |
Registers a new effect type. More... | |
QgsPaintEffect * | createEffect (const QString &name, const QgsStringMap &properties=QgsStringMap()) const |
Creates a new paint effect given the effect name and properties map. More... | |
QgsPaintEffect * | createEffect (const QDomElement &element) const |
Creates a new paint effect given a DOM element storing paint effect properties. More... | |
QgsPaintEffectAbstractMetadata * | effectMetadata (const QString &name) const |
Returns the metadata for a specific effect. More... | |
QStringList | effects () const |
Returns a list of known paint effects. More... | |
QgsPaintEffectRegistry & | operator= (const QgsPaintEffectRegistry &rh)=delete |
QgsPaintEffectRegistry cannot be copied. More... | |
Static Public Member Functions | |
static QgsPaintEffect * | defaultStack () |
Returns a new effect stack consisting of a sensible selection of default effects. More... | |
static bool | isDefaultStack (QgsPaintEffect *effect) |
Tests whether a paint effect matches the default effects stack. More... | |
Registry of available paint effects.
QgsPaintEffectRegistry is not usually directly created, but rather accessed through QgsApplication::paintEffectRegistry().
Definition at line 174 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 |
QgsPaintEffectRegistry cannot be copied.
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 QString & | name, |
const QgsStringMap & | properties = QgsStringMap() |
||
) | 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.
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.
|
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 |
QgsPaintEffectRegistry cannot be copied.