16 #ifndef QGSVECTORLAYERDIAGRAMPROVIDER_H
17 #define QGSVECTORLAYERDIAGRAMPROVIDER_H
21 #include "qgis_core.h"
84 virtual bool prepare(
const QgsRenderContext &context, QSet<QString> &attributeNames );
105 void setClipFeatureGeometry(
const QgsGeometry &geometry );
Base class that can be used for any class that is capable of returning features.
The QgsAbstractLabelProvider class is an interface class.
virtual void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const =0
Draw this label at the position determined by the labeling engine.
virtual QList< QgsLabelFeature * > labelFeatures(QgsRenderContext &context)=0
Returns list of label features (they are owned by the provider and thus deleted on its destruction)
This class represents a coordinate reference system (CRS).
Class that adds extra information to QgsLabelFeature for labeling of diagrams.
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.
QgsAttributes mAttributes
Stores attribute values for diagram rendering.
QgsDiagramLabelFeature(QgsFeatureId id, geos::unique_ptr geometry, QSizeF size)
Create label feature, takes ownership of the geometry instance.
Stores the settings for rendering of all diagrams for a layer.
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
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.
The QgsLabelFeature class describes a feature that should be used within the labeling engine.
QSizeF size(double angle=0.0) const
Size of the label (in map units)
QgsFeatureId id() const
Identifier of the label (unique within the parent label provider)
GEOSGeometry * geometry() const
Gets access to the associated geometry.
Contains information about the context of a rendering operation.
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine.
QgsDiagramLayerSettings mSettings
Diagram layer settings.
bool mOwnsSource
Whether layer's feature source is owned.
QgsCoordinateReferenceSystem mLayerCrs
Layer's CRS.
QList< QgsLabelFeature * > mFeatures
List of generated label features (owned by the provider)
QgsFields mFields
Layer's fields.
QgsGeometry mLabelClipFeatureGeom
Represents a vector layer which manages a vector based data sets.
LabelPosition is a candidate feature label position.
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features