QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Renders the diagrams for all features with the same settings. More...
#include <qgsdiagramrendererv2.h>
Public Member Functions | |
QgsSingleCategoryDiagramRenderer () | |
~QgsSingleCategoryDiagramRenderer () | |
QgsSingleCategoryDiagramRenderer * | clone () const override |
Returns new instance that is equivalent to this one. More... | |
QList< QString > | diagramAttributes () const override |
Returns attribute indices needed for diagram rendering. More... | |
QList< QgsDiagramSettings > | diagramSettings () const override |
Returns list with all diagram settings in the renderer. More... | |
QList< QgsLayerTreeModelLegendNode *> | legendItems (QgsLayerTreeLayer *nodeLayer) const override |
Returns list of legend nodes for the diagram. More... | |
void | readXML (const QDomElement &elem, const QgsVectorLayer *layer) override |
QString | rendererName () const override |
void | setDiagramSettings (const QgsDiagramSettings &s) |
void | writeXML (QDomElement &layerElem, QDomDocument &doc, const QgsVectorLayer *layer) const override |
Public Member Functions inherited from QgsDiagramRendererV2 | |
QgsDiagramRendererV2 () | |
virtual | ~QgsDiagramRendererV2 () |
bool | attributeLegend () const |
Returns true if renderer will show legend items for diagram attributes. More... | |
QgsDiagram * | diagram () const |
virtual QSet< QString > | referencedFields (const QgsExpressionContext &context=QgsExpressionContext(), const QgsFields &fields=QgsFields()) const |
Returns the set of any fields required for diagram rendering. More... | |
void | renderDiagram (const QgsFeature &feature, QgsRenderContext &c, QPointF pos) const |
void | setAttributeLegend (bool enabled) |
Sets whether the renderer will show legend items for diagram attributes. More... | |
void | setDiagram (QgsDiagram *d) |
void | setSizeLegend (bool enabled) |
Sets whether the renderer will show legend items for diagram sizes. More... | |
void | setSizeLegendSymbol (QgsMarkerSymbolV2 *symbol) |
Sets the marker symbol used for rendering the diagram size legend. More... | |
bool | sizeLegend () const |
Returns true if renderer will show legend items for diagram sizes. More... | |
QgsMarkerSymbolV2 * | sizeLegendSymbol () const |
Returns the marker symbol used for rendering the diagram size legend. More... | |
virtual QSizeF | sizeMapUnits (const QgsFeature &feature, const QgsRenderContext &c) const |
Returns size of the diagram for a feature in map units. More... | |
Protected Member Functions | |
bool | diagramSettings (const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s) const override |
Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered). More... | |
QSizeF | diagramSize (const QgsFeature &, const QgsRenderContext &c) const override |
Returns size of the diagram (in painter units) or an invalid size in case of error. More... | |
Protected Member Functions inherited from QgsDiagramRendererV2 | |
QgsDiagramRendererV2 (const QgsDiagramRendererV2 &other) | |
void | _readXML (const QDomElement &elem, const QgsVectorLayer *layer) |
void | _writeXML (QDomElement &rendererElem, QDomDocument &doc, const QgsVectorLayer *layer) const |
void | convertSizeToMapUnits (QSizeF &size, const QgsRenderContext &context) const |
Converts size from mm to map units. More... | |
QgsDiagramRendererV2 & | operator= (const QgsDiagramRendererV2 &other) |
Additional Inherited Members | |
Static Protected Member Functions inherited from QgsDiagramRendererV2 | |
static int | dpiPaintDevice (const QPainter *) |
Returns the paint device dpi (or -1 in case of error. More... | |
Protected Attributes inherited from QgsDiagramRendererV2 | |
QgsDiagram * | mDiagram |
Reference to the object that does the real diagram rendering. More... | |
bool | mShowAttributeLegend |
Whether to show an attribute legend for the diagrams. More... | |
bool | mShowSizeLegend |
Whether to show a size legend for the diagrams. More... | |
QScopedPointer< QgsMarkerSymbolV2 > | mSizeLegendSymbol |
Marker symbol to use in size legends. More... | |
Renders the diagrams for all features with the same settings.
Definition at line 556 of file qgsdiagramrendererv2.h.
QgsSingleCategoryDiagramRenderer::QgsSingleCategoryDiagramRenderer | ( | ) |
Definition at line 549 of file qgsdiagramrendererv2.cpp.
QgsSingleCategoryDiagramRenderer::~QgsSingleCategoryDiagramRenderer | ( | ) |
Definition at line 553 of file qgsdiagramrendererv2.cpp.
|
overridevirtual |
Returns new instance that is equivalent to this one.
Implements QgsDiagramRendererV2.
Definition at line 557 of file qgsdiagramrendererv2.cpp.
Returns attribute indices needed for diagram rendering.
Implements QgsDiagramRendererV2.
Definition at line 566 of file qgsdiagramrendererv2.h.
|
overridevirtual |
Returns list with all diagram settings in the renderer.
Implements QgsDiagramRendererV2.
Definition at line 574 of file qgsdiagramrendererv2.cpp.
|
overrideprotectedvirtual |
Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered).
Used internally within renderDiagram()
feature | the feature |
c | render context |
s | out: diagram settings for the feature |
Implements QgsDiagramRendererV2.
Definition at line 562 of file qgsdiagramrendererv2.cpp.
|
overrideprotectedvirtual |
Returns size of the diagram (in painter units) or an invalid size in case of error.
Implements QgsDiagramRendererV2.
Definition at line 569 of file qgsdiagramrendererv2.cpp.
|
overridevirtual |
Returns list of legend nodes for the diagram.
Reimplemented from QgsDiagramRendererV2.
Definition at line 723 of file qgsdiagramrendererv2.cpp.
|
overridevirtual |
Implements QgsDiagramRendererV2.
Definition at line 581 of file qgsdiagramrendererv2.cpp.
|
inlineoverridevirtual |
Implements QgsDiagramRendererV2.
Definition at line 564 of file qgsdiagramrendererv2.h.
|
inline |
Definition at line 568 of file qgsdiagramrendererv2.h.
|
overridevirtual |
Implements QgsDiagramRendererV2.
Definition at line 593 of file qgsdiagramrendererv2.cpp.