QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
15 #ifndef QGSVECTORLAYERLABELING_H
16 #define QGSVECTORLAYERLABELING_H
21 #include <QStringList>
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;
73 virtual QDomElement save( QDomDocument &doc,
const QgsReadWriteContext &context )
const = 0;
76 virtual QStringList
subProviders()
const {
return QStringList( QString() ); }
100 virtual bool requiresAdvancedEffects()
const = 0;
110 virtual void toSld( QDomNode &parent,
const QVariantMap &props )
const
114 QDomDocument doc = parent.ownerDocument();
115 parent.appendChild( doc.createComment( QStringLiteral(
"SE Export for %1 not implemented yet" ).arg( type() ) ) );
144 virtual void writeTextSymbolizer( QDomNode &parent,
QgsPalLayerSettings &settings,
const QVariantMap &props )
const;
169 QString
type()
const override;
188 void toSld( QDomNode &parent,
const QVariantMap &props )
const override;
194 std::unique_ptr<QgsPalLayerSettings> mSettings;
197 #endif // QGSVECTORLAYERLABELING_H
The class is used as a container of context for various read/write operations on other objects.
Contains settings for how a map layer will be labeled.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
virtual void toSld(QDomNode &parent, const QVariantMap &props) const
Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings.
virtual QString type() const =0
Unique type string of the labeling configuration implementation.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers....
virtual void setSettings(QgsPalLayerSettings *settings, const QString &providerId=QString())=0
Set pal settings for a specific provider (takes ownership).
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
static QgsAbstractVectorLayerLabeling * create(const QDomElement &element, const QgsReadWriteContext &context)
Try to create instance of an implementation based on the XML data.
virtual QStringList subProviders() const
Gets list of sub-providers within the layer's labeling.
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
virtual QgsVectorLayerLabelProvider * provider(QgsVectorLayer *layer) const
Factory for label provider implementation.
Basic implementation of the labeling interface.
Represents a vector layer which manages a vector based data sets.
virtual bool requiresAdvancedEffects() const =0
Returns true if drawing labels requires advanced effects like composition modes, which could prevent ...
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the labeling...
virtual QgsPalLayerSettings settings(const QString &providerId=QString()) const =0
Gets associated label settings.
virtual QgsAbstractVectorLayerLabeling * clone() const =0
Returns a new copy of the object.
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) const =0
Returns labeling configuration as XML element.