QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
16 #ifndef QGSVECTORLAYERDIAGRAMPROVIDER_H
17 #define QGSVECTORLAYERDIAGRAMPROVIDER_H
21 #include "qgis_core.h"
84 virtual bool prepare(
const QgsRenderContext &context, QSet<QString> &attributeNames );
128 #endif // QGSVECTORLAYERDIAGRAMPROVIDER_H
QgsFeatureId id() const
Identifier of the label (unique within the parent label provider)
virtual void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const =0
Draw this label at the position determined by the labeling engine.
QgsDiagramLayerSettings mSettings
Diagram layer settings.
LabelPosition is a candidate feature label position.
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine....
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
The QgsAbstractLabelProvider class is an interface class. Implementations return list of labels and t...
bool mOwnsSource
Whether layer's feature source is owned.
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< QgsLabelFeature * > mFeatures
List of generated label features (owned by the provider)
QgsFields mFields
Layer's fields.
Stores the settings for rendering of all diagrams for a layer.
QgsCoordinateReferenceSystem mLayerCrs
Layer's CRS.
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
QgsDiagramLabelFeature(QgsFeatureId id, geos::unique_ptr geometry, QSizeF size)
Create label feature, takes ownership of the geometry instance.
QSizeF size(double angle=0.0) const
Size of the label (in map units)
GEOSGeometry * geometry() const
Gets access to the associated geometry.
const QgsAttributes & attributes()
Gets feature's attributes - used for rendering of diagrams.
void setAttributes(const QgsAttributes &attrs)
Store feature's attributes - used for rendering of diagrams.
The QgsLabelFeature class describes a feature that should be used within the labeling engine....
QgsAttributes mAttributes
Stores attribute values for diagram rendering.