QGIS API Documentation 3.41.0-Master (25ec5511245)
Loading...
Searching...
No Matches
qgsdiagramrenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdiagramrenderer.h
3 ---------------------
4 begin : March 2011
5 copyright : (C) 2011 by Marco Hugentobler
6 email : marco dot hugentobler at sourcepole dot ch
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSDIAGRAMRENDERER_H
16#define QGSDIAGRAMRENDERER_H
17
18#include "qgis_core.h"
19#include "qgis_sip.h"
20#include <QColor>
21#include <QFont>
22#include <QList>
23#include <QPointF>
24#include <QSizeF>
25#include <QDomDocument>
26
30
31#include "qgsdiagram.h"
32#include "qgsreadwritecontext.h"
33#include "qgsmapunitscale.h"
34
36class QgsFeature;
38class QDomElement;
39class QgsMapToPixel;
41class QgsVectorLayer;
44class QgsPaintEffect;
46class QgsLineSymbol;
47
48namespace pal { class Layer; } SIP_SKIP
49
59class CORE_EXPORT QgsDiagramLayerSettings
60{
61 public:
62
63 //avoid inclusion of QgsPalLabeling
65 {
66 AroundPoint = 0, // Point / Polygon
67 OverPoint, // Point / Polygon
68 Line, // Line / Polygon
69 Curved, // Line
70 Horizontal, // Polygon
71 Free // Polygon
72 };
73
76 {
77 OnLine = 1,
78 AboveLine = 1 << 1,
79 BelowLine = 1 << 2,
80 MapOrientation = 1 << 4,
81 };
83
84 // *INDENT-OFF*
85
86
90 {
91 BackgroundColor,
92 StrokeColor,
93 StrokeWidth,
94 PositionX,
95 PositionY,
96 Distance,
97 Priority,
98 ZIndex,
99 IsObstacle,
100 Show,
101 AlwaysShow,
102 StartAngle,
103 };
104 // *INDENT-ON*
105
111 {
113 Stacked
114 };
115
119 static const QgsPropertiesDefinition &propertyDefinitions();
120
122
124
125 QgsDiagramLayerSettings &operator=( const QgsDiagramLayerSettings &rh );
126
128
133 Placement placement() const { return mPlacement; }
134
140 void setPlacement( Placement value ) { mPlacement = value; }
141
147 LinePlacementFlags linePlacementFlags() const { return mPlacementFlags; }
148
155 void setLinePlacementFlags( LinePlacementFlags flags ) { mPlacementFlags = flags; }
156
164 int priority() const { return mPriority; }
165
171 void setPriority( int value ) { mPriority = value; }
172
180 double zIndex() const { return mZIndex; }
181
188 void setZIndex( double index ) { mZIndex = index; }
189
194 bool isObstacle() const { return mObstacle; }
195
201 void setIsObstacle( bool isObstacle ) { mObstacle = isObstacle; }
202
207 double distance() const { return mDistance; }
208
214 void setDistance( double distance ) { mDistance = distance; }
215
220 QgsDiagramRenderer *renderer() { return mRenderer; }
221
227 const QgsDiagramRenderer *renderer() const { return mRenderer; } SIP_SKIP
228
234 void setRenderer( QgsDiagramRenderer *diagramRenderer SIP_TRANSFER );
235
242
248 void setCoordinateTransform( const QgsCoordinateTransform &transform );
249
254 bool showAllDiagrams() const { return mShowAll; }
255
261 void setShowAllDiagrams( bool showAllDiagrams ) { mShowAll = showAllDiagrams; }
262
267 void readXml( const QDomElement &elem );
268
273 void writeXml( QDomElement &layerElem, QDomDocument &doc ) const;
274
280 bool prepare( const QgsExpressionContext &context = QgsExpressionContext() ) const;
281
286 QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const;
287
292 QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
293
300 const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; } SIP_SKIP
301
308 void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
309
310 private:
311
314
316 Placement mPlacement = AroundPoint;
317
319 LinePlacementFlags mPlacementFlags = OnLine;
320
326 int mPriority = 5;
327
329 double mZIndex = 0.0;
330
332 bool mObstacle = false;
333
335 double mDistance = 0.0;
336
338 QgsDiagramRenderer *mRenderer = nullptr;
339
341 bool mShowAll = true;
342
344 QgsPropertyCollection mDataDefinedProperties;
345
346 static void initPropertyDefinitions();
347
349 static QgsPropertiesDefinition sPropertyDefinitions;
350
351};
352
362class CORE_EXPORT QgsDiagramSettings
363{
364 public:
365
367 {
369 XHeight
370 };
371
380
390
396 {
398 Vertical
399 };
400
404
405 QgsDiagramSettings &operator=( const QgsDiagramSettings &other );
406
407 bool enabled = true;
408 QFont font;
409 QList< QColor > categoryColors;
410 QList< QString > categoryAttributes;
411 QList< QString > categoryLabels;
412 QSizeF size; //size
413
418
423
428
433
435 QColor penColor;
436 double penWidth = 0.0;
440 double barWidth = 5.0;
441
443 double opacity = 1.0;
444
445 bool scaleByArea = true;
446
450 double rotationOffset = 270;
451
452 bool scaleBasedVisibility = false;
453
460 double maximumScale = 0;
461
468 double minimumScale = 0;
469
471 double minimumSize = 0.0;
472
484 double spacing() const { return mSpacing; }
485
497 void setSpacing( double spacing ) { mSpacing = spacing; }
498
507 void setSpacingUnit( Qgis::RenderUnit unit ) { mSpacingUnit = unit; }
508
516 Qgis::RenderUnit spacingUnit() const { return mSpacingUnit; }
517
526 void setSpacingMapUnitScale( const QgsMapUnitScale &scale ) { mSpacingMapUnitScale = scale; }
527
536 const QgsMapUnitScale &spacingMapUnitScale() const { return mSpacingMapUnitScale; }
537
549 double stackedDiagramSpacing() const { return mStackedDiagramSpacing; }
550
562 void setStackedDiagramSpacing( double spacing ) { mStackedDiagramSpacing = spacing; }
563
572 void setStackedDiagramSpacingUnit( Qgis::RenderUnit unit ) { mStackedDiagramSpacingUnit = unit; }
573
582 Qgis::RenderUnit stackedDiagramSpacingUnit() const { return mStackedDiagramSpacingUnit; }
583
592 void setStackedDiagramSpacingMapUnitScale( const QgsMapUnitScale &scale ) { mStackedDiagramSpacingMapUnitScale = scale; }
593
602 const QgsMapUnitScale &stackedDiagramSpacingMapUnitScale() const { return mStackedDiagramSpacingMapUnitScale; }
603
610 Direction direction() const;
611
618 void setDirection( Direction direction );
619
621 void readXml( const QDomElement &elem, const QgsReadWriteContext &context = QgsReadWriteContext() );
623 void writeXml( QDomElement &rendererElem, QDomDocument &doc, const QgsReadWriteContext &context = QgsReadWriteContext() ) const;
624
629 QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const SIP_FACTORY;
630
639 QgsLineSymbol *axisLineSymbol() const;
640
651 void setAxisLineSymbol( QgsLineSymbol *symbol SIP_TRANSFER );
652
661 bool showAxis() const;
662
671 void setShowAxis( bool showAxis );
672
680 QgsPaintEffect *paintEffect() const;
681
691 void setPaintEffect( QgsPaintEffect *effect SIP_TRANSFER );
692
693 private:
694
695 double mSpacing = 0;
697 QgsMapUnitScale mSpacingMapUnitScale;
698
699 double mStackedDiagramSpacing = 0;
700 Qgis::RenderUnit mStackedDiagramSpacingUnit = Qgis::RenderUnit::Millimeters;
701 QgsMapUnitScale mStackedDiagramSpacingMapUnitScale;
702
703 Direction mDirection = Counterclockwise;
704
705 bool mShowAxis = false;
706 std::unique_ptr< QgsLineSymbol > mAxisLineSymbol;
707 std::unique_ptr< QgsPaintEffect > mPaintEffect;
708
709};
710
730
731
738class CORE_EXPORT QgsDiagramRenderer
739{
740
741#ifdef SIP_RUN
743 if ( sipCpp->rendererName() == QLatin1String( "SingleCategory" ) )
744 sipType = sipType_QgsSingleCategoryDiagramRenderer;
745 else if ( sipCpp->rendererName() == QLatin1String( "LinearlyInterpolated" ) )
746 sipType = sipType_QgsLinearlyInterpolatedDiagramRenderer;
747 else if ( sipCpp->rendererName() == QLatin1String( "Stacked" ) )
748 sipType = sipType_QgsStackedDiagramRenderer;
749 else
750 sipType = NULL;
751 SIP_END
752#endif
753
754 public:
755
757 virtual ~QgsDiagramRenderer() = default;
758
763
765 virtual QSizeF sizeMapUnits( const QgsFeature &feature, const QgsRenderContext &c ) const;
766
767 virtual QString rendererName() const = 0;
768
770 virtual QList<QString> diagramAttributes() const = 0;
771
776 virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const;
777
781 virtual void renderDiagram( const QgsFeature &feature, QgsRenderContext &c, QPointF pos, const QgsPropertyCollection &properties = QgsPropertyCollection() ) const;
782
783 void setDiagram( QgsDiagram *d SIP_TRANSFER );
784 QgsDiagram *diagram() const { return mDiagram.get(); }
785
787 virtual QList<QgsDiagramSettings> diagramSettings() const = 0;
788
794 virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) = 0;
795
801 virtual void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
802
807 virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const SIP_FACTORY;
808
813 bool attributeLegend() const { return mShowAttributeLegend; }
814
820 void setAttributeLegend( bool enabled ) { mShowAttributeLegend = enabled; }
821
822 protected:
824 QgsDiagramRenderer &operator=( const QgsDiagramRenderer &other );
825
832 virtual bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const = 0;
833
839 virtual QSizeF diagramSize( const QgsFeature &feature, const QgsRenderContext &c ) const = 0;
840
842 void convertSizeToMapUnits( QSizeF &size, const QgsRenderContext &context ) const;
843
845 static int dpiPaintDevice( const QPainter * );
846
847 //read / write diagram
848
853 void _readXml( const QDomElement &elem, const QgsReadWriteContext &context );
854
859 void _writeXml( QDomElement &rendererElem, QDomDocument &doc, const QgsReadWriteContext &context ) const;
860
862 std::unique_ptr< QgsDiagram > mDiagram;
863
865 bool mShowAttributeLegend = true;
866
868};
869
875{
876 public:
877 static const QString DIAGRAM_RENDERER_NAME_SINGLE_CATEGORY SIP_SKIP;
878
880
881 QgsSingleCategoryDiagramRenderer *clone() const override SIP_FACTORY;
882
883 QString rendererName() const override { return QgsSingleCategoryDiagramRenderer::DIAGRAM_RENDERER_NAME_SINGLE_CATEGORY; }
884
885 QList<QString> diagramAttributes() const override { return mSettings.categoryAttributes; }
886
887 void setDiagramSettings( const QgsDiagramSettings &s ) { mSettings = s; }
888
889 QList<QgsDiagramSettings> diagramSettings() const override;
890
891 void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
892 void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context ) const override;
893
894 QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const override SIP_FACTORY;
895
896 protected:
897 bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const override;
898
899 QSizeF diagramSize( const QgsFeature &, const QgsRenderContext &c ) const override;
900
901 private:
902 QgsDiagramSettings mSettings;
903};
904
911{
912 public:
913 static const QString DIAGRAM_RENDERER_NAME_LINEARLY_INTERPOLATED SIP_SKIP;
914
918
920
922
924 QList<QgsDiagramSettings> diagramSettings() const override;
925
926 void setDiagramSettings( const QgsDiagramSettings &s ) { mSettings = s; }
927
928 QList<QString> diagramAttributes() const override;
929
930 QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const override;
931
933
934 void setLowerValue( double val ) { mInterpolationSettings.lowerValue = val; }
935 double lowerValue() const { return mInterpolationSettings.lowerValue; }
936
937 void setUpperValue( double val ) { mInterpolationSettings.upperValue = val; }
938 double upperValue() const { return mInterpolationSettings.upperValue; }
939
940 void setLowerSize( QSizeF s ) { mInterpolationSettings.lowerSize = s; }
941 QSizeF lowerSize() const { return mInterpolationSettings.lowerSize; }
942
943 void setUpperSize( QSizeF s ) { mInterpolationSettings.upperSize = s; }
944 QSizeF upperSize() const { return mInterpolationSettings.upperSize; }
945
950 QString classificationField() const { return mInterpolationSettings.classificationField; }
951
956 void setClassificationField( const QString &field ) { mInterpolationSettings.classificationField = field; }
957
958 QString classificationAttributeExpression() const { return mInterpolationSettings.classificationAttributeExpression; }
959 void setClassificationAttributeExpression( const QString &expression ) { mInterpolationSettings.classificationAttributeExpression = expression; }
960
961 bool classificationAttributeIsExpression() const { return mInterpolationSettings.classificationAttributeIsExpression; }
962 void setClassificationAttributeIsExpression( bool isExpression ) { mInterpolationSettings.classificationAttributeIsExpression = isExpression; }
963
964 void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
965 void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context ) const override;
966
967 QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const override SIP_FACTORY;
968
972 void setDataDefinedSizeLegend( QgsDataDefinedSizeLegend *settings SIP_TRANSFER );
973
977 QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const;
978
979 protected:
980 bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const override;
981
982 QSizeF diagramSize( const QgsFeature &, const QgsRenderContext &c ) const override;
983
984 private:
985 QgsDiagramSettings mSettings;
986 QgsDiagramInterpolationSettings mInterpolationSettings;
987
989 QgsDataDefinedSizeLegend *mDataDefinedSizeLegend = nullptr;
990};
991
1001{
1002 public:
1003 static const QString DIAGRAM_RENDERER_NAME_STACKED SIP_SKIP;
1004
1006 ~QgsStackedDiagramRenderer() override;
1007
1009
1010 QgsStackedDiagramRenderer &operator=( const QgsStackedDiagramRenderer &other );
1011
1012 QgsStackedDiagramRenderer *clone() const override SIP_FACTORY;
1013
1015 virtual QSizeF sizeMapUnits( const QgsFeature &feature, const QgsRenderContext &c ) const override;
1016
1022 virtual void renderDiagram( const QgsFeature &feature, QgsRenderContext &c, QPointF pos, const QgsPropertyCollection &properties = QgsPropertyCollection() ) const override;
1023
1025 QList<QgsDiagramSettings> diagramSettings() const override;
1026
1027 void setDiagramSettings( const QgsDiagramSettings &s ) { mSettings = s; }
1028
1029 QList<QString> diagramAttributes() const override;
1030
1032
1033 void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
1034 void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context ) const override;
1035
1040 void _readXmlSubRenderers( const QDomElement &elem, const QgsReadWriteContext &context );
1041
1046 void _writeXmlSubRenderers( QDomElement &rendererElem, QDomDocument &doc, const QgsReadWriteContext &context ) const;
1047
1048 QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const override SIP_FACTORY;
1049
1056 QList< QgsDiagramRenderer * > renderers( bool sortByDiagramMode = false ) const;
1057
1066 void addRenderer( QgsDiagramRenderer *renderer SIP_TRANSFER );
1067
1073 const QgsDiagramRenderer *renderer( const int index ) const;
1074
1076 int rendererCount() const;
1077
1078 protected:
1079 bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const override;
1080 QSizeF diagramSize( const QgsFeature &, const QgsRenderContext &c ) const override;
1081
1082 private:
1083 QgsDiagramSettings mSettings;
1084 QList< QgsDiagramRenderer * > mDiagramRenderers;
1085};
1086
1087
1088#endif // QGSDIAGRAMRENDERER_H
RenderUnit
Rendering size units.
Definition qgis.h:4839
@ Millimeters
Millimeters.
Class for doing transforms between two map coordinate systems.
Object that keeps configuration of appearance of marker symbol's data-defined size in legend.
Additional diagram settings for interpolated size rendering.
QString classificationField
Name of the field for classification.
Stores the settings for rendering of all diagrams for a layer.
LinePlacementFlag
Line placement flags for controlling line based placements.
void setZIndex(double index)
Sets the diagram z-index.
Placement placement() const
Returns the diagram placement.
QgsCoordinateTransform coordinateTransform() const
Returns the coordinate transform associated with the layer, or an invalid transform if no transformat...
QFlags< LinePlacementFlag > LinePlacementFlags
bool showAllDiagrams() const
Returns whether the layer should show all diagrams, including overlapping diagrams.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the diagram's property collection, used for data defined overrides.
LinePlacementFlags linePlacementFlags() const
Returns the diagram placement flags.
Property
Data definable properties.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the diagram's property collection, used for data defined overrides.
void setShowAllDiagrams(bool showAllDiagrams)
Sets whether the layer should show all diagrams, including overlapping diagrams.
void setDistance(double distance)
Sets the distance between the diagram and the feature.
void setPriority(int value)
Sets the diagram priority.
int priority() const
Returns the diagram priority.
const QgsDiagramRenderer * renderer() const
Returns the diagram renderer associated with the layer.
void setIsObstacle(bool isObstacle)
Sets whether the feature associated with a diagram acts as an obstacle for other labels or diagrams.
QgsDiagramRenderer * renderer()
Returns the diagram renderer associated with the layer.
bool isObstacle() const
Returns whether the feature associated with a diagram acts as an obstacle for other labels or diagram...
void setPlacement(Placement value)
Sets the diagram placement.
void setLinePlacementFlags(LinePlacementFlags flags)
Sets the the diagram placement flags.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the diagram's property collection, used for data defined overrides.
double zIndex() const
Returns the diagram z-index.
double distance() const
Returns the distance between the diagram and the feature (in mm).
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
virtual QString rendererName() const =0
QgsDiagram * diagram() const
virtual QSizeF diagramSize(const QgsFeature &feature, const QgsRenderContext &c) const =0
Returns size of the diagram (in painter units) or an invalid size in case of error.
void setAttributeLegend(bool enabled)
Sets whether the renderer will show legend items for diagram attributes.
virtual bool diagramSettings(const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s) const =0
Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered...
virtual void writeXml(QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context) const =0
Writes diagram state to a DOM element.
virtual QList< QString > diagramAttributes() const =0
Returns attribute indices needed for diagram rendering.
std::unique_ptr< QgsDiagram > mDiagram
Reference to the object that does the real diagram rendering.
virtual ~QgsDiagramRenderer()=default
virtual QList< QgsDiagramSettings > diagramSettings() const =0
Returns list with all diagram settings in the renderer.
QgsDiagramRenderer()=default
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context)=0
Reads diagram state from a DOM element.
bool attributeLegend() const
Returns true if renderer will show legend items for diagram attributes.
virtual QgsDiagramRenderer * clone() const =0
Returns new instance that is equivalent to this one.
Stores the settings for rendering a single diagram.
void setStackedDiagramSpacing(double spacing)
Sets the spacing between subdiagrams in a stacked diagram.
DiagramOrientation
Orientation of histogram.
void setStackedDiagramSpacingUnit(Qgis::RenderUnit unit)
Sets the unit for the spacing between subdiagrams in a stacked diagram.
void setSpacingUnit(Qgis::RenderUnit unit)
Sets the unit for the content spacing.
QList< QString > categoryAttributes
QList< QString > categoryLabels
Qgis::RenderUnit stackedDiagramSpacingUnit() const
Returns the units for the spacing between subdiagrams in a stacked diagram.
QgsMapUnitScale lineSizeScale
Line unit scale.
StackedDiagramMode
Orientation of the stacked diagrams.
double spacing() const
Returns the spacing between diagram contents.
QList< QColor > categoryColors
QgsMapUnitScale sizeScale
Diagram size unit scale.
const QgsMapUnitScale & stackedDiagramSpacingMapUnitScale() const
Returns the map unit scale for the spacing between subdiagrams in a stacked diagram.
void setSpacing(double spacing)
Sets the spacing between diagram contents.
void setSpacingMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the content spacing.
const QgsMapUnitScale & spacingMapUnitScale() const
Returns the map unit scale for the content spacing.
Direction
Angular directions.
@ Counterclockwise
Counter-clockwise orientation.
@ Clockwise
Clockwise orientation.
double stackedDiagramSpacing() const
Returns the spacing between subdiagrams in a stacked diagram.
void setStackedDiagramSpacingMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the spacing between subdiagrams in a stacked diagram.
Qgis::RenderUnit spacingUnit() const
Returns the units for the content spacing.
Base class for all diagram types.
Definition qgsdiagram.h:40
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Layer tree node points to a map layer.
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
A line symbol type, for rendering LineString and MultiLineString geometries.
Alters the size of rendered diagrams using a linear scaling.
QString classificationField() const
Returns the field name used for interpolating the diagram size.
void setClassificationAttributeExpression(const QString &expression)
void setClassificationField(const QString &field)
Sets the field name used for interpolating the diagram size.
void setClassificationAttributeIsExpression(bool isExpression)
static const QString DIAGRAM_RENDERER_NAME_LINEARLY_INTERPOLATED
Perform transforms between map coordinates and device coordinates.
Struct for storing maximum and minimum scales for measurements in map units.
Base class for visual effects which can be applied to QPicture drawings.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
Renders the diagrams for all features with the same settings.
void setDiagramSettings(const QgsDiagramSettings &s)
static const QString DIAGRAM_RENDERER_NAME_SINGLE_CATEGORY
QList< QString > diagramAttributes() const override
Returns attribute indices needed for diagram rendering.
Renders diagrams using mixed diagram render types.
static const QString DIAGRAM_RENDERER_NAME_STACKED
QString rendererName() const override
QgsStackedDiagramRenderer()=default
Represents a vector layer which manages a vector based data sets.
A set of features which influence the labeling process.
Definition layer.h:63
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:191
#define SIP_ENUM_BASETYPE(type)
Definition qgis_sip.h:278
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition qgis_sip.h:271
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_END
Definition qgis_sip.h:208
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.