QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
16 #ifndef QGSVECTORLAYERLABELPROVIDER_H
17 #define QGSVECTORLAYERLABELPROVIDER_H
21 #include "qgis_core.h"
46 const QString &providerId,
49 const QString &layerName = QString() );
55 const QString &providerId,
58 const QString &layerName = QString() );
78 virtual bool prepare(
QgsRenderContext &context, QSet<QString> &attributeNames );
140 std::unique_ptr<QgsAbstractFeatureSource>
mSource;
147 friend class TestQgsLabelingEngine;
151 #endif // QGSVECTORLAYERLABELPROVIDER_H
virtual void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const =0
Draw this label at the position determined by the labeling engine.
virtual void stopRender(QgsRenderContext &context)
To be called after rendering is complete.
TextPart
Components of text.
const QgsCoordinateReferenceSystem & crs
LabelPosition is a candidate feature label position.
void setFields(const QgsFields &fields)
Sets fields of this label provider.
virtual void drawUnplacedLabel(QgsRenderContext &context, pal::LabelPosition *label) const
Draw an unplaced label.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers....
std::unique_ptr< QgsAbstractFeatureSource > mSource
Layer's feature source.
QgsFields mFields
Layer's fields.
The QgsAbstractLabelProvider class is an interface class. Implementations return list of labels and t...
QList< QgsSymbol * > QgsSymbolList
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 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.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
QgsPalLayerSettings mSettings
Layer's labeling configuration.
QList< QgsLabelFeature * > mLabels
List of generated.
QgsWkbTypes::GeometryType mLayerGeometryType
Geometry type of layer.
QgsCoordinateReferenceSystem mCrs
Layer's CRS.