QGIS/python/core/auto_generated/effects/qgspainteffectregistry.sip.in

186 lines
5.0 KiB
Plaintext
Raw Normal View History

2017-05-23 14:33:31 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/effects/qgspainteffectregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPaintEffectWidget /External/;
2017-05-23 14:33:31 +02:00
class QgsPaintEffectAbstractMetadata
{
2017-05-23 14:33:31 +02:00
%Docstring
Stores metadata about a paint effect class.
2017-05-23 14:33:31 +02:00
.. note::
It's necessary to implement the createPaintEffect() function.
2018-01-12 20:51:17 -04:00
In C++ you can use the QgsPaintEffectMetadata convenience class to
simplify creation of the metadata.
2017-05-23 14:33:31 +02:00
.. versionadded:: 2.9
%End
2017-05-23 14:33:31 +02:00
%TypeHeaderCode
#include "qgspainteffectregistry.h"
%End
public:
QgsPaintEffectAbstractMetadata( const QString &name, const QString &visibleName );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Construct a new QgsPaintEffectAbstractMetadata
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param name: unique string representing paint effect class
:param visibleName: user visible name representing paint effect class
2017-05-23 14:33:31 +02:00
%End
virtual ~QgsPaintEffectAbstractMetadata();
QString name() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the unique string representing the paint effect class
:return: unique string
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`visibleName`
2017-05-23 14:33:31 +02:00
%End
QString visibleName() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the user visible string representing the paint effect class
:return: friendly user visible string
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`name`
2017-05-23 14:33:31 +02:00
%End
virtual QgsPaintEffect *createPaintEffect( const QgsStringMap &map ) = 0 /Factory/;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Create a paint effect of this class given an encoded map of properties.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param map: properties string map
:return: new paint effect
2017-05-23 14:33:31 +02:00
%End
virtual QgsPaintEffectWidget *createWidget() /Factory/;
2017-05-23 14:33:31 +02:00
%Docstring
Create configuration widget for paint effect of this class. Can return ``None``
2017-12-15 10:36:55 -04:00
if there's no GUI for the paint effect class.
:return: configuration widget
2017-05-23 14:33:31 +02:00
%End
protected:
};
2017-05-23 14:33:31 +02:00
class QgsPaintEffectRegistry
{
2017-05-23 14:33:31 +02:00
%Docstring
Registry of available paint effects.
2017-05-23 14:33:31 +02:00
2017-12-15 10:36:55 -04:00
QgsPaintEffectRegistry is not usually directly created, but rather accessed through
2017-12-19 11:43:52 -04:00
:py:func:`QgsApplication.paintEffectRegistry()`
2017-05-23 14:33:31 +02:00
.. versionadded:: 2.9
%End
2017-05-23 14:33:31 +02:00
%TypeHeaderCode
#include "qgspainteffectregistry.h"
%End
public:
QgsPaintEffectRegistry();
~QgsPaintEffectRegistry();
2017-05-23 14:33:31 +02:00
QgsPaintEffectAbstractMetadata *effectMetadata( const QString &name ) const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the metadata for a specific effect.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param name: unique string name for paint effect class
:return: paint effect metadata if found, otherwise ``None``
2017-05-23 14:33:31 +02:00
%End
bool addEffectType( QgsPaintEffectAbstractMetadata *metadata /Transfer/ );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Registers a new effect type.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param metadata: effect metadata. Ownership is transferred to the registry.
2019-02-26 19:54:09 +10:00
:return: ``True`` if add was successful.
2017-05-23 14:33:31 +02:00
%End
QgsPaintEffect *createEffect( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const /Factory/;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Creates a new paint effect given the effect name and properties map.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param name: unique name representing paint effect class
:param properties: encoded string map of effect properties
:return: new paint effect of specified class, or ``None`` if matching
paint effect could not be created
2017-05-23 14:33:31 +02:00
%End
QgsPaintEffect *createEffect( const QDomElement &element ) const /Factory/;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Creates a new paint effect given a DOM element storing paint effect
properties.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param element: encoded DOM element of effect properties
:return: new paint effect, or ``None`` if matching
paint effect could not be created
2017-05-23 14:33:31 +02:00
%End
QStringList effects() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a list of known paint effects.
:return: list of paint effect names
2017-05-23 14:33:31 +02:00
%End
static QgsPaintEffect *defaultStack() /Factory/;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
:return: default effects stack
.. seealso:: :py:func:`isDefaultStack`
2017-05-23 14:33:31 +02:00
%End
static bool isDefaultStack( QgsPaintEffect *effect );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Tests whether a paint effect matches the default effects stack.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param effect: paint effect to test
2019-02-26 19:54:09 +10:00
:return: ``True`` if effect is default stack
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`defaultStack`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.12
2017-05-23 14:33:31 +02:00
%End
private:
QgsPaintEffectRegistry( const QgsPaintEffectRegistry &rh );
};
2017-05-23 14:33:31 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/effects/qgspainteffectregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/