QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
Basic implementation of the labeling interface. More...
#include <qgsvectorlayerlabeling.h>
Public Member Functions | |
QgsVectorLayerSimpleLabeling (const QgsPalLayerSettings &settings) | |
Constructs simple labeling configuration with given initial settings. | |
bool | accept (QgsStyleEntityVisitorInterface *visitor) const override |
Accepts the specified symbology visitor, causing it to visit all symbols associated with the labeling. | |
QgsAbstractVectorLayerLabeling * | clone () const override |
Returns a new copy of the object. | |
void | multiplyOpacity (double opacityFactor) override |
Multiply opacity by opacityFactor. | |
QgsVectorLayerLabelProvider * | provider (QgsVectorLayer *layer) const override |
bool | requiresAdvancedEffects () const override |
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. | |
QDomElement | save (QDomDocument &doc, const QgsReadWriteContext &context) const override |
Returns labeling configuration as XML element. | |
void | setSettings (QgsPalLayerSettings *settings, const QString &providerId=QString()) override |
Set pal settings (takes ownership). | |
QgsPalLayerSettings | settings (const QString &providerId=QString()) const override |
Gets associated label settings. | |
void | toSld (QDomNode &parent, const QVariantMap &props) const override |
Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings. | |
QString | type () const override |
Unique type string of the labeling configuration implementation. | |
Public Member Functions inherited from QgsAbstractVectorLayerLabeling | |
QgsAbstractVectorLayerLabeling ()=default | |
virtual | ~QgsAbstractVectorLayerLabeling ()=default |
virtual QStringList | subProviders () const |
Gets list of sub-providers within the layer's labeling. | |
Static Public Member Functions | |
static QgsVectorLayerSimpleLabeling * | create (const QDomElement &element, const QgsReadWriteContext &context) |
Create the instance from a DOM element with saved configuration. | |
Static Public Member Functions inherited from QgsAbstractVectorLayerLabeling | |
static QgsAbstractVectorLayerLabeling * | create (const QDomElement &element, const QgsReadWriteContext &context) |
Try to create instance of an implementation based on the XML data. | |
static QgsPalLayerSettings | defaultSettingsForLayer (const QgsVectorLayer *layer) |
Returns the default layer settings to use for the specified vector layer. | |
Additional Inherited Members | |
Protected Member Functions inherited from QgsAbstractVectorLayerLabeling | |
virtual void | writeTextSymbolizer (QDomNode &parent, QgsPalLayerSettings &settings, const QVariantMap &props) const |
Writes a TextSymbolizer element contents based on the provided labeling settings. | |
Basic implementation of the labeling interface.
The configuration is kept in layer's custom properties for backward compatibility.
Definition at line 170 of file qgsvectorlayerlabeling.h.
|
explicit |
Constructs simple labeling configuration with given initial settings.
Definition at line 80 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
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.
Reimplemented from QgsAbstractVectorLayerLabeling.
Definition at line 110 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
Returns a new copy of the object.
Implements QgsAbstractVectorLayerLabeling.
Definition at line 91 of file qgsvectorlayerlabeling.cpp.
|
static |
Create the instance from a DOM element with saved configuration.
Definition at line 126 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
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.
Reimplemented from QgsAbstractVectorLayerLabeling.
Definition at line 637 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
Reimplemented from QgsAbstractVectorLayerLabeling.
Definition at line 75 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
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.
Implements QgsAbstractVectorLayerLabeling.
Definition at line 121 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
Returns labeling configuration as XML element.
Implements QgsAbstractVectorLayerLabeling.
Definition at line 96 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
Set pal settings (takes ownership).
settings | Pal layer settings |
providerId | Unused parameter |
Implements QgsAbstractVectorLayerLabeling.
Definition at line 644 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
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)
Implements QgsAbstractVectorLayerLabeling.
Definition at line 104 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings.
Reimplemented from QgsAbstractVectorLayerLabeling.
Definition at line 611 of file qgsvectorlayerlabeling.cpp.
|
overridevirtual |
Unique type string of the labeling configuration implementation.
Implements QgsAbstractVectorLayerLabeling.
Definition at line 86 of file qgsvectorlayerlabeling.cpp.