QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsMeshLayerSimpleLabeling Class Reference

Basic implementation of the labeling interface for mesh layer. More...

#include <qgsmeshlayerlabeling.h>

Inheritance diagram for QgsMeshLayerSimpleLabeling:
Inheritance graph
[legend]

Public Member Functions

 QgsMeshLayerSimpleLabeling (const QgsPalLayerSettings &settings, bool labelFaces=false)
 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.
 
QgsMeshLayerSimpleLabelingclone () const override
 Returns a new copy of the object.
 
void multiplyOpacity (double opacityFactor) override
 Multiply opacity by opacityFactor.
 
QgsMeshLayerLabelProviderprovider (QgsMeshLayer *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.
 
QString type () const override
 Unique type string of the labeling configuration implementation.
 
- Public Member Functions inherited from QgsAbstractMeshLayerLabeling
 QgsAbstractMeshLayerLabeling ()=default
 
virtual ~QgsAbstractMeshLayerLabeling ()=default
 
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.
 

Static Public Member Functions

static QgsMeshLayerSimpleLabelingcreate (const QDomElement &element, const QgsReadWriteContext &context)
 Create the instance from a DOM element with saved configuration.
 
- Static Public Member Functions inherited from QgsAbstractMeshLayerLabeling
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

Basic implementation of the labeling interface for mesh layer.

Since
QGIS 3.36

Definition at line 144 of file qgsmeshlayerlabeling.h.

Constructor & Destructor Documentation

◆ QgsMeshLayerSimpleLabeling()

QgsMeshLayerSimpleLabeling::QgsMeshLayerSimpleLabeling ( const QgsPalLayerSettings settings,
bool  labelFaces = false 
)
explicit

Constructs simple labeling configuration with given initial settings.

Labels are placed on mesh vertices unless labelFaces is true, when they are placed on mesh faces.

Definition at line 54 of file qgsmeshlayerlabeling.cpp.

Member Function Documentation

◆ accept()

bool QgsMeshLayerSimpleLabeling::accept ( QgsStyleEntityVisitorInterface visitor) const
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 QgsAbstractMeshLayerLabeling.

Definition at line 90 of file qgsmeshlayerlabeling.cpp.

◆ clone()

QgsMeshLayerSimpleLabeling * QgsMeshLayerSimpleLabeling::clone ( ) const
overridevirtual

Returns a new copy of the object.

Implements QgsAbstractMeshLayerLabeling.

Definition at line 65 of file qgsmeshlayerlabeling.cpp.

◆ create()

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

Create the instance from a DOM element with saved configuration.

Definition at line 106 of file qgsmeshlayerlabeling.cpp.

◆ multiplyOpacity()

void QgsMeshLayerSimpleLabeling::multiplyOpacity ( double  opacityFactor)
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 QgsAbstractMeshLayerLabeling.

Definition at line 120 of file qgsmeshlayerlabeling.cpp.

◆ provider()

QgsMeshLayerLabelProvider * QgsMeshLayerSimpleLabeling::provider ( QgsMeshLayer layer) const
overridevirtual
Note
not available in Python bindings

Reimplemented from QgsAbstractMeshLayerLabeling.

Definition at line 70 of file qgsmeshlayerlabeling.cpp.

◆ requiresAdvancedEffects()

bool QgsMeshLayerSimpleLabeling::requiresAdvancedEffects ( ) const
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 QgsAbstractMeshLayerLabeling.

Definition at line 101 of file qgsmeshlayerlabeling.cpp.

◆ save()

QDomElement QgsMeshLayerSimpleLabeling::save ( QDomDocument &  doc,
const QgsReadWriteContext context 
) const
overridevirtual

Returns labeling configuration as XML element.

Implements QgsAbstractMeshLayerLabeling.

Definition at line 75 of file qgsmeshlayerlabeling.cpp.

◆ setSettings()

void QgsMeshLayerSimpleLabeling::setSettings ( QgsPalLayerSettings settings,
const QString &  providerId = QString() 
)
overridevirtual

Set pal settings (takes ownership).

Parameters
settingsPal layer settings
providerIdUnused parameter

Implements QgsAbstractMeshLayerLabeling.

Definition at line 127 of file qgsmeshlayerlabeling.cpp.

◆ settings()

QgsPalLayerSettings QgsMeshLayerSimpleLabeling::settings ( const QString &  providerId = QString()) const
overridevirtual

Gets associated label settings.

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

Implements QgsAbstractMeshLayerLabeling.

Definition at line 84 of file qgsmeshlayerlabeling.cpp.

◆ type()

QString QgsMeshLayerSimpleLabeling::type ( ) const
overridevirtual

Unique type string of the labeling configuration implementation.

Implements QgsAbstractMeshLayerLabeling.

Definition at line 60 of file qgsmeshlayerlabeling.cpp.


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