Class: QgsPaintEffectRegistry¶
-
class
qgis.core.
QgsPaintEffectRegistry
¶ Bases:
sip.wrapper
Registry of available paint effects.
QgsPaintEffectRegistry is not usually directly created, but rather accessed through
QgsApplication.paintEffectRegistry()
New in version 2.9: Enums
Methods
Registers a new effect type.
Creates a new paint effect given the effect name and properties map.
Returns a new effect stack consisting of a sensible selection of default effects.
Returns the metadata for a specific effect.
Returns a list of known paint effects.
Tests whether a paint effect matches the default effects stack.
Signals
Attributes
-
addEffectType
(self, metadata: QgsPaintEffectAbstractMetadata) → bool¶ Registers a new effect type.
- Parameters
metadata – effect metadata. Ownership is transferred to the registry.
- Returns
true if add was successful.
-
createEffect
(self, name: str, properties: Dict[str, str] = {}) → QgsPaintEffect¶ Creates a new paint effect given the effect name and properties map.
- Parameters
name – unique name representing paint effect class
properties – encoded string map of effect properties
- Returns
new paint effect of specified class, or None if matching paint effect could not be created
createEffect(self, element: QDomElement) -> QgsPaintEffect Creates a new paint effect given a DOM element storing paint effect properties.
- Parameters
element – encoded DOM element of effect properties
- Returns
new paint effect, or None if matching paint effect could not be created
-
defaultStack
() → QgsPaintEffect¶ 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
-
effectMetadata
(self, name: str) → QgsPaintEffectAbstractMetadata¶ Returns the metadata for a specific effect.
- Parameters
name – unique string name for paint effect class
- Returns
paint effect metadata if found, otherwise None
-
effects
(self) → List[str]¶ Returns a list of known paint effects.
- Returns
list of paint effect names
-
isDefaultStack
(effect: QgsPaintEffect) → bool¶ Tests whether a paint effect matches the default effects stack.
- Parameters
effect – paint effect to test
- Returns
true if effect is default stack
See also
New in version 2.12.
-