QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsPaintEffectRegistry Class Reference

Registry of available paint effects. More...

#include <qgspainteffectregistry.h>

Public Member Functions

 QgsPaintEffectRegistry ()
 
 QgsPaintEffectRegistry (const QgsPaintEffectRegistry &rh)=delete
 QgsPaintEffectRegistry cannot be copied.
 
 ~QgsPaintEffectRegistry ()
 
bool addEffectType (QgsPaintEffectAbstractMetadata *metadata)
 Registers a new effect type.
 
QgsPaintEffectcreateEffect (const QDomElement &element) const
 Creates a new paint effect given a DOM element storing paint effect properties.
 
QgsPaintEffectcreateEffect (const QString &name, const QVariantMap &properties=QVariantMap()) const
 Creates a new paint effect given the effect name and properties map.
 
QgsPaintEffectAbstractMetadataeffectMetadata (const QString &name) const
 Returns the metadata for a specific effect.
 
QStringList effects () const
 Returns a list of known paint effects.
 
QgsPaintEffectRegistryoperator= (const QgsPaintEffectRegistry &rh)=delete
 QgsPaintEffectRegistry cannot be copied.
 

Static Public Member Functions

static QgsPaintEffectdefaultStack ()
 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QgsPaintEffectRegistry() [1/2]

QgsPaintEffectRegistry::QgsPaintEffectRegistry ( )

Definition at line 32 of file qgspainteffectregistry.cpp.

◆ ~QgsPaintEffectRegistry()

QgsPaintEffectRegistry::~QgsPaintEffectRegistry ( )

Definition at line 55 of file qgspainteffectregistry.cpp.

◆ QgsPaintEffectRegistry() [2/2]

QgsPaintEffectRegistry::QgsPaintEffectRegistry ( const QgsPaintEffectRegistry rh)
delete

QgsPaintEffectRegistry cannot be copied.

Member Function Documentation

◆ addEffectType()

bool QgsPaintEffectRegistry::addEffectType ( QgsPaintEffectAbstractMetadata metadata)

Registers a new effect type.

Parameters
metadataeffect metadata. Ownership is transferred to the registry.
Returns
true if add was successful.

Definition at line 68 of file qgspainteffectregistry.cpp.

◆ createEffect() [1/2]

QgsPaintEffect * QgsPaintEffectRegistry::createEffect ( const QDomElement &  element) const

Creates a new paint effect given a DOM element storing paint effect properties.

Parameters
elementencoded DOM element of effect properties
Returns
new paint effect, or nullptr if matching paint effect could not be created

Definition at line 86 of file qgspainteffectregistry.cpp.

◆ createEffect() [2/2]

QgsPaintEffect * QgsPaintEffectRegistry::createEffect ( const QString &  name,
const QVariantMap &  properties = QVariantMap() 
) const

Creates a new paint effect given the effect name and properties map.

Parameters
nameunique name representing paint effect class
propertiesencoded string map of effect properties
Returns
new paint effect of specified class, or nullptr if matching paint effect could not be created

Definition at line 77 of file qgspainteffectregistry.cpp.

◆ defaultStack()

QgsPaintEffect * QgsPaintEffectRegistry::defaultStack ( )
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.

Returns
default effects stack
See also
isDefaultStack()

Definition at line 114 of file qgspainteffectregistry.cpp.

◆ effectMetadata()

QgsPaintEffectAbstractMetadata * QgsPaintEffectRegistry::effectMetadata ( const QString &  name) const

Returns the metadata for a specific effect.

Parameters
nameunique string name for paint effect class
Returns
paint effect metadata if found, otherwise nullptr

Definition at line 60 of file qgspainteffectregistry.cpp.

◆ effects()

QStringList QgsPaintEffectRegistry::effects ( ) const

Returns a list of known paint effects.

Returns
list of paint effect names

Definition at line 103 of file qgspainteffectregistry.cpp.

◆ isDefaultStack()

bool QgsPaintEffectRegistry::isDefaultStack ( QgsPaintEffect effect)
static

Tests whether a paint effect matches the default effects stack.

Parameters
effectpaint effect to test
Returns
true if effect is default stack
See also
defaultStack()

Definition at line 134 of file qgspainteffectregistry.cpp.

◆ operator=()

QgsPaintEffectRegistry & QgsPaintEffectRegistry::operator= ( const QgsPaintEffectRegistry rh)
delete

QgsPaintEffectRegistry cannot be copied.


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