Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes
QgsSingleCategoryDiagramRenderer Class Reference

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

#include <qgsdiagramrendererv2.h>

Inheritance diagram for QgsSingleCategoryDiagramRenderer:
Inheritance graph
[legend]
Collaboration diagram for QgsSingleCategoryDiagramRenderer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 QgsSingleCategoryDiagramRenderer ()
 ~QgsSingleCategoryDiagramRenderer ()
QString rendererName () const
QList< int > diagramAttributes () const
 Returns attribute indices needed for diagram rendering.
void setDiagramSettings (const QgsDiagramSettings &s)
QList< QgsDiagramSettingsdiagramSettings () const
 Returns list with all diagram settings in the renderer.
void readXML (const QDomElement &elem)
void writeXML (QDomElement &layerElem, QDomDocument &doc) const
- Public Member Functions inherited from QgsDiagramRendererV2
 QgsDiagramRendererV2 ()
virtual ~QgsDiagramRendererV2 ()
virtual QSizeF sizeMapUnits (const QgsAttributeMap &attributes, const QgsRenderContext &c)
 Returns size of the diagram for feature f in map units.
void renderDiagram (const QgsAttributeMap &att, QgsRenderContext &c, const QPointF &pos)
void setDiagram (QgsDiagram *d)
const QgsDiagramdiagram () const

Protected Member Functions

bool diagramSettings (const QgsAttributeMap &, 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 QgsAttributeMap &attributes, const QgsRenderContext &c)
 Returns size of the diagram (in painter units) or an invalid size in case of error.
- Protected Member Functions inherited from QgsDiagramRendererV2
void convertSizeToMapUnits (QSizeF &size, const QgsRenderContext &context) const
 Converts size from mm to map units.
void _readXML (const QDomElement &elem)
void _writeXML (QDomElement &rendererElem, QDomDocument &doc) const

Private Attributes

QgsDiagramSettings mSettings

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.
- Protected Attributes inherited from QgsDiagramRendererV2
QgsDiagrammDiagram
 Reference to the object that does the real diagram rendering.

Detailed Description

Renders the diagrams for all features with the same settings.

Definition at line 148 of file qgsdiagramrendererv2.h.


Constructor & Destructor Documentation

QgsSingleCategoryDiagramRenderer::QgsSingleCategoryDiagramRenderer ( )

Definition at line 223 of file qgsdiagramrendererv2.cpp.

QgsSingleCategoryDiagramRenderer::~QgsSingleCategoryDiagramRenderer ( )

Definition at line 227 of file qgsdiagramrendererv2.cpp.


Member Function Documentation

QList<int> QgsSingleCategoryDiagramRenderer::diagramAttributes ( ) const
inlinevirtual

Returns attribute indices needed for diagram rendering.

Implements QgsDiagramRendererV2.

Definition at line 156 of file qgsdiagramrendererv2.h.

QList< QgsDiagramSettings > QgsSingleCategoryDiagramRenderer::diagramSettings ( ) const
virtual

Returns list with all diagram settings in the renderer.

Implements QgsDiagramRendererV2.

Definition at line 237 of file qgsdiagramrendererv2.cpp.

References mSettings.

bool QgsSingleCategoryDiagramRenderer::diagramSettings ( const QgsAttributeMap att,
const QgsRenderContext c,
QgsDiagramSettings s 
)
protectedvirtual

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 231 of file qgsdiagramrendererv2.cpp.

References mSettings.

QSizeF QgsSingleCategoryDiagramRenderer::diagramSize ( const QgsAttributeMap attributes,
const QgsRenderContext c 
)
inlineprotectedvirtual

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

Implements QgsDiagramRendererV2.

Definition at line 168 of file qgsdiagramrendererv2.h.

void QgsSingleCategoryDiagramRenderer::readXML ( const QDomElement &  elem)
virtual
QString QgsSingleCategoryDiagramRenderer::rendererName ( ) const
inlinevirtual

Implements QgsDiagramRendererV2.

Definition at line 154 of file qgsdiagramrendererv2.h.

void QgsSingleCategoryDiagramRenderer::setDiagramSettings ( const QgsDiagramSettings s)
inline

Definition at line 158 of file qgsdiagramrendererv2.h.

void QgsSingleCategoryDiagramRenderer::writeXML ( QDomElement &  layerElem,
QDomDocument &  doc 
) const
virtual

Member Data Documentation

QgsDiagramSettings QgsSingleCategoryDiagramRenderer::mSettings
private

Definition at line 171 of file qgsdiagramrendererv2.h.

Referenced by diagramSettings(), readXML(), and writeXML().


The documentation for this class was generated from the following files: