1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/labeling/qgsvectorlayerlabeling.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsAbstractVectorLayerLabeling
{
%Docstring(signature="appended")
Abstract base class - its implementations define different approaches to
the labeling of a vector layer.
%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();
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
%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.
%End
virtual void multiplyOpacity( double opacityFactor );
%Docstring
Multiply opacity by ``opacityFactor``.
This method multiplies the opacity of the labeling elements (text,
shadow, buffer etc.) by ``opacity`` effectively changing the opacity of
the whole labeling elements.
.. versionadded:: 3.32
%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 QVariantMap &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
static QgsPalLayerSettings defaultSettingsForLayer( const QgsVectorLayer *layer );
%Docstring
Returns the default layer settings to use for the specified vector
``layer``.
.. versionadded:: 3.20
%End
protected:
virtual void writeTextSymbolizer( QDomNode &parent, QgsPalLayerSettings &settings, const QVariantMap &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(signature="appended")
Basic implementation of the labeling interface.
The configuration is kept in layer's custom properties for backward
compatibility.
%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
%End
virtual bool requiresAdvancedEffects() const;
virtual void toSld( QDomNode &parent, const QVariantMap &props ) const;
virtual void multiplyOpacity( double opacityFactor );
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/labeling/qgsvectorlayerlabeling.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|