QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSVECTORTILELABELING_H
17 #define QGSVECTORTILELABELING_H
19 #include "qgis_core.h"
53 virtual QSet< QString >
requiredLayers(
QgsRenderContext &context,
int tileZoom )
const { Q_UNUSED( context ); Q_UNUSED( tileZoom );
return QSet< QString >() << QString(); }
56 virtual void setFields(
const QMap<QString, QgsFields> &perLayerFields ) = 0;
76 const QString type = sipCpp->type();
78 if ( type == QLatin1String(
"basic" ) )
79 sipType = sipType_QgsVectorTileBasicLabeling;
89 virtual QString
type()
const = 0;
109 #endif // QGSVECTORTILELABELING_H
virtual ~QgsVectorTileLabeling()=default
Implements a map layer that is dedicated to rendering of vector tiles.
The class is used as a container of context for various read/write operations on other objects.
Internal base class for implementation of label providers for vector tile labeling.
virtual void resolveReferences(const QgsProject &project)
Resolves references to other objects - second phase of loading - after readXml()
Contains information about the context of a rendering operation.
Contains decoded features of a single vector tile and any other data necessary for rendering of it.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
virtual QgsVectorTileLabelProvider * provider(QgsVectorTileLayer *layer) const SIP_SKIP
Factory for label provider implementation.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
virtual void setFields(const QMap< QString, QgsFields > &perLayerFields)=0
Sets fields for each sub-layer.
virtual QMap< QString, QSet< QString > > usedAttributes(const QgsRenderContext &context, int tileZoom) const =0
Returns field names for each sub-layer that are required for labeling.
virtual QSet< QString > requiredLayers(QgsRenderContext &context, int tileZoom) const
Returns a list of the layers required for labeling.
virtual QgsVectorTileLabeling * clone() const =0SIP_FACTORY
Returns a new copy of the object.
virtual void registerTileFeatures(const QgsVectorTileRendererData &tile, QgsRenderContext &context)=0
Registers label features for given tile to the labeling engine.
virtual QString type() const =0
Unique type string of the labeling configuration implementation.
QgsMapLayer * layer() const
Returns the associated layer, or nullptr if no layer is associated with the provider.
Base class for labeling configuration classes for vector tile layers.
QgsVectorTileLabelProvider(QgsVectorTileLayer *layer)
Constructs base label provider class for the given vector tile layer.
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context)=0
Reads labeling properties from given XML element.
virtual void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const =0
Writes labeling properties to given XML element.