16 #ifndef QGSVECTORLAYERLABELPROVIDER_H 17 #define QGSVECTORLAYERLABELPROVIDER_H 21 #include "qgis_core.h" 45 const QString &providerId,
48 const QString &layerName = QString() );
68 virtual bool prepare(
QgsRenderContext &context, QSet<QString> &attributeNames );
122 std::unique_ptr<QgsAbstractFeatureSource>
mSource;
129 friend class TestQgsLabelingEngine;
133 #endif // QGSVECTORLAYERLABELPROVIDER_H QList< QgsLabelFeature * > mLabels
List of generated.
QgsWkbTypes::GeometryType mLayerGeometryType
Geometry type of layer.
virtual void drawLabelBackground(QgsRenderContext &context, pal::LabelPosition *label) const
Draw the background for the specified label.
Abstract base class for all rendered symbols.
std::unique_ptr< QgsAbstractFeatureSource > mSource
Layer's feature source.
Container of fields for a vector layer.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
A geometry is the spatial representation of a feature.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
virtual QList< QgsLabelFeature * > labelFeatures(QgsRenderContext &context)=0
Returns list of label features (they are owned by the provider and thus deleted on its destruction) ...
QList< QgsSymbol * > QgsSymbolList
QgsPalLayerSettings mSettings
Layer's labeling configuration.
virtual void drawUnplacedLabel(QgsRenderContext &context, pal::LabelPosition *label) const
Draw an unplaced label.
Base class that can be used for any class that is capable of returning features.
The QgsAbstractLabelProvider class is an interface class.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
TextPart
Components of text.
QgsFields mFields
Layer's fields.
Contains information about the context of a rendering operation.
QgsCoordinateReferenceSystem mCrs
Layer's CRS.
This class represents a coordinate reference system (CRS).
LabelPosition is a candidate feature label position.
virtual void startRender(QgsRenderContext &context)
To be called before rendering of labels begins.
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.
Represents a vector layer which manages a vector based data sets.