2017-06-06 11:03:05 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/core/symbology/qgspointclusterrenderer.h *
|
2017-06-06 11:03:05 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsPointClusterRenderer: QgsPointDistanceRenderer
|
2016-08-15 12:04:17 +10:00
|
|
|
{
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A renderer that automatically clusters points with the same geographic position.
|
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2016-08-15 12:04:17 +10:00
|
|
|
%TypeHeaderCode
|
2017-06-06 11:03:05 +02:00
|
|
|
#include "qgspointclusterrenderer.h"
|
2016-08-15 12:04:17 +10:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
QgsPointClusterRenderer();
|
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual QgsPointClusterRenderer *clone() const /Factory/;
|
|
|
|
|
|
|
|
virtual void startRender( QgsRenderContext &context, const QgsFields &fields );
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual void stopRender( QgsRenderContext &context );
|
|
|
|
|
|
|
|
virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context );
|
2016-08-15 12:04:17 +10:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
|
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
static QgsFeatureRenderer *create( QDomElement &symbologyElem, const QgsReadWriteContext &context ) /Factory/;
|
|
|
|
%Docstring
|
|
|
|
Creates a renderer from XML element
|
|
|
|
%End
|
2016-08-15 12:04:17 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsMarkerSymbol *clusterSymbol();
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the symbol used for rendering clustered groups (but not ownership of the symbol).
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setClusterSymbol`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2016-08-15 12:04:17 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setClusterSymbol( QgsMarkerSymbol *symbol /Transfer/ );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the symbol for rendering clustered groups.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param symbol: new cluster symbol. Ownership is transferred to the renderer.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`clusterSymbol`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2016-08-15 12:04:17 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
static QgsPointClusterRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) /Factory/;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Creates a QgsPointClusterRenderer from an existing renderer.
|
|
|
|
|
|
|
|
:return: a new renderer if the conversion was possible, otherwise None.
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2016-08-15 12:04:17 +10:00
|
|
|
|
|
|
|
private:
|
|
|
|
QgsPointClusterRenderer( const QgsPointClusterRenderer & );
|
2017-05-03 07:45:22 +02:00
|
|
|
QgsPointClusterRenderer &operator=( const QgsPointClusterRenderer & );
|
2018-01-16 11:41:23 -04:00
|
|
|
virtual void drawGroup( QPointF centerPoint, QgsRenderContext &context, const QgsPointDistanceRenderer::ClusteredGroup &group );
|
2016-08-15 12:04:17 +10:00
|
|
|
|
|
|
|
};
|
2017-06-06 11:03:05 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/core/symbology/qgspointclusterrenderer.h *
|
2017-06-06 11:03:05 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|