QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
Basic implementation of the labeling interface for mesh layer. More...
#include <qgsmeshlayerlabeling.h>
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. | |
QgsMeshLayerSimpleLabeling * | clone () const override |
Returns a new copy of the object. | |
void | multiplyOpacity (double opacityFactor) override |
Multiply opacity by opacityFactor. | |
QgsMeshLayerLabelProvider * | provider (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 QgsMeshLayerSimpleLabeling * | create (const QDomElement &element, const QgsReadWriteContext &context) |
Create the instance from a DOM element with saved configuration. | |
Static Public Member Functions inherited from QgsAbstractMeshLayerLabeling | |
static QgsAbstractMeshLayerLabeling * | create (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. | |
Basic implementation of the labeling interface for mesh layer.
Definition at line 144 of file qgsmeshlayerlabeling.h.
|
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.
|
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.
|
overridevirtual |
Returns a new copy of the object.
Implements QgsAbstractMeshLayerLabeling.
Definition at line 65 of file qgsmeshlayerlabeling.cpp.
|
static |
Create the instance from a DOM element with saved configuration.
Definition at line 106 of file qgsmeshlayerlabeling.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 QgsAbstractMeshLayerLabeling.
Definition at line 120 of file qgsmeshlayerlabeling.cpp.
|
overridevirtual |
Reimplemented from QgsAbstractMeshLayerLabeling.
Definition at line 70 of file qgsmeshlayerlabeling.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 QgsAbstractMeshLayerLabeling.
Definition at line 101 of file qgsmeshlayerlabeling.cpp.
|
overridevirtual |
Returns labeling configuration as XML element.
Implements QgsAbstractMeshLayerLabeling.
Definition at line 75 of file qgsmeshlayerlabeling.cpp.
|
overridevirtual |
Set pal settings (takes ownership).
settings | Pal layer settings |
providerId | Unused parameter |
Implements QgsAbstractMeshLayerLabeling.
Definition at line 127 of file qgsmeshlayerlabeling.cpp.
|
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.
|
overridevirtual |
Unique type string of the labeling configuration implementation.
Implements QgsAbstractMeshLayerLabeling.
Definition at line 60 of file qgsmeshlayerlabeling.cpp.