26 , mVisibleName( visibleName )
56 qDeleteAll( mMetadata );
67 if ( mMetadata.contains( name ) )
68 return mMetadata.value( name );
75 if ( !metadata || mMetadata.contains( metadata->
name() ) )
78 mMetadata[metadata->
name()] = metadata;
84 if ( !mMetadata.contains( name ) )
112 for ( ; it != mMetadata.
end(); ++it )
145 if ( effectStack->
count() != 5 )
148 for (
int i = 0; i < 5; ++i )
155 if ( !dynamic_cast< QgsDropShadowEffect* >( effectStack->
effect( 0 ) ) )
157 if ( !dynamic_cast< QgsOuterGlowEffect* >( effectStack->
effect( 1 ) ) )
159 if ( !dynamic_cast< QgsDrawSourceEffect* >( effectStack->
effect( 2 ) ) )
161 if ( !dynamic_cast< QgsInnerShadowEffect* >( effectStack->
effect( 3 ) ) )
163 if ( !dynamic_cast< QgsInnerGlowEffect* >( effectStack->
effect( 4 ) ) )
void setEnabled(const bool enabled)
Sets whether the effect is enabled.
QString attribute(const QString &name, const QString &defValue) const
bool addEffectType(QgsPaintEffectAbstractMetadata *metadata)
Registers a new effect type.
static bool isDefaultStack(QgsPaintEffect *effect)
Tests whether a paint effect matches the default effects stack.
Base class for visual effects which can be applied to QPicture drawings.
QString tr(const char *sourceText, const char *disambiguation, int n)
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsEffectStack effect.
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsDrawSource effect from a properties string map.
int count() const
Returns count of effects contained by the stack.
void append(const T &value)
static QgsPaintEffect * defaultStack()
Returns a new effect stack consisting of a sensible selection of default effects. ...
static QgsPaintEffectRegistry * instance()
Returns a reference to the singleton instance of the paint effect registry.
QgsPaintEffect * effect(int index) const
Returns a pointer to the effect at a specified index within the stack.
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsOuterGlowEffect effect from a properties string map.
A paint effect which consists of a stack of other chained paint effects.
bool enabled() const
Returns whether the effect is enabled.
void appendEffect(QgsPaintEffect *effect)
Appends an effect to the end of the stack.
A paint effect which draws an offset and optionally blurred drop shadow.
QStringList effects() const
Returns a list of known paint effects.
A paint effect which draws a glow outside of a picture.
QgsPaintEffectAbstractMetadata * effectMetadata(const QString &name) const
Returns the metadata for a specific effect.
virtual void readProperties(const QgsStringMap &props)=0
Reads a string map of an effect's properties and restores the effect to the state described by the pr...
const Key key(const T &value) const
A paint effect which draws an offset and optionally blurred drop shadow within a picture.
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsBlurEffect effect from a properties string map.
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsColorEffect effect from a properties string map.
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsInnerShadowEffect effect from a properties string map.
~QgsPaintEffectRegistry()
A paint effect which draws a glow within a picture.
A paint effect which draws the source picture with minor or no alterations.
QgsPaintEffect * createEffect(const QString &name, const QgsStringMap &properties=QgsStringMap()) const
Creates a new paint effect given the effect name and properties map.
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsInnerGlowEffect effect from a properties string map.
Singleton registry of available paint effects.
static QgsPaintEffect * create(const QgsStringMap &map)
Creates a new QgsDropShadowEffect effect from a properties string map.