QGIS/python/core/auto_generated/qgsvectorlayerlabeling.sip.in
Nyall Dawson 590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00

183 lines
5.6 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsvectorlayerlabeling.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAbstractVectorLayerLabeling
{
%Docstring
Abstract base class - its implementations define different approaches to the labeling of a vector layer.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsvectorlayerlabeling.h"
%End
%ConvertToSubClassCode
if ( sipCpp->type() == "simple" )
sipType = sipType_QgsVectorLayerSimpleLabeling;
else if ( sipCpp->type() == "rule-based" )
sipType = sipType_QgsRuleBasedLabeling;
else
sipType = 0;
%End
public:
QgsAbstractVectorLayerLabeling();
%Docstring
Default constructor
%End
virtual ~QgsAbstractVectorLayerLabeling();
virtual QString type() const = 0;
%Docstring
Unique type string of the labeling configuration implementation
%End
virtual QgsAbstractVectorLayerLabeling *clone() const = 0 /Factory/;
%Docstring
Returns a new copy of the object
%End
virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
%Docstring
Returns labeling configuration as XML element
%End
virtual QStringList subProviders() const;
%Docstring
Gets list of sub-providers within the layer's labeling.
%End
virtual QgsPalLayerSettings settings( const QString &providerId = QString() ) const = 0;
%Docstring
Gets associated label settings. In case of multiple sub-providers with different settings,
they are identified by their ID (e.g. in case of rule-based labeling, provider ID == rule key)
%End
virtual void setSettings( QgsPalLayerSettings *settings /Transfer/, const QString &providerId = QString() ) = 0;
%Docstring
Set pal settings for a specific provider (takes ownership).
:param settings: Pal layer settings
:param providerId: The id of the provider
.. versionadded:: 3.0
%End
virtual bool requiresAdvancedEffects() const = 0;
%Docstring
Returns ``True`` if drawing labels requires advanced effects like composition
modes, which could prevent it being used as an isolated cached image
or exported to a vector format.
.. versionadded:: 3.0
%End
static QgsAbstractVectorLayerLabeling *create( const QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Try to create instance of an implementation based on the XML data
%End
virtual void toSld( QDomNode &parent, const QgsStringMap &props ) const;
%Docstring
Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings
%End
virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
%Docstring
Accepts the specified symbology ``visitor``, causing it to visit all symbols associated
with the labeling.
Returns ``True`` if the visitor should continue visiting other objects, or ``False`` if visiting
should be canceled.
.. versionadded:: 3.10
%End
protected:
virtual void writeTextSymbolizer( QDomNode &parent, QgsPalLayerSettings &settings, const QgsStringMap &props ) const;
%Docstring
Writes a TextSymbolizer element contents based on the provided labeling settings
:param parent: the node that will have the text symbolizer element added to it
:param settings: the settings getting translated to a TextSymbolizer
:param props: a open ended set of properties that can drive/inform the SLD encoding
%End
private:
QgsAbstractVectorLayerLabeling( const QgsAbstractVectorLayerLabeling &rhs );
};
class QgsVectorLayerSimpleLabeling : QgsAbstractVectorLayerLabeling
{
%Docstring
Basic implementation of the labeling interface.
The configuration is kept in layer's custom properties for backward compatibility.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsvectorlayerlabeling.h"
%End
public:
explicit QgsVectorLayerSimpleLabeling( const QgsPalLayerSettings &settings );
%Docstring
Constructs simple labeling configuration with given initial settings
%End
virtual QString type() const;
virtual QgsAbstractVectorLayerLabeling *clone() const /Factory/;
virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const;
virtual QgsPalLayerSettings settings( const QString &providerId = QString() ) const;
virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
virtual void setSettings( QgsPalLayerSettings *settings /Transfer/, const QString &providerId = QString() );
%Docstring
Set pal settings (takes ownership).
:param settings: Pal layer settings
:param providerId: Unused parameter
.. versionadded:: 3.0
%End
virtual bool requiresAdvancedEffects() const;
virtual void toSld( QDomNode &parent, const QgsStringMap &props ) const;
static QgsVectorLayerSimpleLabeling *create( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Create the instance from a DOM element with saved configuration
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsvectorlayerlabeling.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/