QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Abstract base class for labeling settings for raster layers. More...
#include <qgsrasterlabeling.h>
Public Member Functions | |
QgsAbstractRasterLayerLabeling ()=default | |
QgsAbstractRasterLayerLabeling (const QgsAbstractRasterLayerLabeling &rhs)=delete | |
QgsAbstractRasterLayerLabeling cannot be copied, use clone() instead. | |
virtual | ~QgsAbstractRasterLayerLabeling ()=default |
virtual bool | accept (QgsStyleEntityVisitorInterface *visitor) const |
Accepts the specified symbology visitor, causing it to visit all symbols associated with the labeling. | |
virtual QgsAbstractRasterLayerLabeling * | clone () const =0 |
Returns a new copy of the object. | |
virtual bool | isInScaleRange (double scale) const |
Tests whether the labels should be visible at the specified scale. | |
virtual void | multiplyOpacity (double opacityFactor) |
Multiply opacity by opacityFactor. | |
QgsAbstractRasterLayerLabeling & | operator= (const QgsAbstractRasterLayerLabeling &rhs)=delete |
QgsAbstractRasterLayerLabeling cannot be copied, use clone() instead. | |
virtual std::unique_ptr< QgsRasterLayerLabelProvider > | provider (QgsRasterLayer *layer) const =0 |
Creates a raster label provider corresponding to this object's configuration. | |
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 |
Saves the labeling configuration to an XML element. | |
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 QgsAbstractRasterLayerLabeling * | createFromElement (const QDomElement &element, const QgsReadWriteContext &context) |
Tries to create an instance of an implementation based on the XML data. | |
static QgsAbstractRasterLayerLabeling * | defaultLabelingForLayer (QgsRasterLayer *layer) |
Creates default labeling for a raster layer. | |
Abstract base class for labeling settings for raster layers.
Definition at line 168 of file qgsrasterlabeling.h.
|
default |
|
virtualdefault |
|
delete |
QgsAbstractRasterLayerLabeling cannot be copied, use clone() instead.
|
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 QgsRasterLayerSimpleLabeling.
Definition at line 344 of file qgsrasterlabeling.cpp.
|
pure virtual |
Returns a new copy of the object.
Implemented in QgsRasterLayerSimpleLabeling.
|
static |
Tries to create an instance of an implementation based on the XML data.
Definition at line 323 of file qgsrasterlabeling.cpp.
|
static |
Creates default labeling for a raster layer.
Definition at line 613 of file qgsrasterlabeling.cpp.
|
virtual |
Tests whether the labels should be visible at the specified scale.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
true
if the labels are visible at the given scale. Reimplemented in QgsRasterLayerSimpleLabeling.
Definition at line 318 of file qgsrasterlabeling.cpp.
|
virtual |
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 QgsRasterLayerSimpleLabeling.
Definition at line 313 of file qgsrasterlabeling.cpp.
|
delete |
QgsAbstractRasterLayerLabeling cannot be copied, use clone() instead.
|
pure virtual |
Creates a raster label provider corresponding to this object's configuration.
Implemented in QgsRasterLayerSimpleLabeling.
|
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 QgsRasterLayerSimpleLabeling.
|
pure virtual |
Saves the labeling configuration to an XML element.
Implemented in QgsRasterLayerSimpleLabeling.
|
virtual |
Writes the SE 1.1 TextSymbolizer element based on the current layer labeling settings.
Definition at line 336 of file qgsrasterlabeling.cpp.
|
pure virtual |
Unique type string of the labeling configuration implementation.
Implemented in QgsRasterLayerSimpleLabeling.