QGIS API Documentation  master-59fd5e0
QgsSingleCategoryDiagramRenderer Class Reference

Renders the diagrams for all features with the same settings. More...

#include <qgsdiagramrendererv2.h>

+ Inheritance diagram for QgsSingleCategoryDiagramRenderer:
+ Collaboration diagram for QgsSingleCategoryDiagramRenderer:

List of all members.

Public Member Functions

 QgsSingleCategoryDiagramRenderer ()
 ~QgsSingleCategoryDiagramRenderer ()
QList< int > diagramAttributes () const
 Returns attribute indices needed for diagram rendering.
QList< QgsDiagramSettingsdiagramSettings () const
 Returns list with all diagram settings in the renderer.
void readXML (const QDomElement &elem, const QgsVectorLayer *layer)
QString rendererName () const
void setDiagramSettings (const QgsDiagramSettings &s)
void writeXML (QDomElement &layerElem, QDomDocument &doc, const QgsVectorLayer *layer) const

Protected Member Functions

bool diagramSettings (const QgsAttributes &, const QgsRenderContext &c, QgsDiagramSettings &s)
 Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered).
QSizeF diagramSize (const QgsAttributes &attributes, const QgsRenderContext &c)
 Returns size of the diagram (in painter units) or an invalid size in case of error.

Private Attributes

QgsDiagramSettings mSettings

Detailed Description

Renders the diagrams for all features with the same settings.

Definition at line 216 of file qgsdiagramrendererv2.h.


Constructor & Destructor Documentation


Member Function Documentation

QList<int> QgsSingleCategoryDiagramRenderer::diagramAttributes ( ) const [inline, virtual]

Returns attribute indices needed for diagram rendering.

Implements QgsDiagramRendererV2.

Definition at line 224 of file qgsdiagramrendererv2.h.

Returns list with all diagram settings in the renderer.

Implements QgsDiagramRendererV2.

Definition at line 375 of file qgsdiagramrendererv2.cpp.

References mSettings.

bool QgsSingleCategoryDiagramRenderer::diagramSettings ( const QgsAttributes att,
const QgsRenderContext c,
QgsDiagramSettings s 
) [protected, virtual]

Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered).

Used internally within renderDiagram()

Parameters:
attattribute map
crender context
sout: diagram settings for the feature

Implements QgsDiagramRendererV2.

Definition at line 363 of file qgsdiagramrendererv2.cpp.

References mSettings.

QSizeF QgsSingleCategoryDiagramRenderer::diagramSize ( const QgsAttributes attributes,
const QgsRenderContext c 
) [protected, virtual]

Returns size of the diagram (in painter units) or an invalid size in case of error.

Implements QgsDiagramRendererV2.

Definition at line 370 of file qgsdiagramrendererv2.cpp.

References QgsDiagram::diagramSize(), QgsDiagramRendererV2::mDiagram, and mSettings.

void QgsSingleCategoryDiagramRenderer::readXML ( const QDomElement &  elem,
const QgsVectorLayer layer 
) [virtual]
QString QgsSingleCategoryDiagramRenderer::rendererName ( ) const [inline, virtual]

Implements QgsDiagramRendererV2.

Definition at line 222 of file qgsdiagramrendererv2.h.

void QgsSingleCategoryDiagramRenderer::writeXML ( QDomElement &  layerElem,
QDomDocument &  doc,
const QgsVectorLayer layer 
) const [virtual]

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines