QGIS/python/core/auto_generated/qgsdiagramrenderer.sip.in

764 lines
18 KiB
Plaintext
Raw Normal View History

2017-05-23 14:08:16 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsdiagramrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2017-10-01 01:09:50 +02:00
class QgsDiagramLayerSettings
{
2017-05-23 14:08:16 +02:00
%Docstring
Stores the settings for rendering of all diagrams for a layer.
2017-05-23 14:08:16 +02:00
2017-12-15 10:36:55 -04:00
QgsDiagramSettings stores the settings related to rendering the individual diagrams themselves, while
QgsDiagramLayerSettings stores settings which control how ALL diagrams within a layer are rendered.
%End
2017-05-23 14:08:16 +02:00
%TypeHeaderCode
#include "qgsdiagramrenderer.h"
%End
2014-05-27 23:22:50 +02:00
public:
2017-05-23 14:08:16 +02:00
enum Placement
{
2017-05-23 14:08:16 +02:00
AroundPoint,
OverPoint,
Line,
Curved,
Horizontal,
Free
};
enum LinePlacementFlag
{
2014-06-02 21:00:51 +02:00
OnLine,
AboveLine,
BelowLine,
MapOrientation,
};
typedef QFlags<QgsDiagramLayerSettings::LinePlacementFlag> LinePlacementFlags;
2017-05-23 14:08:16 +02:00
enum Property
2017-01-02 11:31:35 +10:00
{
2017-05-23 14:08:16 +02:00
BackgroundColor,
StrokeColor,
StrokeWidth,
PositionX,
PositionY,
Distance,
Priority,
ZIndex,
IsObstacle,
Show,
AlwaysShow,
StartAngle,
2017-01-02 11:31:35 +10:00
};
static const QgsPropertiesDefinition &propertyDefinitions();
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the diagram property definitions.
2017-05-23 14:08:16 +02:00
.. versionadded:: 3.0
%End
QgsDiagramLayerSettings();
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsDiagramLayerSettings.
2017-05-23 14:08:16 +02:00
%End
QgsDiagramLayerSettings( const QgsDiagramLayerSettings &rh );
2017-05-23 14:08:16 +02:00
%Docstring
Copy constructor
%End
~QgsDiagramLayerSettings();
Placement placement() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the diagram placement.
.. seealso:: :py:func:`setPlacement`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setPlacement( Placement value );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the diagram placement.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param value: placement value
.. seealso:: :py:func:`placement`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
LinePlacementFlags linePlacementFlags() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the diagram placement flags. These are only used if the diagram placement
is set to a line type.
.. seealso:: :py:func:`setLinePlacementFlags`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setLinePlacementFlags( LinePlacementFlags flags );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the the diagram placement flags. These are only used if the diagram placement
is set to a line type.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param flags: placement value
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`linePlacementFlags`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
int priority() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the diagram priority.
:return: diagram priority, where 0 = low and 10 = high
2017-05-23 14:08:16 +02:00
.. note::
placement priority is shared with labeling, so diagrams with a high priority may displace labels
2018-01-12 20:51:17 -04:00
and vice-versa
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setPriority`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setPriority( int value );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the diagram priority.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param value: priority, where 0 = low and 10 = high
.. seealso:: :py:func:`priority`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
double zIndex() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the diagram z-index. Diagrams (or labels) with a higher z-index are drawn over diagrams
with a lower z-index.
2017-05-23 14:08:16 +02:00
.. note::
z-index ordering is shared with labeling, so diagrams with a high z-index may be drawn over labels
2018-01-12 20:51:17 -04:00
with a low z-index and vice-versa
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setZIndex`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setZIndex( double index );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the diagram z-index. Diagrams (or labels) with a higher z-index are drawn over diagrams
with a lower z-index.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param index: diagram z-index
.. seealso:: :py:func:`zIndex`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
bool isObstacle() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the feature associated with a diagram acts as an obstacle for other labels or diagrams.
.. seealso:: :py:func:`setIsObstacle`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setIsObstacle( bool isObstacle );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the feature associated with a diagram acts as an obstacle for other labels or diagrams.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param isObstacle: set to true for feature to act as obstacle
.. seealso:: :py:func:`isObstacle`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
double distance() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the distance between the diagram and the feature (in mm).
.. seealso:: :py:func:`setDistance`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setDistance( double distance );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the distance between the diagram and the feature.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param distance: distance in mm
.. seealso:: :py:func:`distance`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
QgsDiagramRenderer *renderer();
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the diagram renderer associated with the layer.
.. seealso:: :py:func:`setRenderer`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setRenderer( QgsDiagramRenderer *diagramRenderer /Transfer/ );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the diagram renderer associated with the layer.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param diagramRenderer: diagram renderer. Ownership is transferred to the object.
.. seealso:: :py:func:`renderer`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
QgsCoordinateTransform coordinateTransform() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the coordinate transform associated with the layer, or an
invalid transform if no transformation is required.
.. seealso:: :py:func:`setCoordinateTransform`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setCoordinateTransform( const QgsCoordinateTransform &transform );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the coordinate transform associated with the layer.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param transform: coordinate transform. Ownership is transferred to the object.
.. seealso:: :py:func:`coordinateTransform`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
bool showAllDiagrams() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the layer should show all diagrams, including overlapping diagrams
.. seealso:: :py:func:`setShowAllDiagrams`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void setShowAllDiagrams( bool showAllDiagrams );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the layer should show all diagrams, including overlapping diagrams
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param showAllDiagrams: set to true to show all diagrams
.. seealso:: :py:func:`showAllDiagrams`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
void readXml( const QDomElement &elem );
%Docstring
2017-12-15 10:36:55 -04:00
Reads the diagram settings from a DOM element.
.. seealso:: :py:func:`writeXml`
2017-05-23 14:08:16 +02:00
%End
void writeXml( QDomElement &layerElem, QDomDocument &doc ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Writes the diagram settings to a DOM element.
.. seealso:: :py:func:`readXml`
2017-05-23 14:08:16 +02:00
%End
2017-05-23 14:08:16 +02:00
bool prepare( const QgsExpressionContext &context = QgsExpressionContext() ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Prepares the diagrams for a specified expression context. Calling prepare before rendering
multiple diagrams allows precalculation of expensive setup tasks such as parsing expressions.
Returns true if preparation was successful.
2017-05-23 14:08:16 +02:00
.. versionadded:: 3.0
%End
QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the set of any fields referenced by the layer's diagrams.
2017-12-15 21:36:08 -04:00
:param context: expression context the diagrams will be drawn using
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
QgsPropertyCollection &dataDefinedProperties();
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to the diagram's property collection, used for data defined overrides.
.. seealso:: :py:func:`setDataDefinedProperties`
2018-05-28 11:31:08 -04:00
.. versionadded:: 3.0
2017-05-23 14:08:16 +02:00
%End
2017-01-02 11:31:35 +10:00
void setDataDefinedProperties( const QgsPropertyCollection &collection );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the diagram's property collection, used for data defined overrides.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param collection: property collection. Existing properties will be replaced.
.. seealso:: :py:func:`dataDefinedProperties`
2018-05-28 11:31:08 -04:00
.. versionadded:: 3.0
2017-05-23 14:08:16 +02:00
%End
2017-01-23 12:22:40 +10:00
};
class QgsDiagramSettings
{
2017-05-23 14:08:16 +02:00
%Docstring
Stores the settings for rendering a single diagram.
2017-05-23 14:08:16 +02:00
2017-12-15 10:36:55 -04:00
QgsDiagramSettings stores the settings related to rendering the individual diagrams themselves, while
QgsDiagramLayerSettings stores settings which control how ALL diagrams within a layer are rendered.
2017-05-23 14:08:16 +02:00
%End
%TypeHeaderCode
2017-05-23 14:08:16 +02:00
#include "qgsdiagramrenderer.h"
%End
public:
enum LabelPlacementMethod
{
Height,
XHeight
};
enum DiagramOrientation
{
Up,
Down,
Left,
Right
};
QgsDiagramSettings();
2017-11-11 15:22:19 +10:00
%Docstring
Constructor for QgsDiagramSettings
%End
bool enabled;
QFont font;
QList< QColor > categoryColors;
QList< QString > categoryAttributes;
QList< QString > categoryLabels;
QSizeF size; //size
QgsUnitTypes::RenderUnit sizeType;
QgsMapUnitScale sizeScale;
QgsUnitTypes::RenderUnit lineSizeUnit;
QgsMapUnitScale lineSizeScale;
QColor backgroundColor;
QColor penColor;
double penWidth;
LabelPlacementMethod labelPlacementMethod;
DiagramOrientation diagramOrientation;
double barWidth;
double opacity;
bool scaleByArea;
double rotationOffset;
bool scaleBasedVisibility;
double maximumScale;
double minimumScale;
double minimumSize;
2017-05-23 14:08:16 +02:00
void readXml( const QDomElement &elem );
%Docstring
Reads diagram settings from XML
%End
void writeXml( QDomElement &rendererElem, QDomDocument &doc ) const;
%Docstring
Writes diagram settings to XML
%End
QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const /Factory/;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns list of legend nodes for the diagram
2017-05-23 14:08:16 +02:00
.. note::
2017-12-19 11:43:52 -04:00
caller is responsible for deletion of :py:class:`QgsLayerTreeModelLegendNodes`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.10
%End
2016-02-14 03:50:23 +01:00
};
class QgsDiagramInterpolationSettings
{
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Additional diagram settings for interpolated size rendering.
2017-05-23 14:08:16 +02:00
%End
%TypeHeaderCode
2017-05-23 14:08:16 +02:00
#include "qgsdiagramrenderer.h"
%End
public:
QSizeF lowerSize;
QSizeF upperSize;
double lowerValue;
double upperValue;
2017-05-23 14:08:16 +02:00
QString classificationField;
2017-05-23 14:08:16 +02:00
2014-01-26 18:35:21 +01:00
QString classificationAttributeExpression;
bool classificationAttributeIsExpression;
};
2016-08-06 11:01:42 +02:00
class QgsDiagramRenderer
{
2017-05-23 14:08:16 +02:00
%Docstring
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
2017-05-23 14:08:16 +02:00
%End
%TypeHeaderCode
2017-05-23 14:08:16 +02:00
#include "qgsdiagramrenderer.h"
%End
%ConvertToSubClassCode
if ( sipCpp->rendererName() == QStringLiteral( "SingleCategory" ) )
sipType = sipType_QgsSingleCategoryDiagramRenderer;
else if ( sipCpp->rendererName() == QStringLiteral( "LinearlyInterpolated" ) )
sipType = sipType_QgsLinearlyInterpolatedDiagramRenderer;
else
sipType = NULL;
%End
public:
2016-08-06 11:01:42 +02:00
QgsDiagramRenderer();
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsDiagramRenderer.
%End
2016-08-06 11:01:42 +02:00
virtual ~QgsDiagramRenderer();
virtual QgsDiagramRenderer *clone() const = 0 /Factory/;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns new instance that is equivalent to this one
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.4
%End
virtual QSizeF sizeMapUnits( const QgsFeature &feature, const QgsRenderContext &c ) const;
2017-05-23 14:08:16 +02:00
%Docstring
Returns size of the diagram for a feature in map units. Returns an invalid QSizeF in case of error
%End
virtual QString rendererName() const = 0;
virtual QList<QString> diagramAttributes() const = 0;
2017-05-23 14:08:16 +02:00
%Docstring
Returns attribute indices needed for diagram rendering
%End
virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the set of any fields required for diagram rendering
2017-12-15 21:36:08 -04:00
:param context: expression context the diagrams will be drawn using
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.16
%End
2017-05-23 14:08:16 +02:00
void renderDiagram( const QgsFeature &feature, QgsRenderContext &c, QPointF pos, const QgsPropertyCollection &properties = QgsPropertyCollection() ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Renders the diagram for a specified feature at a specific position in the passed render context.
2017-05-23 14:08:16 +02:00
%End
void setDiagram( QgsDiagram *d /Transfer/ );
QgsDiagram *diagram() const;
virtual QList<QgsDiagramSettings> diagramSettings() const = 0;
2017-05-23 14:08:16 +02:00
%Docstring
Returns list with all diagram settings in the renderer
%End
2017-05-23 14:08:16 +02:00
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) = 0;
%Docstring
2017-12-15 10:36:55 -04:00
Reads diagram state from a DOM element. Subclasses should ensure that _readXml() is called
by their readXml implementation to restore the general QgsDiagramRenderer settings.
.. seealso:: :py:func:`writeXml`
2017-05-23 14:08:16 +02:00
%End
virtual void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
%Docstring
2017-12-15 10:36:55 -04:00
Writes diagram state to a DOM element. Subclasses should ensure that _writeXml() is called
by their writeXml implementation to save the general QgsDiagramRenderer settings.
.. seealso:: :py:func:`readXml`
2017-05-23 14:08:16 +02:00
%End
virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const /Factory/;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns list of legend nodes for the diagram
2017-05-23 14:08:16 +02:00
.. note::
2017-12-19 11:43:52 -04:00
caller is responsible for deletion of :py:class:`QgsLayerTreeModelLegendNodes`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 2.10
%End
bool attributeLegend() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if renderer will show legend items for diagram attributes.
.. seealso:: :py:func:`setAttributeLegend`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.16
2017-05-23 14:08:16 +02:00
%End
void setAttributeLegend( bool enabled );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the renderer will show legend items for diagram attributes.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param enabled: set to true to show diagram attribute legend
.. seealso:: :py:func:`attributeLegend`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.16
2017-05-23 14:08:16 +02:00
%End
protected:
QgsDiagramRenderer( const QgsDiagramRenderer &other );
virtual bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const = 0;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered). Used internally within renderDiagram()
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param feature: the feature
:param c: render context
:param s: out: diagram settings for the feature
2017-05-23 14:08:16 +02:00
%End
virtual QSizeF diagramSize( const QgsFeature &features, const QgsRenderContext &c ) const = 0;
2017-05-23 14:08:16 +02:00
%Docstring
Returns size of the diagram (in painter units) or an invalid size in case of error
%End
void convertSizeToMapUnits( QSizeF &size, const QgsRenderContext &context ) const;
2017-05-23 14:08:16 +02:00
%Docstring
Converts size from mm to map units
%End
static int dpiPaintDevice( const QPainter * );
%Docstring
Returns the paint device dpi (or -1 in case of error
%End
void _readXml( const QDomElement &elem, const QgsReadWriteContext &context );
%Docstring
2017-12-15 10:36:55 -04:00
Reads internal QgsDiagramRenderer state from a DOM element.
.. seealso:: _writeXml
2017-05-23 14:08:16 +02:00
%End
void _writeXml( QDomElement &rendererElem, QDomDocument &doc, const QgsReadWriteContext &context ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Writes internal QgsDiagramRenderer diagram state to a DOM element.
.. seealso:: _readXml
2017-05-23 14:08:16 +02:00
%End
};
2016-08-06 11:01:42 +02:00
class QgsSingleCategoryDiagramRenderer : QgsDiagramRenderer
{
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Renders the diagrams for all features with the same settings
%End
2017-05-23 14:08:16 +02:00
%TypeHeaderCode
#include "qgsdiagramrenderer.h"
%End
public:
2017-11-11 11:29:45 +10:00
QgsSingleCategoryDiagramRenderer();
2017-11-11 11:29:45 +10:00
%Docstring
Constructor for QgsSingleCategoryDiagramRenderer
%End
virtual QgsSingleCategoryDiagramRenderer *clone() const /Factory/;
2017-05-23 14:08:16 +02:00
virtual QString rendererName() const;
virtual QList<QString> diagramAttributes() const;
void setDiagramSettings( const QgsDiagramSettings &s );
2017-05-23 14:08:16 +02:00
virtual QList<QgsDiagramSettings> diagramSettings() const;
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
virtual void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context ) const;
virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const /Factory/;
2017-05-23 14:08:16 +02:00
protected:
2017-05-23 14:08:16 +02:00
virtual bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const;
virtual QSizeF diagramSize( const QgsFeature &, const QgsRenderContext &c ) const;
};
2016-08-06 11:01:42 +02:00
class QgsLinearlyInterpolatedDiagramRenderer : QgsDiagramRenderer
{
2017-05-23 14:08:16 +02:00
%TypeHeaderCode
2017-05-23 14:08:16 +02:00
#include "qgsdiagramrenderer.h"
%End
public:
QgsLinearlyInterpolatedDiagramRenderer();
2017-06-26 12:18:34 +10:00
~QgsLinearlyInterpolatedDiagramRenderer();
virtual QgsLinearlyInterpolatedDiagramRenderer *clone() const /Factory/;
2017-05-23 14:08:16 +02:00
virtual QList<QgsDiagramSettings> diagramSettings() const;
%Docstring
Returns list with all diagram settings in the renderer
%End
void setDiagramSettings( const QgsDiagramSettings &s );
2017-05-23 14:08:16 +02:00
virtual QList<QString> diagramAttributes() const;
virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const;
2017-05-23 14:08:16 +02:00
virtual 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;
QString classificationField() const;
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the field name used for interpolating the diagram size.
.. seealso:: :py:func:`setClassificationField`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 3.0
%End
void setClassificationField( const QString &field );
2017-05-23 14:08:16 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the field name used for interpolating the diagram size.
.. seealso:: :py:func:`classificationField`
2017-12-15 10:36:55 -04:00
2017-05-23 14:08:16 +02:00
.. versionadded:: 3.0
%End
2014-01-27 09:22:24 +01:00
QString classificationAttributeExpression() const;
void setClassificationAttributeExpression( const QString &expression );
2014-01-27 09:22:24 +01:00
bool classificationAttributeIsExpression() const;
void setClassificationAttributeIsExpression( bool isExpression );
2017-05-23 14:08:16 +02:00
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
virtual void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsReadWriteContext &context ) const;
virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const /Factory/;
2017-05-23 14:08:16 +02:00
void setDataDefinedSizeLegend( QgsDataDefinedSizeLegend *settings /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Configures appearance of legend. Takes ownership of the passed settings objects.
.. versionadded:: 3.0
%End
QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns configuration of appearance of legend. Will return null if no configuration has been set.
.. versionadded:: 3.0
%End
protected:
2017-05-23 14:08:16 +02:00
virtual bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const;
virtual QSizeF diagramSize( const QgsFeature &, const QgsRenderContext &c ) const;
QgsLinearlyInterpolatedDiagramRenderer( const QgsLinearlyInterpolatedDiagramRenderer &other );
2017-06-20 15:50:00 +02:00
%Docstring
Copy constructor
%End
};
2017-05-23 14:08:16 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsdiagramrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/