QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Protected Member Functions | List of all members
QgsLinearlyInterpolatedDiagramRenderer Class Reference

#include <qgsdiagramrendererv2.h>

Inheritance diagram for QgsLinearlyInterpolatedDiagramRenderer:
Inheritance graph
[legend]

Public Member Functions

 QgsLinearlyInterpolatedDiagramRenderer ()
 
 ~QgsLinearlyInterpolatedDiagramRenderer ()
 
int classificationAttribute () const
 
QString classificationAttributeExpression () const
 
bool classificationAttributeIsExpression () const
 
QgsLinearlyInterpolatedDiagramRendererclone () const override
 Returns new instance that is equivalent to this one. More...
 
QList< QStringdiagramAttributes () const override
 Returns attribute indices needed for diagram rendering. More...
 
QList< QgsDiagramSettingsdiagramSettings () 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...
 
QSizeF lowerSize () const
 
double lowerValue () const
 
void readXML (const QDomElement &elem, const QgsVectorLayer *layer) override
 
virtual QSet< QStringreferencedFields (const QgsExpressionContext &context=QgsExpressionContext(), const QgsFields &fields=QgsFields()) const override
 Returns the set of any fields required for diagram rendering. More...
 
QString rendererName () const override
 
void setClassificationAttribute (int index)
 
void setClassificationAttributeExpression (const QString &expression)
 
void setClassificationAttributeIsExpression (bool isExpression)
 
void setDiagramSettings (const QgsDiagramSettings &s)
 
void setLowerSize (QSizeF s)
 
void setLowerValue (double val)
 
void setUpperSize (QSizeF s)
 
void setUpperValue (double val)
 
QSizeF upperSize () const
 
double upperValue () const
 
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...
 
QgsDiagramdiagram () const
 
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...
 
QgsMarkerSymbolV2sizeLegendSymbol () 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...
 
