18#ifndef QGSPOINTDISPLACEMENTRENDERER_H
19#define QGSPOINTDISPLACEMENTRENDERER_H
55 QSet<QString> usedAttributes( const
QgsRenderContext &context ) const override;
67 void setCircleWidth(
double width ) { mCircleWidth = width; }
158 std::unique_ptr< QgsMarkerSymbol > mCenterSymbol;
161 Placement mPlacement = Ring;
164 double mCircleWidth = 0.4;
168 double mCircleRadiusAddition = 0;
170 double mLabelDistanceFactor = 0.5;
175 void calculateSymbolAndLabelPositions(
QgsSymbolRenderContext &symbolContext, QPointF centerPoint,
int nPosition,
double symbolDiagonal, QList<QPointF> &symbolPositions, QList<QPointF> &labelShifts,
double &circleRadius,
176 double &gridRadius,
int &gridSize, QVector<double> &diagonals )
const;
177 void drawCircle(
double radiusPainterUnits,
QgsSymbolRenderContext &context, QPointF centerPoint,
int nSymbols )
const;
178 void drawSymbols(
const ClusteredGroup &group,
QgsRenderContext &context,
const QList<QPointF> &symbolPositions )
const;
180 QList<QPointF> pointSymbolPositions,
int nSymbols )
const;
181 void centralizeGrid( QList<QPointF> &pointSymbolPositions,
double radius,
int size )
const;
QFlags< FeatureRendererFlag > FeatureRendererFlags
Flags controlling behavior of vector feature renderers.
Abstract base class for all 2D vector feature renderers.
virtual Qgis::FeatureRendererFlags flags() const
Returns flags associated with the renderer.
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.