Class: QgsVectorLayerSimpleLabeling¶
- class qgis.core.QgsVectorLayerSimpleLabeling¶
Bases:
QgsAbstractVectorLayerLabeling
Basic implementation of the labeling interface.
The configuration is kept in layer’s custom properties for backward compatibility.
New in version 3.0.
QgsVectorLayerSimpleLabeling(settings:
QgsPalLayerSettings
) Constructs simple labeling configuration with given initial settingsMethods
- param visitor
- rtype
QgsAbstractVectorLayerLabeling
Create the instance from a DOM element with saved configuration
- rtype
bool
- param doc
Set pal settings (takes ownership).
- param providerId
- param parent
- rtype
str
Writes a TextSymbolizer element contents based on the provided labeling settings
- accept(self, visitor: QgsStyleEntityVisitorInterface) bool ¶
- Parameters
visitor (QgsStyleEntityVisitorInterface) –
- Return type
bool
- clone(self) QgsAbstractVectorLayerLabeling ¶
- Return type
- create(element: QDomElement, context: QgsReadWriteContext) QgsVectorLayerSimpleLabeling ¶
Create the instance from a DOM element with saved configuration
- Parameters
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type
- requiresAdvancedEffects(self) bool ¶
- Return type
bool
- save(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
- Parameters
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type
QDomElement
- setSettings(self, settings: QgsPalLayerSettings, providerId: str = '')¶
Set pal settings (takes ownership).
- Parameters
settings (QgsPalLayerSettings) – Pal layer settings
providerId (str = '') – Unused parameter
New in version 3.0.
- settings(self, providerId: str = '') QgsPalLayerSettings ¶
- Parameters
providerId (str = '') –
- Return type
- toSld(self, parent: QDomNode, props: Dict[str, Any])¶
- Parameters
parent (QDomNode) –
props (Dict[str) –
- type(self) str ¶
- Return type
str
- writeTextSymbolizer(self, parent: QDomNode, settings: QgsPalLayerSettings, props: Dict[str, Any])¶
Writes a TextSymbolizer element contents based on the provided labeling settings
- Parameters
parent – the node that will have the text symbolizer element added to it
settings – the settings getting translated to a TextSymbolizer
props – a open ended set of properties that can drive/inform the SLD encoding