QGIS API Documentation  2.99.0-Master (0a63d1f)
Public Member Functions | Protected Member Functions | List of all members
QgsLinearlyInterpolatedDiagramRenderer Class Reference

#include <qgsdiagramrenderer.h>

Inheritance diagram for QgsLinearlyInterpolatedDiagramRenderer:
Inheritance graph
[legend]

Public Member Functions

 QgsLinearlyInterpolatedDiagramRenderer ()
 
QString classificationAttributeExpression () const
 
bool classificationAttributeIsExpression () const
 
QString classificationField () const
 Returns the field name used for interpolating the diagram size. More...
 
QgsLinearlyInterpolatedDiagramRendererclone () 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< 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< QString > referencedFields (const QgsExpressionContext &context=QgsExpressionContext()) const override
 Returns the set of any fields required for diagram rendering. More...
 
QString rendererName () const override
 
void setClassificationAttributeExpression (const QString &expression)
 
void setClassificationAttributeIsExpression (bool isExpression)
 
void setClassificationField (const QString &field)
 Sets the field name used for interpolating the diagram size. More...
 
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 QgsDiagramRenderer
 QgsDiagramRenderer ()
 
virtual ~QgsDiagramRenderer ()
 
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 (QgsMarkerSymbol *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...
 
QgsMarkerSymbolsizeLegendSymbol () 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. Returns an invalid QSizeF in case of error. 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 QgsDiagramRenderer
 QgsDiagramRenderer (const QgsDiagramRenderer &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...
 
QgsDiagramRendereroperator= (const QgsDiagramRenderer &other)
 

Additional Inherited Members

- Static Protected Member Functions inherited from QgsDiagramRenderer
static int dpiPaintDevice (const QPainter *)
 Returns the paint device dpi (or -1 in case of error. More...
 
- Protected Attributes inherited from QgsDiagramRenderer
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< QgsMarkerSymbolmSizeLegendSymbol
 Marker symbol to use in size legends. More...
 

Detailed Description

Definition at line 557 of file qgsdiagramrenderer.h.

Constructor & Destructor Documentation

◆ QgsLinearlyInterpolatedDiagramRenderer()

QgsLinearlyInterpolatedDiagramRenderer::QgsLinearlyInterpolatedDiagramRenderer ( )

Definition at line 572 of file qgsdiagramrenderer.cpp.

Member Function Documentation

◆ classificationAttributeExpression()

QString QgsLinearlyInterpolatedDiagramRenderer::classificationAttributeExpression ( ) const
inline

Definition at line 601 of file qgsdiagramrenderer.h.

◆ classificationAttributeIsExpression()

bool QgsLinearlyInterpolatedDiagramRenderer::classificationAttributeIsExpression ( ) const
inline

Definition at line 604 of file qgsdiagramrenderer.h.

◆ classificationField()

QString QgsLinearlyInterpolatedDiagramRenderer::classificationField ( ) const
inline

Returns the field name used for interpolating the diagram size.

See also
setClassificationField()
Note
added in QGIS 3.0

Definition at line 592 of file qgsdiagramrenderer.h.

◆ clone()

QgsLinearlyInterpolatedDiagramRenderer * QgsLinearlyInterpolatedDiagramRenderer::clone ( ) const
overridevirtual

Returns new instance that is equivalent to this one.

Note
added in 2.4

Implements QgsDiagramRenderer.

Definition at line 577 of file qgsdiagramrenderer.cpp.

◆ diagramAttributes()

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

Returns attribute indices needed for diagram rendering.

Implements QgsDiagramRenderer.

Definition at line 596 of file qgsdiagramrenderer.cpp.

◆ diagramSettings() [1/2]

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

Returns list with all diagram settings in the renderer.

Implements QgsDiagramRenderer.

Definition at line 582 of file qgsdiagramrenderer.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 QgsDiagramRenderer.

Definition at line 589 of file qgsdiagramrenderer.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 QgsDiagramRenderer.

Definition at line 619 of file qgsdiagramrenderer.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 QgsDiagramRenderer.

Definition at line 705 of file qgsdiagramrenderer.cpp.

◆ lowerSize()

QSizeF QgsLinearlyInterpolatedDiagramRenderer::lowerSize ( ) const
inline

Definition at line 582 of file qgsdiagramrenderer.h.

◆ lowerValue()

double QgsLinearlyInterpolatedDiagramRenderer::lowerValue ( ) const
inline

Definition at line 576 of file qgsdiagramrenderer.h.

◆ readXml()

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

Implements QgsDiagramRenderer.

Definition at line 624 of file qgsdiagramrenderer.cpp.

◆ referencedFields()

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

Returns the set of any fields required for diagram rendering.

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

Reimplemented from QgsDiagramRenderer.

Definition at line 601 of file qgsdiagramrenderer.cpp.

◆ rendererName()

QString QgsLinearlyInterpolatedDiagramRenderer::rendererName ( ) const
inlineoverridevirtual

Implements QgsDiagramRenderer.

Definition at line 573 of file qgsdiagramrenderer.h.

◆ setClassificationAttributeExpression()

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttributeExpression ( const QString &  expression)
inline

Definition at line 602 of file qgsdiagramrenderer.h.

◆ setClassificationAttributeIsExpression()

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationAttributeIsExpression ( bool  isExpression)
inline

Definition at line 605 of file qgsdiagramrenderer.h.

◆ setClassificationField()

void QgsLinearlyInterpolatedDiagramRenderer::setClassificationField ( const QString &  field)
inline

Sets the field name used for interpolating the diagram size.

See also
classificationField()
Note
added in QGIS 3.0

Definition at line 599 of file qgsdiagramrenderer.h.

◆ setDiagramSettings()

void QgsLinearlyInterpolatedDiagramRenderer::setDiagramSettings ( const QgsDiagramSettings s)
inline

Definition at line 567 of file qgsdiagramrenderer.h.

◆ setLowerSize()

void QgsLinearlyInterpolatedDiagramRenderer::setLowerSize ( QSizeF  s)
inline

Definition at line 581 of file qgsdiagramrenderer.h.

◆ setLowerValue()

void QgsLinearlyInterpolatedDiagramRenderer::setLowerValue ( double  val)
inline

Definition at line 575 of file qgsdiagramrenderer.h.

◆ setUpperSize()

void QgsLinearlyInterpolatedDiagramRenderer::setUpperSize ( QSizeF  s)
inline

Definition at line 584 of file qgsdiagramrenderer.h.

◆ setUpperValue()

void QgsLinearlyInterpolatedDiagramRenderer::setUpperValue ( double  val)
inline

Definition at line 578 of file qgsdiagramrenderer.h.

◆ upperSize()

QSizeF QgsLinearlyInterpolatedDiagramRenderer::upperSize ( ) const
inline

Definition at line 585 of file qgsdiagramrenderer.h.

◆ upperValue()

double QgsLinearlyInterpolatedDiagramRenderer::upperValue ( ) const
inline

Definition at line 579 of file qgsdiagramrenderer.h.

◆ writeXml()

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

Implements QgsDiagramRenderer.

Definition at line 656 of file qgsdiagramrenderer.cpp.


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