18 #ifndef QGSPOINTDISPLACEMENTRENDERER_H
19 #define QGSPOINTDISPLACEMENTRENDERER_H
21 #include "qgis_core.h"
54 QSet<QString> usedAttributes( const
QgsRenderContext &context ) const override;
66 void setCircleWidth(
double width ) { mCircleWidth = width; }
160 std::unique_ptr< QgsMarkerSymbol > mCenterSymbol;
163 Placement mPlacement = Ring;
166 double mCircleWidth = 0.4;
170 double mCircleRadiusAddition = 0;
172 double mLabelDistanceFactor = 0.5;
177 void calculateSymbolAndLabelPositions(
QgsSymbolRenderContext &symbolContext, QPointF centerPoint,
int nPosition,
double symbolDiagonal, QList<QPointF> &symbolPositions, QList<QPointF> &labelShifts,
double &circleRadius,
178 double &gridRadius,
int &gridSize, QVector<double> &diagonals )
const;
179 void drawCircle(
double radiusPainterUnits,
QgsSymbolRenderContext &context, QPointF centerPoint,
int nSymbols );
180 void drawSymbols(
const ClusteredGroup &group,
QgsRenderContext &context,
const QList<QPointF> &symbolPositions );
182 QList<QPointF> pointSymbolPositions,
int nSymbols );
183 void centralizeGrid( QList<QPointF> &pointSymbolPositions,
double radius,
int size )
const;
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
Container of fields for a vector layer.
A marker symbol type, for rendering Point and MultiPoint geometries.
A renderer that automatically displaces points with the same geographic location.
void setPlacement(Placement placement)
Sets the placement method used for dispersing the points.
void setLabelDistanceFactor(double factor)
Sets a factor for increasing the label distances from the symbol.
void setCircleColor(const QColor &color)
Sets the color used for drawing the displacement group circle.
Placement placement() const
Returns the placement method used for dispersing the points.
double circleWidth() const
Returns the line width for the displacement group circle in mm.
Placement
Placement methods for dispersing points.
@ ConcentricRings
Place points in concentric rings around group.
@ Ring
Place points in a single ring around group.
void setCircleRadiusAddition(double distance)
Sets a factor for increasing the ring size of displacement groups.
double circleRadiusAddition() const
Returns the factor for increasing the ring size of displacement groups.
QColor circleColor() const
Returns the color used for drawing the displacement group circle.
double labelDistanceFactor() const
Returns the factor for label distance from the symbol.
An abstract base class for distance based point renderers (e.g., clusterer and displacement renderers...
QList< QgsPointDistanceRenderer::GroupedFeature > ClusteredGroup
A group of clustered points (ie features within the distance tolerance).
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
An interface for classes which can visit style entity (e.g.