16 #ifndef QGSVECTORLAYERDIAGRAMPROVIDER_H 17 #define QGSVECTORLAYERDIAGRAMPROVIDER_H 21 #include "qgis_core.h" 72 QList<QgsLabelFeature *> labelFeatures(
QgsRenderContext &context )
override;
84 virtual bool prepare(
const QgsRenderContext &context, QSet<QString> &attributeNames );
128 #endif // QGSVECTORLAYERDIAGRAMPROVIDER_H GEOSGeometry * geometry() const
Gets access to the associated geometry.
Container of fields for a vector layer.
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...
QList< QgsLabelFeature * > mFeatures
List of generated label features (owned by the provider)
bool mOwnsSource
Whether layer's feature source is owned.
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine...
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
pal::Layer * layer() const
Gets PAL layer of the label feature. Should be only used internally in PAL.
Base class that can be used for any class that is capable of returning features.
QgsFields mFields
Layer's fields.
The QgsAbstractLabelProvider class is an interface class.
QgsCoordinateReferenceSystem mLayerCrs
Layer's CRS.
QSizeF size() const
Size of the label (in map units)
Stores the settings for rendering of all diagrams for a layer.
Class that adds extra information to QgsLabelFeature for labeling of diagrams.
Contains information about the context of a rendering operation.
The QgsLabelFeature class describes a feature that should be used within the labeling engine...
QgsAttributes mAttributes
Stores attribute values for diagram rendering.
GEOSGeometry * obstacleGeometry() const
Returns the label's obstacle geometry, if different to the feature geometry.
QgsDiagramLabelFeature(QgsFeatureId id, geos::unique_ptr geometry, QSizeF size)
Create label feature, takes ownership of the geometry instance.
void setAttributes(const QgsAttributes &attrs)
Store feature's attributes - used for rendering of diagrams.
This class represents a coordinate reference system (CRS).
LabelPosition is a candidate feature label position.
const QgsAttributes & attributes()
Gets feature's attributes - used for rendering of diagrams.
Represents a vector layer which manages a vector based data sets.
QgsDiagramLayerSettings mSettings
Diagram layer settings.