/
qgsheatmaprenderer.sip
137 lines (123 loc) · 4.95 KB
/
qgsheatmaprenderer.sip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
class QgsHeatmapRenderer : QgsFeatureRendererV2
{
%TypeHeaderCode
#include <qgsheatmaprenderer.h>
%End
public:
QgsHeatmapRenderer();
virtual ~QgsHeatmapRenderer();
//reimplemented methods
virtual QgsFeatureRendererV2* clone() const /Factory/;
virtual QgsRenderOptions startRender( QgsRenderContext& context, const QgsFields& fields );
virtual bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false );
virtual void stopRender( QgsRenderContext& context );
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
virtual QgsSymbolV2List symbols();
virtual QString dump() const;
virtual QList<QString> usedAttributes();
static QgsFeatureRendererV2* create( QDomElement& element ) /Factory/;
virtual QDomElement save( QDomDocument& doc );
static QgsHeatmapRenderer* convertFromRenderer( const QgsFeatureRendererV2* renderer ) /Factory/;
//reimplemented to extent the request so that points up to heatmap's radius distance outside
//visible area are included
virtual void modifyRequestExtent( QgsRectangle& extent, QgsRenderContext& context );
//heatmap specific methods
/** Returns the color ramp used for shading the heatmap.
* @returns color ramp for heatmap
* @see setColorRamp
*/
QgsVectorColorRampV2* colorRamp() const;
/** Sets the color ramp to use for shading the heatmap.
* @param ramp color ramp for heatmap. Ownership of ramp is transferred to the renderer.
* @see colorRamp
*/
void setColorRamp( QgsVectorColorRampV2* ramp /Transfer/ );
/** Returns whether the ramp is inverted
* @returns true if color ramp is inverted
* @see setInvertRamp
* @see colorRamp
*/
double invertRamp() const;
/** Sets whether the ramp is inverted
* @param invert set to true to invert color ramp
* @see invertRamp
* @see setColorRamp
*/
void setInvertRamp( const bool invert );
/** Returns the radius for the heatmap
* @returns heatmap radius
* @see setRadius
* @see radiusUnit
* @see radiusMapUnitScale
*/
double radius() const;
/** Sets the radius for the heatmap
* @param radius heatmap radius
* @see radius
* @see setRadiusUnit
* @see setRadiusMapUnitScale
*/
void setRadius( const double radius );
/** Returns the units used for the heatmap's radius
* @returns units for heatmap radius
* @see radius
* @see setRadiusUnit
* @see radiusMapUnitScale
*/
QgsSymbolV2::OutputUnit radiusUnit() const;
/** Sets the units used for the heatmap's radius
* @param unit units for heatmap radius
* @see radiusUnit
* @see setRadius
* @see radiusMapUnitScale
*/
void setRadiusUnit( const QgsSymbolV2::OutputUnit unit );
/** Returns the map unit scale used for the heatmap's radius
* @returns map unit scale for heatmap's radius
* @see radius
* @see radiusUnit
* @see setRadiusMapUnitScale
*/
const QgsMapUnitScale& radiusMapUnitScale() const;
/** Sets the map unit scale used for the heatmap's radius
* @param scale map unit scale for heatmap's radius
* @see setRadius
* @see setRadiusUnit
* @see radiusMapUnitScale
*/
void setRadiusMapUnitScale( const QgsMapUnitScale& scale );
/** Returns the maximum value used for shading the heatmap.
* @returns maximum value for heatmap shading. If 0, then maximum value will be automatically
* calculated.
* @see setMaximumValue
*/
double maximumValue() const;
/** Sets the maximum value used for shading the heatmap.
* @param value maximum value for heatmap shading. Set to 0 for automatic calculation of
* maximum value.
* @see maximumValue
*/
void setMaximumValue( const double value );
/** Returns the render quality used for drawing the heatmap.
* @returns render quality. A value of 1 indicates maximum quality, and increasing the
* value will result in faster drawing but lower quality rendering.
* @see setRenderQuality
*/
double renderQuality() const;
/** Sets the render quality used for drawing the heatmap.
* @param quality render quality. A value of 1 indicates maximum quality, and increasing the
* value will result in faster drawing but lower quality rendering.
* @see renderQuality
*/
void setRenderQuality( const int quality );
/** Returns the expression used for weighting points when generating the heatmap.
* @returns point weight expression. If empty, all points are equally weighted.
* @see setWeightExpression
*/
QString weightExpression() const;
/** Sets the expression used for weighting points when generating the heatmap.
* @param expression point weight expression. If set to empty, all points are equally weighted.
* @see weightExpression
*/
void setWeightExpression( const QString& expression );
};