QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsAbstractMeshLayerLabeling Class Referenceabstract

Abstract base class - its implementations define different approaches to the labeling of a mesh layer. More...

#include <qgsmeshlayerlabeling.h>

Inheritance diagram for QgsAbstractMeshLayerLabeling:
Inheritance graph
[legend]

Public Member Functions

 QgsAbstractMeshLayerLabeling ()=default
 
virtual ~QgsAbstractMeshLayerLabeling ()=default
 
virtual bool accept (QgsStyleEntityVisitorInterface *visitor) const
 Accepts the specified symbology visitor, causing it to visit all symbols associated with the labeling.
 
virtual QgsAbstractMeshLayerLabelingclone () const =0
 Returns a new copy of the object.
 
virtual void multiplyOpacity (double opacityFactor)
 Multiply opacity by opacityFactor.
 
virtual QgsMeshLayerLabelProviderprovider (QgsMeshLayer *layer) const
 Factory for label provider implementation.
 
virtual bool requiresAdvancedEffects () const =0
 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.
 
virtual QDomElement save (QDomDocument &doc, const QgsReadWriteContext &context) const =0
 Returns labeling configuration as XML element.
 
virtual void setSettings (QgsPalLayerSettings *settings, const QString &providerId=QString())=0
 Set pal settings for a specific provider (takes ownership).
 
virtual QgsPalLayerSettings settings (const QString &providerId=QString()) const =0
 Gets associated label settings.
 
virtual QStringList subProviders () const
 Gets list of sub-providers within the layer's labeling.
 
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.
 

Static Public Member Functions

static QgsAbstractMeshLayerLabelingcreate (const QDomElement &element, const QgsReadWriteContext &context)
 Try to create instance of an implementation based on the XML data.
 
static QgsPalLayerSettings defaultSettingsForLayer (const QgsMeshLayer *layer)
 Returns the default layer settings to use for the specified mesh layer.
 

Detailed Description

Abstract base class - its implementations define different approaches to the labeling of a mesh layer.

Since
QGIS 3.36

Definition at line 44 of file qgsmeshlayerlabeling.h.

Constructor & Destructor Documentation

◆ QgsAbstractMeshLayerLabeling()

QgsAbstractMeshLayerLabeling::QgsAbstractMeshLayerLabeling ( )
default

◆ ~QgsAbstractMeshLayerLabeling()

virtual QgsAbstractMeshLayerLabeling::~QgsAbstractMeshLayerLabeling ( )
virtualdefault

Member Function Documentation

◆ accept()

bool QgsAbstractMeshLayerLabeling::accept ( QgsStyleEntityVisitorInterface visitor) const
virtual

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 in QgsMeshLayerSimpleLabeling.

Definition at line 38 of file qgsmeshlayerlabeling.cpp.

◆ clone()

virtual QgsAbstractMeshLayerLabeling * QgsAbstractMeshLayerLabeling::clone ( ) const
pure virtual

Returns a new copy of the object.

Implemented in QgsMeshLayerSimpleLabeling.

◆ create()

QgsAbstractMeshLayerLabeling * QgsAbstractMeshLayerLabeling::create ( const QDomElement &  element,
const QgsReadWriteContext context 
)
static

Try to create instance of an implementation based on the XML data.

Definition at line 25 of file qgsmeshlayerlabeling.cpp.

◆ defaultSettingsForLayer()

QgsPalLayerSettings QgsAbstractMeshLayerLabeling::defaultSettingsForLayer ( const QgsMeshLayer layer)
static

Returns the default layer settings to use for the specified mesh layer.

Definition at line 43 of file qgsmeshlayerlabeling.cpp.

◆ multiplyOpacity()

virtual void QgsAbstractMeshLayerLabeling::multiplyOpacity ( double  opacityFactor)
inlinevirtual

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 in QgsMeshLayerSimpleLabeling.

Definition at line 96 of file qgsmeshlayerlabeling.h.

◆ provider()

virtual QgsMeshLayerLabelProvider * QgsAbstractMeshLayerLabeling::provider ( QgsMeshLayer layer) const
inlinevirtual

Factory for label provider implementation.

Note
not available in Python bindings

Reimplemented in QgsMeshLayerSimpleLabeling.

Definition at line 61 of file qgsmeshlayerlabeling.h.

◆ requiresAdvancedEffects()

virtual bool QgsAbstractMeshLayerLabeling::requiresAdvancedEffects ( ) const
pure virtual

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.

Implemented in QgsMeshLayerSimpleLabeling.

◆ save()

virtual QDomElement QgsAbstractMeshLayerLabeling::save ( QDomDocument &  doc,
const QgsReadWriteContext context 
) const
pure virtual

Returns labeling configuration as XML element.

Implemented in QgsMeshLayerSimpleLabeling.

◆ setSettings()

virtual void QgsAbstractMeshLayerLabeling::setSettings ( QgsPalLayerSettings settings,
const QString &  providerId = QString() 
)
pure virtual

Set pal settings for a specific provider (takes ownership).

Parameters
settingsPal layer settings
providerIdThe id of the provider

Implemented in QgsMeshLayerSimpleLabeling.

◆ settings()

virtual QgsPalLayerSettings QgsAbstractMeshLayerLabeling::settings ( const QString &  providerId = QString()) const
pure virtual

Gets associated label settings.

In case of multiple sub-providers with different settings, they are identified by their ID.

Implemented in QgsMeshLayerSimpleLabeling.

◆ subProviders()

virtual QStringList QgsAbstractMeshLayerLabeling::subProviders ( ) const
inlinevirtual

Gets list of sub-providers within the layer's labeling.

Definition at line 67 of file qgsmeshlayerlabeling.h.

◆ toSld()

virtual void QgsAbstractMeshLayerLabeling::toSld ( QDomNode &  parent,
const QVariantMap &  props 
) const
inlinevirtual

Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings.

Definition at line 107 of file qgsmeshlayerlabeling.h.

◆ type()

virtual QString QgsAbstractMeshLayerLabeling::type ( ) const
pure virtual

Unique type string of the labeling configuration implementation.

Implemented in QgsMeshLayerSimpleLabeling.


The documentation for this class was generated from the following files: