QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QgsLinearlyInterpolatedDiagramRenderer Class Reference

#include <qgsdiagramrendererv2.h>

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

Public Member Functions

 QgsLinearlyInterpolatedDiagramRenderer ()
 ~QgsLinearlyInterpolatedDiagramRenderer ()
QList< QgsDiagramSettingsdiagramSettings () const
 Returns list with all diagram settings in the renderer.
void setDiagramSettings (const QgsDiagramSettings &s)
QList< QString > diagramAttributes () const
 Returns attribute indices needed for diagram rendering.
QString rendererName () const
void setLowerValue (double val)
double lowerValue () const
void setUpperValue (double val)
double upperValue () const
void setLowerSize (QSizeF s)
QSizeF lowerSize () const
void setUpperSize (QSizeF s)
QSizeF upperSize () const
int classificationAttribute () const
void setClassificationAttribute (int index)
QString classificationAttributeExpression () const
void setClassificationAttributeExpression (QString expression)
bool classificationAttributeIsExpression () const
void setClassificationAttributeIsExpression (bool isExpression)
void readXML (const QDomElement &elem, const QgsVectorLayer *layer)
void writeXML (QDomElement &layerElem, QDomDocument &doc, const QgsVectorLayer *layer) const
- Public Member Functions inherited from QgsDiagramRendererV2
 QgsDiagramRendererV2 ()
virtual ~QgsDiagramRendererV2 ()
virtual QSizeF sizeMapUnits (const QgsFeature &feature, const QgsRenderContext &c)
 Returns size of the diagram for a feature in map units.
void renderDiagram (const QgsFeature &feature, QgsRenderContext &c, const QPointF &pos)
void setDiagram (QgsDiagram *d)
QgsDiagram * diagram () const

Protected Member Functions

bool diagramSettings (const QgsFeature &feature, 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 QgsFeature &, 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, const QgsVectorLayer *layer)
void _writeXML (QDomElement &rendererElem, QDomDocument &doc, const QgsVectorLayer *layer) const

Private Attributes

QgsDiagramSettings mSettings
QgsDiagramInterpolationSettings mInterpolationSettings

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
QgsDiagram * mDiagram
 Reference to the object that does the real diagram rendering.

Detailed Description

Definition at line 244 of file qgsdiagramrendererv2.h.

Constructor & Destructor Documentation

QgsLinearlyInterpolatedDiagramRenderer::QgsLinearlyInterpolatedDiagramRenderer ( )
QgsLinearlyInterpolatedDiagramRenderer::~QgsLinearlyInterpolatedDiagramRenderer ( )

Definition at line 412 of file qgsdiagramrendererv2.cpp.

Member Function Documentation

int QgsLinearlyInterpolatedDiagramRenderer::classificationAttribute ( ) const
inline

Definition at line 271 of file qgsdiagramrendererv2.h.

Referenced by QgsVectorLayer::prepareLabelingAndDiagrams().

QString QgsLinearlyInterpolatedDiagramRenderer::classificationAttributeExpression ( ) const
inline

Definition at line 274 of file qgsdiagramrendererv2.h.

Referenced by QgsVectorLayer::prepareLabelingAndDiagrams().

bool QgsLinearlyInterpolatedDiagramRenderer::classificationAttributeIsExpression ( ) const
inline

Definition at line 277 of file qgsdiagramrendererv2.h.

Referenced by QgsVectorLayer::prepareLabelingAndDiagrams().

QList< QString > QgsLinearlyInterpolatedDiagramRenderer::diagramAttributes ( ) const
virtual

Returns attribute indices needed for diagram rendering.

Implements QgsDiagramRendererV2.

Definition at line 430 of file qgsdiagramrendererv2.cpp.

References QgsDiagramSettings::categoryAttributes, and mSettings.

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

Returns list with all diagram settings in the renderer.

Implements QgsDiagramRendererV2.

Definition at line 416 of file qgsdiagramrendererv2.cpp.

References mSettings.

bool QgsLinearlyInterpolatedDiagramRenderer::diagramSettings ( const QgsFeature feature,
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
featurethe feature
crender context
sout: diagram settings for the feature

Implements QgsDiagramRendererV2.

Definition at line 423 of file qgsdiagramrendererv2.cpp.

References diagramSize(), mSettings, and QgsDiagramSettings::size.

QSizeF QgsLinearlyInterpolatedDiagramRenderer::diagramSize ( const QgsFeature features,
const QgsRenderContext c 
)
protectedvirtual

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

Implements QgsDiagramRendererV2.

Definition at line 435 of file qgsdiagramrendererv2.cpp.

References QgsDiagramRendererV2::mDiagram, mInterpolationSettings, and mSettings.

Referenced by diagramSettings().

QSizeF QgsLinearlyInterpolatedDiagramRenderer::lowerSize ( ) const
inline

Definition at line 266 of file qgsdiagramrendererv2.h.

double QgsLinearlyInterpolatedDiagramRenderer::lowerValue ( ) const
inline

Definition at line 260 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::readXML ( const QDomElement &  elem,
const QgsVectorLayer layer 
)
virtual
QString QgsLinearlyInterpolatedDiagramRenderer::rendererName ( ) const
inlinevirtual

Implements QgsDiagramRendererV2.

Definition at line 257 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttribute ( int  index)
inline

Definition at line 272 of file qgsdiagramrendererv2.h.

References index.

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttributeExpression ( QString  expression)
inline

Definition at line 275 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttributeIsExpression ( bool  isExpression)
inline

Definition at line 278 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::setDiagramSettings ( const QgsDiagramSettings s)
inline

Definition at line 253 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::setLowerSize ( QSizeF  s)
inline

Definition at line 265 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::setLowerValue ( double  val)
inline

Definition at line 259 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::setUpperSize ( QSizeF  s)
inline

Definition at line 268 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::setUpperValue ( double  val)
inline

Definition at line 262 of file qgsdiagramrendererv2.h.

QSizeF QgsLinearlyInterpolatedDiagramRenderer::upperSize ( ) const
inline

Definition at line 269 of file qgsdiagramrendererv2.h.

double QgsLinearlyInterpolatedDiagramRenderer::upperValue ( ) const
inline

Definition at line 263 of file qgsdiagramrendererv2.h.

void QgsLinearlyInterpolatedDiagramRenderer::writeXML ( QDomElement &  layerElem,
QDomDocument &  doc,
const QgsVectorLayer layer 
) const
virtual

Member Data Documentation

QgsDiagramInterpolationSettings QgsLinearlyInterpolatedDiagramRenderer::mInterpolationSettings
private
QgsDiagramSettings QgsLinearlyInterpolatedDiagramRenderer::mSettings
private

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