/
qgsannotationitem.sip.in
231 lines (168 loc) · 7.14 KB
/
qgsannotationitem.sip.in
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/annotations/qgsannotationitem.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAnnotationItem
{
%Docstring(signature="appended")
Abstract base class for annotation items which are drawn with :py:class:`QgsAnnotationLayers`.
.. versionadded:: 3.16
%End
%TypeHeaderCode
#include "qgsannotationitem.h"
%End
%ConvertToSubClassCode
if ( sipCpp->type() == QLatin1String( "marker" ) )
{
sipType = sipType_QgsAnnotationMarkerItem;
}
else if ( sipCpp->type() == QLatin1String( "linestring" ) )
{
sipType = sipType_QgsAnnotationLineItem;
}
else if ( sipCpp->type() == QLatin1String( "polygon" ) )
{
sipType = sipType_QgsAnnotationPolygonItem;
}
else if ( sipCpp->type() == QLatin1String( "pointtext" ) )
{
sipType = sipType_QgsAnnotationPointTextItem;
}
else
{
sipType = 0;
}
%End
public:
QgsAnnotationItem();
%Docstring
Constructor for an annotation item.
%End
virtual ~QgsAnnotationItem();
virtual Qgis::AnnotationItemFlags flags() const;
%Docstring
Returns item flags.
.. versionadded:: 3.22
%End
virtual QgsAnnotationItem *clone() = 0 /Factory/;
%Docstring
Returns a clone of the item. Ownership is transferred to the caller.
Implementations should include a call to :py:func:`~QgsAnnotationItem.copyCommonProperties` to copy the base class properties.
.. seealso:: :py:func:`copyCommonProperties`
%End
virtual QString type() const = 0;
%Docstring
Returns a unique (untranslated) string identifying the type of item.
%End
virtual QgsRectangle boundingBox() const = 0;
%Docstring
Returns the bounding box of the item's geographic location, in the parent layer's coordinate reference system.
%End
virtual QgsRectangle boundingBox( QgsRenderContext &context ) const;
%Docstring
Returns the bounding box of the item's geographic location, in the parent layer's coordinate reference system.
%End
virtual void render( QgsRenderContext &context, QgsFeedback *feedback ) = 0;
%Docstring
Renders the item to the specified render ``context``.
The ``feedback`` argument can be used to detect render cancellations during expensive
render operations.
%End
virtual bool writeXml( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const = 0;
%Docstring
Writes the item's state into an XML ``element``.
Implementations should include a call to :py:func:`~QgsAnnotationItem.writeCommonProperties` to store the base class properties.
.. seealso:: :py:func:`readXml`
.. seealso:: :py:func:`writeCommonProperties`
%End
virtual bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) = 0;
%Docstring
Reads the item's state from the given DOM ``element``.
Implementations should include a call to :py:func:`~QgsAnnotationItem.readCommonProperties` to read the base class properties.
.. seealso:: :py:func:`writeXml`
.. seealso:: :py:func:`readCommonProperties`
%End
int zIndex() const;
%Docstring
Returns the item's z index, which controls the order in which annotation items
are rendered in the layer.
.. seealso:: :py:func:`setZIndex`
%End
void setZIndex( int index );
%Docstring
Sets the item's z ``index``, which controls the order in which annotation items
are rendered in the layer.
.. seealso:: :py:func:`zIndex`
%End
virtual QList< QgsAnnotationItemNode > nodes() const;
%Docstring
Returns the nodes for the item, used for editing the item.
.. versionadded:: 3.22
%End
bool useSymbologyReferenceScale() const;
%Docstring
Returns ``True`` if the annotation item uses a symbology reference scale.
.. seealso:: :py:func:`setUseSymbologyReferenceScale`
.. seealso:: :py:func:`symbologyReferenceScale`
%End
void setUseSymbologyReferenceScale( bool enabled );
%Docstring
Sets whether the annotation item uses a symbology reference scale.
.. seealso:: :py:func:`useSymbologyReferenceScale`
.. seealso:: :py:func:`setSymbologyReferenceScale`
%End
double symbologyReferenceScale() const;
%Docstring
Returns the annotation's symbology reference scale.
The reference scale will only be used if :py:func:`~QgsAnnotationItem.useSymbologyReferenceScale` returns ``True``.
This represents the desired scale denominator for the rendered map, eg 1000.0 for a 1:1000 map render.
The symbology reference scale is an optional property which specifies the reference
scale at which symbology in paper units (such a millimeters or points) is fixed
to. For instance, if the scale is 1000 then a 2mm thick line will be rendered at
exactly 2mm thick when a map is rendered at 1:1000, or 1mm thick when rendered at 1:2000, or 4mm thick at 1:500.
.. seealso:: :py:func:`setSymbologyReferenceScale`
.. seealso:: :py:func:`useSymbologyReferenceScale`
%End
void setSymbologyReferenceScale( double scale );
%Docstring
Sets the annotation's symbology reference ``scale``.
The reference scale will only be used if :py:func:`~QgsAnnotationItem.useSymbologyReferenceScale` returns ``True``.
This represents the desired scale denominator for the rendered map, eg 1000.0 for a 1:1000 map render.
The symbology reference scale is an optional property which specifies the reference
scale at which symbology in paper units (such a millimeters or points) is fixed
to. For instance, if the scale is 1000 then a 2mm thick line will be rendered at
exactly 2mm thick when a map is rendered at 1:1000, or 1mm thick when rendered at 1:2000, or 4mm thick at 1:500.
.. seealso:: :py:func:`symbologyReferenceScale`
.. seealso:: :py:func:`setUseSymbologyReferenceScale`
%End
protected:
void copyCommonProperties( const QgsAnnotationItem *other );
%Docstring
Copies common properties from the base class from an ``other`` item.
.. versionadded:: 3.22
%End
bool writeCommonProperties( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const;
%Docstring
Writes common properties from the base class into an XML ``element``.
.. seealso:: :py:func:`writeXml`
.. versionadded:: 3.22
%End
bool readCommonProperties( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Reads common properties from the base class from the given DOM ``element``.
.. seealso:: :py:func:`readXml`
.. versionadded:: 3.22
%End
private:
QgsAnnotationItem( const QgsAnnotationItem &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/annotations/qgsannotationitem.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/