QGIS API Documentation
3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
src
core
symbology
qgspointclusterrenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspointclusterrenderer.h
3
-------------------------
4
begin : February 2016
5
copyright : (C) 2016 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSPOINTCLUSTERRENDERER_H
19
#define QGSPOINTCLUSTERRENDERER_H
20
21
#include "qgis_core.h"
22
#include "
qgis.h
"
23
#include "
qgspointdistancerenderer.h
"
24
31
class
CORE_EXPORT
QgsPointClusterRenderer
:
public
QgsPointDistanceRenderer
32
{
33
public
:
34
35
QgsPointClusterRenderer
();
36
37
QgsPointClusterRenderer
*
clone
()
const
override
SIP_FACTORY
;
38
void
startRender
(
QgsRenderContext
&context,
const
QgsFields
&fields )
override
;
39
void
stopRender
(
QgsRenderContext
&context )
override
;
40
QDomElement
save
( QDomDocument &doc,
const
QgsReadWriteContext
&context )
override
;
41
QSet<QString>
usedAttributes
(
const
QgsRenderContext
&context )
const override
;
42
bool
accept
(
QgsStyleEntityVisitorInterface
*visitor )
const override
;
43
45
static
QgsFeatureRenderer
*create( QDomElement &symbologyElem,
const
QgsReadWriteContext
&context )
SIP_FACTORY
;
46
51
QgsMarkerSymbol
*clusterSymbol();
52
58
void
setClusterSymbol(
QgsMarkerSymbol
*symbol
SIP_TRANSFER
);
59
64
static
QgsPointClusterRenderer
*convertFromRenderer(
const
QgsFeatureRenderer
*renderer )
SIP_FACTORY
;
65
66
private
:
67
#ifdef SIP_RUN
68
QgsPointClusterRenderer
(
const
QgsPointClusterRenderer
& );
69
QgsPointClusterRenderer
&operator=(
const
QgsPointClusterRenderer
& );
70
#endif
71
73
std::unique_ptr< QgsMarkerSymbol > mClusterSymbol;
74
75
void
drawGroup( QPointF centerPoint,
QgsRenderContext
&context,
const
QgsPointDistanceRenderer::ClusteredGroup
&group )
const
override
SIP_FORCE
;
76
77
};
78
79
#endif
// QGSPOINTCLUSTERRENDERER_H
QgsFeatureRenderer
Definition
qgsrenderer.h:102
QgsFeatureRenderer::save
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context)
Stores renderer properties to an XML element.
Definition
qgsrenderer.cpp:192
QgsFeatureRenderer::clone
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
QgsFields
Container of fields for a vector layer.
Definition
qgsfields.h:45
QgsMarkerSymbol
A marker symbol type, for rendering Point and MultiPoint geometries.
Definition
qgsmarkersymbol.h:31
QgsPointClusterRenderer
A renderer that automatically clusters points with the same geographic position.
Definition
qgspointclusterrenderer.h:32
QgsPointDistanceRenderer
An abstract base class for distance based point renderers (e.g., clusterer and displacement renderers...
Definition
qgspointdistancerenderer.h:42
QgsPointDistanceRenderer::stopRender
void stopRender(QgsRenderContext &context) override
Must be called when a render cycle has finished, to allow the renderer to clean up.
Definition
qgspointdistancerenderer.cpp:351
QgsPointDistanceRenderer::startRender
void startRender(QgsRenderContext &context, const QgsFields &fields) override
Must be called when a new render cycle is started.
Definition
qgspointdistancerenderer.cpp:321
QgsPointDistanceRenderer::usedAttributes
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Returns a list of attributes required by this renderer.
Definition
qgspointdistancerenderer.cpp:227
QgsPointDistanceRenderer::ClusteredGroup
QList< QgsPointDistanceRenderer::GroupedFeature > ClusteredGroup
A group of clustered points (ie features within the distance tolerance).
Definition
qgspointdistancerenderer.h:76
QgsPointDistanceRenderer::accept
bool accept(QgsStyleEntityVisitorInterface *visitor) const override
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
Definition
qgspointdistancerenderer.cpp:218
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:35
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:61
QgsStyleEntityVisitorInterface
An interface for classes which can visit style entity (e.g.
Definition
qgsstyleentityvisitor.h:34
qgis.h
SIP_FORCE
#define SIP_FORCE
Definition
qgis_sip.h:131
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
qgspointdistancerenderer.h
Generated on Mon Oct 30 2023 18:42:25 for QGIS API Documentation by
1.9.8