16#ifndef QGSVECTORLAYERLABELPROVIDER_H
17#define QGSVECTORLAYERLABELPROVIDER_H
45 const QString &providerId,
48 const QString &layerName = QString() );
54 const QString &providerId,
57 const QString &layerName = QString() );
77 virtual bool prepare(
QgsRenderContext &context, QSet<QString> &attributeNames );
117 void setFields(
const QgsFields &fields );
140 std::unique_ptr<QgsAbstractFeatureSource>
mSource;
147 friend class TestQgsLabelingEngine;
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
TextComponent
Text components.
Base class that can be used for any class that is capable of returning features.
The QgsAbstractLabelProvider class is an interface class.
virtual QList< QgsLabelFeature * > labelFeatures(QgsRenderContext &context)=0
Returns list of label features (they are owned by the provider and thus deleted on its destruction)
virtual void drawUnplacedLabel(QgsRenderContext &context, pal::LabelPosition *label) const
Draw an unplaced label.
virtual void stopRender(QgsRenderContext &context)
To be called after rendering is complete.
virtual void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const =0
Draw this label at the position determined by the labeling engine.
virtual void drawLabelBackground(QgsRenderContext &context, pal::LabelPosition *label) const
Draw the background for the specified label.
virtual void startRender(QgsRenderContext &context)
To be called before rendering of labels begins.
This class represents a coordinate reference system (CRS).
Abstract base class for all 2D vector feature renderers.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Container of fields for a vector layer.
A geometry is the spatial representation of a feature.
Base class for all map layer types.
Contains settings for how a map layer will be labeled.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
QgsCoordinateReferenceSystem mCrs
Layer's CRS.
QgsFields mFields
Layer's fields.
QList< QgsLabelFeature * > mLabels
List of generated.
Qgis::GeometryType mLayerGeometryType
Geometry type of layer.
QgsPalLayerSettings mSettings
Layer's labeling configuration.
std::unique_ptr< QgsAbstractFeatureSource > mSource
Layer's feature source.
Represents a vector layer which manages a vector based data sets.
Implementation class for QgsVectorTileBasicLabeling.
LabelPosition is a candidate feature label position.
QList< QgsSymbol * > QgsSymbolList
const QgsCoordinateReferenceSystem & crs