QgsDiagramRendererV2operator= (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
QgsDiagrammDiagram
 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< QgsMarkerSymbolV2mSizeLegendSymbol
 Marker symbol to use in size legends. More...
 

Detailed Description

Definition at line 589 of file qgsdiagramrendererv2.h.

Constructor & Destructor Documentation

◆ QgsLinearlyInterpolatedDiagramRenderer()

QgsLinearlyInterpolatedDiagramRenderer::QgsLinearlyInterpolatedDiagramRenderer ( )

Definition at line 602 of file qgsdiagramrendererv2.cpp.

◆ ~QgsLinearlyInterpolatedDiagramRenderer()

QgsLinearlyInterpolatedDiagramRenderer::~QgsLinearlyInterpolatedDiagramRenderer ( )

Definition at line 607 of file qgsdiagramrendererv2.cpp.

Member Function Documentation

◆ classificationAttribute()

int QgsLinearlyInterpolatedDiagramRenderer::classificationAttribute ( ) const
inline

Definition at line 620 of file qgsdiagramrendererv2.h.

◆ classificationAttributeExpression()

QString QgsLinearlyInterpolatedDiagramRenderer::classificationAttributeExpression ( ) const
inline

Definition at line 623 of file qgsdiagramrendererv2.h.

◆ classificationAttributeIsExpression()

bool QgsLinearlyInterpolatedDiagramRenderer::classificationAttributeIsExpression ( ) const
inline

Definition at line 626 of file qgsdiagramrendererv2.h.

◆ clone()

QgsLinearlyInterpolatedDiagramRenderer * QgsLinearlyInterpolatedDiagramRenderer::clone ( ) const
overridevirtual

Returns new instance that is equivalent to this one.

Note
added in 2.4

Implements QgsDiagramRendererV2.

Definition at line 611 of file qgsdiagramrendererv2.cpp.

◆ diagramAttributes()

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

Returns attribute indices needed for diagram rendering.

Implements QgsDiagramRendererV2.

Definition at line 630 of file qgsdiagramrendererv2.cpp.

◆ diagramSettings() [1/2]

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

Returns list with all diagram settings in the renderer.

Implements QgsDiagramRendererV2.

Definition at line 616 of file qgsdiagramrendererv2.cpp.

◆ diagramSettings() [2/2]

bool QgsLinearlyInterpolatedDiagramRenderer::diagramSettings ( const QgsFeature feature,
const QgsRenderContext c,
QgsDiagramSettings s 
) const
overrideprotectedvirtual

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

◆ diagramSize()

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

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

Implements QgsDiagramRendererV2.

Definition at line 653 of file qgsdiagramrendererv2.cpp.

◆ legendItems()

QList< QgsLayerTreeModelLegendNode *> QgsLinearlyInterpolatedDiagramRenderer::legendItems ( QgsLayerTreeLayer nodeLayer) const
overridevirtual

Returns list of legend nodes for the diagram.

Note
caller is responsible for deletion of QgsLayerTreeModelLegendNodes
added in 2.10

Reimplemented from QgsDiagramRendererV2.

Definition at line 732 of file qgsdiagramrendererv2.cpp.

◆ lowerSize()

QSizeF QgsLinearlyInterpolatedDiagramRenderer::lowerSize ( ) const
inline

Definition at line 615 of file qgsdiagramrendererv2.h.

◆ lowerValue()

double QgsLinearlyInterpolatedDiagramRenderer::lowerValue ( ) const
inline

Definition at line 609 of file qgsdiagramrendererv2.h.

◆ readXML()

void QgsLinearlyInterpolatedDiagramRenderer::readXML ( const QDomElement elem,
const QgsVectorLayer layer 
)
overridevirtual

Implements QgsDiagramRendererV2.

Definition at line 658 of file qgsdiagramrendererv2.cpp.

◆ referencedFields()

QSet< QString > QgsLinearlyInterpolatedDiagramRenderer::referencedFields ( const QgsExpressionContext context = QgsExpressionContext(),
const QgsFields fields = QgsFields() 
) const
overridevirtual

Returns the set of any fields required for diagram rendering.

Parameters
contextexpression context the diagrams will be drawn using
fieldslayer fields
Note
added in QGIS 2.16

Reimplemented from QgsDiagramRendererV2.

Definition at line 635 of file qgsdiagramrendererv2.cpp.

◆ rendererName()

QString QgsLinearlyInterpolatedDiagramRenderer::rendererName ( ) const
inlineoverridevirtual

Implements QgsDiagramRendererV2.

Definition at line 606 of file qgsdiagramrendererv2.h.

◆ setClassificationAttribute()

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttribute ( int  index)
inline

Definition at line 621 of file qgsdiagramrendererv2.h.

◆ setClassificationAttributeExpression()

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttributeExpression ( const QString expression)
inline

Definition at line 624 of file qgsdiagramrendererv2.h.

◆ setClassificationAttributeIsExpression()

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttributeIsExpression ( bool  isExpression)
inline

Definition at line 627 of file qgsdiagramrendererv2.h.

◆ setDiagramSettings()

void QgsLinearlyInterpolatedDiagramRenderer::setDiagramSettings ( const QgsDiagramSettings s)
inline

Definition at line 600 of file qgsdiagramrendererv2.h.

◆ setLowerSize()

void QgsLinearlyInterpolatedDiagramRenderer::setLowerSize ( QSizeF  s)
inline

Definition at line 614 of file qgsdiagramrendererv2.h.

◆ setLowerValue()

void QgsLinearlyInterpolatedDiagramRenderer::setLowerValue ( double  val)
inline

Definition at line 608 of file qgsdiagramrendererv2.h.

◆ setUpperSize()

void QgsLinearlyInterpolatedDiagramRenderer::setUpperSize ( QSizeF  s)
inline

Definition at line 617 of file qgsdiagramrendererv2.h.

◆ setUpperValue()

void QgsLinearlyInterpolatedDiagramRenderer::setUpperValue ( double  val)
inline

Definition at line 611 of file qgsdiagramrendererv2.h.

◆ upperSize()

QSizeF QgsLinearlyInterpolatedDiagramRenderer::upperSize ( ) const
inline

Definition at line 618 of file qgsdiagramrendererv2.h.

◆ upperValue()

double QgsLinearlyInterpolatedDiagramRenderer::upperValue ( ) const
inline

Definition at line 612 of file qgsdiagramrendererv2.h.

◆ writeXML()

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

Implements QgsDiagramRendererV2.

Definition at line 683 of file qgsdiagramrendererv2.cpp.


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