QGIS/python/core/effects/qgseffectstack.sip.in

163 lines
4.9 KiB
Plaintext
Raw Normal View History

2017-05-23 14:33:31 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/effects/qgseffectstack.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsEffectStack : QgsPaintEffect
{
2017-05-23 14:33:31 +02:00
%Docstring
A paint effect which consists of a stack of other chained paint effects
2017-12-15 10:36:55 -04:00
Effect stacks can be used to apply multiple paint effects to a QPicture. For
instance, an effect stack may blur then apply a drop shadow.
The way in which effects apply to a stack is controlled by the effect's drawMode.
Effects can either render their results onto the destination paint device,
or just modify the source picture which is drawn by subsequent effects in the
stack. For instance, a blur effect with a Modifier drawMode will blur the source
picture for the following drop shadow effect without actually drawing the blurred
picture to the paint device. If the blur effect had a Render drawMode then the
blurred picture will be drawn on the paint device, but the following drop shadow
effect will be drawn using the original picture, not the blurred version.
2017-05-23 14:33:31 +02:00
.. versionadded:: 2.9
%End
2017-05-23 14:33:31 +02:00
%TypeHeaderCode
#include "qgseffectstack.h"
%End
public:
static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Creates a new QgsEffectStack effect. This method ignores
the map parameter, and always returns an empty effect stack.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param map: unused encoded properties string map
:return: new QgsEffectStack
2017-05-23 14:33:31 +02:00
%End
QgsEffectStack();
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for empty QgsEffectStack.
%End
QgsEffectStack( const QgsEffectStack &other );
explicit QgsEffectStack( const QgsPaintEffect &effect );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Creates a new QgsEffectStack effect from a single initial effect.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param effect: initial effect to add to the stack. The effect will
be cloned, so ownership is not transferred to the stack.
:return: new QgsEffectStack containing initial effect
2017-05-23 14:33:31 +02:00
%End
~QgsEffectStack();
virtual QString type() const;
virtual QgsEffectStack *clone() const /Factory/;
virtual bool saveProperties( QDomDocument &doc, QDomElement &element ) const;
virtual bool readProperties( const QDomElement &element );
virtual QgsStringMap properties() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Unused for QgsEffectStack, will always return an empty string map
2017-05-23 14:33:31 +02:00
%End
virtual void readProperties( const QgsStringMap &props );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Unused for QgsEffectStack, props parameter will be ignored
2017-05-23 14:33:31 +02:00
%End
void appendEffect( QgsPaintEffect *effect /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Appends an effect to the end of the stack.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param effect: QgsPaintEffect to append. Ownership of the effect will be
transferred to the stack object.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`insertEffect`
2017-05-23 14:33:31 +02:00
%End
bool insertEffect( const int index, QgsPaintEffect *effect /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Inserts an effect at a specified index within the stack.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param index: position to insert the effect
:param effect: QgsPaintEffect to insert. Ownership of the effect will be
transferred to the stack object.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`appendEffect`
2017-05-23 14:33:31 +02:00
%End
bool changeEffect( const int index, QgsPaintEffect *effect /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Replaces the effect at a specified position within the stack.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param index: position of effect to replace
:param effect: QgsPaintEffect to replace with. Ownership of the effect will be
transferred to the stack object.
2017-05-23 14:33:31 +02:00
%End
QgsPaintEffect *takeEffect( const int index /TransferBack/ );
%Docstring
2017-12-15 10:36:55 -04:00
Removes an effect from the stack and returns a pointer to it.
2017-12-15 21:36:08 -04:00
:param index: position of effect to take
2017-05-23 14:33:31 +02:00
%End
QList< QgsPaintEffect * > *effectList();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a pointer to the list of effects currently contained by
the stack
:return: list of QgsPaintEffects within the stack
2017-05-23 14:33:31 +02:00
%End
int count() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns count of effects contained by the stack
:return: count of effects
2017-05-23 14:33:31 +02:00
%End
QgsPaintEffect *effect( int index ) const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a pointer to the effect at a specified index within the stack
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param index: position of effect to return
:return: QgsPaintEffect at specified position
2017-05-23 14:33:31 +02:00
%End
protected:
virtual void draw( QgsRenderContext &context );
};
2017-05-23 14:33:31 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/effects/qgseffectstack.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/