15#ifndef QGSVECTORLAYERLABELING_H
16#define QGSVECTORLAYERLABELING_H
46 if ( sipCpp->type() ==
"simple" )
47 sipType = sipType_QgsVectorLayerSimpleLabeling;
48 else if ( sipCpp->type() ==
"rule-based" )
49 sipType = sipType_QgsRuleBasedLabeling;
61 virtual QString
type()
const = 0;
76 virtual QStringList
subProviders()
const {
return QStringList( QString() ); }
134 Q_DECL_DEPRECATED
virtual void toSld( QDomNode &parent,
const QVariantMap &props )
const SIP_DEPRECATED;
203 QString
type()
const override;
222 Q_DECL_DEPRECATED
void toSld( QDomNode &parent,
const QVariantMap &props )
const override SIP_DEPRECATED;
229 std::unique_ptr<QgsPalLayerSettings> mSettings;
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
virtual bool hasNonDefaultCompositionMode() const =0
Returns true the labeling requires a non-default composition mode.
virtual QStringList subProviders() const
Gets list of sub-providers within the layer's labeling.
virtual void setSettings(QgsPalLayerSettings *settings, const QString &providerId=QString())=0
Set pal settings for a specific provider (takes ownership).
virtual ~QgsAbstractVectorLayerLabeling()=default
virtual QgsPalLayerSettings settings(const QString &providerId=QString()) const =0
Gets associated label settings.
QgsAbstractVectorLayerLabeling()=default
virtual bool requiresAdvancedEffects() const =0
Returns true if drawing labels requires advanced effects like composition modes, which could prevent ...
virtual QString type() const =0
Unique type string of the labeling configuration implementation.
virtual QgsVectorLayerLabelProvider * provider(QgsVectorLayer *layer) const
Factory for label provider implementation.
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) const =0
Returns labeling configuration as XML element.
virtual void multiplyOpacity(double opacityFactor)
Multiply opacity by opacityFactor.
virtual QgsAbstractVectorLayerLabeling * clone() const =0
Returns a new copy of the object.
Contains settings for how a map layer will be labeled.
A container for the context for various read/write operations on objects.
Holds SLD export options and other information related to SLD export of a QGIS layer style.
An interface for classes which can visit style entity (e.g.
Implements a label provider for vector layers.
QString type() const override
Unique type string of the labeling configuration implementation.
void multiplyOpacity(double opacityFactor) override
Multiply opacity by opacityFactor.
bool accept(QgsStyleEntityVisitorInterface *visitor) const override
Accepts the specified symbology visitor, causing it to visit all symbols associated with the labeling...
QgsPalLayerSettings settings(const QString &providerId=QString()) const override
Gets associated label settings.
QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) const override
Returns labeling configuration as XML element.
bool requiresAdvancedEffects() const override
Returns true if drawing labels requires advanced effects like composition modes, which could prevent ...
QgsVectorLayerSimpleLabeling(const QgsPalLayerSettings &settings)
Constructs simple labeling configuration with given initial settings.
void setSettings(QgsPalLayerSettings *settings, const QString &providerId=QString()) override
Set pal settings (takes ownership).
QgsVectorLayerLabelProvider * provider(QgsVectorLayer *layer) const override
static QgsVectorLayerSimpleLabeling * create(const QDomElement &element, const QgsReadWriteContext &context)
Create the instance from a DOM element with saved configuration.
QgsAbstractVectorLayerLabeling * clone() const override
Returns a new copy of the object.
Q_DECL_DEPRECATED void toSld(QDomNode &parent, const QVariantMap &props) const override
Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings.
bool hasNonDefaultCompositionMode() const override
Returns true the labeling requires a non-default composition mode.
Represents a vector layer which manages a vector based dataset.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)