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/qgspointdisplacementrenderer.h *
|
2017-06-06 11:03:05 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsPointDisplacementRenderer: QgsPointDistanceRenderer
|
2012-09-24 02:28:15 +02:00
|
|
|
{
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A renderer that automatically displaces points with the same geographic location.
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-06 11:03:05 +02:00
|
|
|
#include "qgspointdisplacementrenderer.h"
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
public:
|
2015-09-18 13:20:53 +10:00
|
|
|
|
|
|
|
enum Placement
|
|
|
|
{
|
2017-06-06 11:03:05 +02:00
|
|
|
Ring,
|
2017-03-14 10:49:30 +07:00
|
|
|
ConcentricRings,
|
|
|
|
Grid
|
2015-09-18 13:20:53 +10:00
|
|
|
};
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsPointDisplacementRenderer( const QString &labelAttributeName = QString() );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsPointDisplacementRenderer.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param labelAttributeName: optional attribute name for labeling points
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual QgsPointDisplacementRenderer *clone() const /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
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 );
|
|
|
|
|
|
|
|
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
|
|
|
|
Create a renderer from XML element
|
|
|
|
%End
|
2016-06-07 15:18:36 +10:00
|
|
|
|
2016-08-15 12:04:17 +10:00
|
|
|
void setCircleWidth( double width );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the line width for the displacement group circle.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param width: line width in mm
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`circleWidth`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCircleColor`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
double circleWidth() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the line width for the displacement group circle in mm.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCircleWidth`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`circleColor`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setCircleColor( const QColor &color );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the color used for drawing the displacement group circle.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param color: circle color
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`circleColor`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCircleWidth`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2016-08-15 12:04:17 +10:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
QColor circleColor() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the color used for drawing the displacement group circle.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCircleColor`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`circleWidth`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2016-08-15 12:04:17 +10:00
|
|
|
void setCircleRadiusAddition( double distance );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets a factor for increasing the ring size of displacement groups.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param distance: addition factor
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`circleRadiusAddition`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
double circleRadiusAddition() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the factor for increasing the ring size of displacement groups.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCircleRadiusAddition`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2015-09-18 13:20:53 +10:00
|
|
|
Placement placement() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the placement method used for dispersing the points.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setPlacement`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
.. versionadded:: 2.12
|
|
|
|
%End
|
2015-09-18 13:20:53 +10:00
|
|
|
|
|
|
|
void setPlacement( Placement placement );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the placement method used for dispersing the points.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param placement: placement method
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`placement`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
.. versionadded:: 2.12
|
|
|
|
%End
|
2015-09-18 13:20:53 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsMarkerSymbol *centerSymbol();
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the symbol for the center of a displacement group (but not ownership of the symbol).
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCenterSymbol`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2014-01-14 17:23:16 +01:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setCenterSymbol( QgsMarkerSymbol *symbol /Transfer/ );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the center symbol for a displacement group.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param symbol: new center symbol. Ownership is transferred to the renderer.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`centerSymbol`
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2015-09-16 17:11:32 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
static QgsPointDisplacementRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) /Factory/;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Creates a QgsPointDisplacementRenderer from an existing renderer.
|
|
|
|
|
|
|
|
:return: a new renderer if the conversion was possible, otherwise None.
|
2017-12-16 10:38:54 -04:00
|
|
|
|
|
|
|
.. versionadded:: 2.5
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2014-08-30 10:16:23 -06:00
|
|
|
|
2014-01-14 17:23:16 +01:00
|
|
|
private:
|
|
|
|
QgsPointDisplacementRenderer( const QgsPointDisplacementRenderer & );
|
2017-05-03 07:45:22 +02:00
|
|
|
QgsPointDisplacementRenderer &operator=( const QgsPointDisplacementRenderer & );
|
2018-01-16 11:41:23 -04:00
|
|
|
virtual void drawGroup( QPointF centerPoint, QgsRenderContext &context, const QgsPointDistanceRenderer::ClusteredGroup &group );
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2012-09-24 02:28:15 +02: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/qgspointdisplacementrenderer.h *
|
2017-06-06 11:03:05 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|