Class: QgsAbstractMeshLayerLabeling¶
Abstract base class - its implementations define different approaches to the labeling of a mesh layer.
Added in version 3.36.
Class Hierarchy¶
Subclasses¶
Basic implementation of the labeling interface for mesh layer.  | 
Methods
Accepts the specified symbology visitor, causing it to visit all symbols associated with the labeling.  | 
|
Returns a new copy of the object  | 
|
Multiply opacity by opacityFactor.  | 
|
Returns   | 
|
Returns labeling configuration as XML element  | 
|
Set pal settings for a specific provider (takes ownership).  | 
|
Gets associated label settings.  | 
|
Gets list of sub-providers within the layer's labeling.  | 
|
Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings  | 
|
Unique type string of the labeling configuration implementation  | 
Static Methods
Try to create instance of an implementation based on the XML data  | 
|
Returns the default layer settings to use for the specified mesh layer.  | 
- class qgis.core.QgsAbstractMeshLayerLabeling[source]¶
 Bases:
object- accept(self, visitor: QgsStyleEntityVisitorInterface | None) bool[source]¶
 Accepts the specified symbology
visitor, causing it to visit all symbols associated with the labeling.Returns
Trueif the visitor should continue visiting other objects, orFalseif visiting should be canceled.- Parameters:
 visitor (Optional[QgsStyleEntityVisitorInterface])
- Return type:
 bool
- clone(self) QgsAbstractMeshLayerLabeling | None[source]¶
 Returns a new copy of the object
- Return type:
 Optional[QgsAbstractMeshLayerLabeling]
- static create(element: QDomElement, context: QgsReadWriteContext) QgsAbstractMeshLayerLabeling | None[source]¶
 Try to create instance of an implementation based on the XML data
- Parameters:
 element (QDomElement)
context (QgsReadWriteContext)
- Return type:
 Optional[QgsAbstractMeshLayerLabeling]
- static defaultSettingsForLayer(layer: QgsMeshLayer | None) QgsPalLayerSettings[source]¶
 Returns the default layer settings to use for the specified mesh
layer.- Parameters:
 layer (Optional[QgsMeshLayer])
- Return type:
 
- multiplyOpacity(self, opacityFactor: float)[source]¶
 Multiply opacity by
opacityFactor.This method multiplies the opacity of the labeling elements (text, shadow, buffer etc.) by
opacityeffectively changing the opacity of the whole labeling elements.- Parameters:
 opacityFactor (float)
- requiresAdvancedEffects(self) bool[source]¶
 Returns
Trueif 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.- Return type:
 bool
- save(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement[source]¶
 Returns labeling configuration as XML element
- Parameters:
 doc (QDomDocument)
context (QgsReadWriteContext)
- Return type:
 QDomElement
- setSettings(self, settings: QgsPalLayerSettings | None, providerId: str | None = '')[source]¶
 Set pal settings for a specific provider (takes ownership).
- Parameters:
 settings (Optional[QgsPalLayerSettings]) – Pal layer settings
providerId (Optional[str] = '') – The id of the provider
- settings(self, providerId: str | None = '') QgsPalLayerSettings[source]¶
 Gets associated label settings. In case of multiple sub-providers with different settings, they are identified by their ID.
- Parameters:
 providerId (Optional[str] = '')
- Return type:
 
- subProviders(self) List[str][source]¶
 Gets list of sub-providers within the layer’s labeling.
- Return type:
 List[str]