QGIS/python/core/diagram/qgstextdiagram.sip
Nyall Dawson efb84ea2fa [FEATURE][diagrams] Add optional legend entries for diagram sizes
A new "legend" tab has been added to diagram properties, allowing
both the existing attribute legend and a new size legend to be
enabled/disabled. The size legend has a configurable marker
symbol.

Also includes unit tests for both diagram attribute and size
legends.

Sponsored by ADUGA
2016-04-19 08:16:05 +10:00

33 lines
880 B
Plaintext

class QgsTextDiagram: QgsDiagram
{
%TypeHeaderCode
#include <qgstextdiagram.h>
%End
public:
enum Shape
{
Circle,
Rectangle,
Triangle
};
enum Orientation
{
Horizontal,
Vertical
};
QgsTextDiagram();
~QgsTextDiagram();
virtual QgsTextDiagram* clone() const /Factory/;
void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, const QgsDiagramSettings& s, QPointF position );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is );
double legendSize( double value, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) const;
QString diagramName() const;
};