File: qgsannotationrectitem.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (245 lines) | stat: -rw-r--r-- 7,332 bytes parent folder | download | duplicates (12)
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/annotations/qgsannotationrectitem.h                         *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsAnnotationRectItem : QgsAnnotationItem
{
%Docstring(signature="appended")
Abstract base class for annotation items which render annotations in a
rectangular shape.

Subclasses should implement the pure virtual :py:func:`~render` method
which takes a painter bounds argument.

.. versionadded:: 3.40
%End

%TypeHeaderCode
#include "qgsannotationrectitem.h"
%End
  public:

    QgsAnnotationRectItem( const QgsRectangle &bounds );
%Docstring
Constructor for QgsAnnotationRectItem, rendering the annotation within
the specified ``bounds`` geometry.
%End
    ~QgsAnnotationRectItem();

    virtual Qgis::AnnotationItemFlags flags() const;

    virtual void render( QgsRenderContext &context, QgsFeedback *feedback );

    virtual QList< QgsAnnotationItemNode > nodesV2( const QgsAnnotationItemEditContext &context ) const;

    virtual Qgis::AnnotationItemEditOperationResult applyEditV2( QgsAbstractAnnotationItemEditOperation *operation, const QgsAnnotationItemEditContext &context );

    virtual QgsAnnotationItemEditOperationTransientResults *transientEditResultsV2( QgsAbstractAnnotationItemEditOperation *operation, const QgsAnnotationItemEditContext &context ) /Factory/;

    virtual QgsRectangle boundingBox() const;

    virtual QgsRectangle boundingBox( QgsRenderContext &context ) const;


    QgsRectangle bounds() const;
%Docstring
Returns the bounds of the item.

The coordinate reference system for the item will be the parent layer's
:py:func:`QgsAnnotationLayer.crs()`.

When the :py:func:`~QgsAnnotationRectItem.placementMode` is
:py:class:`Qgis`.AnnotationPlacementMode.FixedSize then the item will be
placed at the center of the bounds.

.. seealso:: :py:func:`setBounds`
%End

    void setBounds( const QgsRectangle &bounds );
%Docstring
Sets the ``bounds`` of the item.

The coordinate reference system for the bounds will be the parent
layer's :py:func:`QgsAnnotationLayer.crs()`.

When the :py:func:`~QgsAnnotationRectItem.placementMode` is
:py:class:`Qgis`.AnnotationPlacementMode.FixedSize then the item will be
placed at the center of the bounds.

.. seealso:: :py:func:`bounds`
%End

    Qgis::AnnotationPlacementMode placementMode() const;
%Docstring
Returns the placement mode for the item.

.. seealso:: :py:func:`setPlacementMode`
%End

    void setPlacementMode( Qgis::AnnotationPlacementMode mode );
%Docstring
Sets the placement ``mode`` for the item.

.. seealso:: :py:func:`placementMode`
%End

    QSizeF fixedSize() const;
%Docstring
Returns the fixed size to use for the item, when the
:py:func:`~QgsAnnotationRectItem.placementMode` is
:py:class:`Qgis`.AnnotationPlacementMode.FixedSize.

Units are retrieved via :py:func:`~QgsAnnotationRectItem.fixedSizeUnit`

.. seealso:: :py:func:`setFixedSize`

.. seealso:: :py:func:`fixedSizeUnit`
%End

    void setFixedSize( const QSizeF &size );
%Docstring
Sets the fixed ``size`` to use for the item, when the
:py:func:`~QgsAnnotationRectItem.placementMode` is
:py:class:`Qgis`.AnnotationPlacementMode.FixedSize.

Units are set via :py:func:`~QgsAnnotationRectItem.setFixedSizeUnit`

.. seealso:: :py:func:`fixedSize`

.. seealso:: :py:func:`setFixedSizeUnit`
%End

    Qgis::RenderUnit fixedSizeUnit() const;
%Docstring
Returns the units to use for fixed item sizes, when the
:py:func:`~QgsAnnotationRectItem.placementMode` is
:py:class:`Qgis`.AnnotationPlacementMode.FixedSize.

.. seealso:: :py:func:`setFixedSizeUnit`

.. seealso:: :py:func:`fixedSize`
%End

    void setFixedSizeUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` to use for fixed item sizes, when the
:py:func:`~QgsAnnotationRectItem.placementMode` is
:py:class:`Qgis`.AnnotationPlacementMode.FixedSize.

.. seealso:: :py:func:`fixedSizeUnit`

.. seealso:: :py:func:`setFixedSize`
%End

    bool backgroundEnabled() const;
%Docstring
Returns ``True`` if the item's background should be rendered.

.. seealso:: :py:func:`setBackgroundEnabled`

.. seealso:: :py:func:`backgroundSymbol`
%End

    void setBackgroundEnabled( bool enabled );
%Docstring
Sets whether the item's background should be rendered.

.. seealso:: :py:func:`backgroundEnabled`

.. seealso:: :py:func:`setBackgroundSymbol`
%End

    const QgsFillSymbol *backgroundSymbol() const;
%Docstring
Returns the symbol used to render the item's background.

.. seealso:: :py:func:`backgroundEnabled`

.. seealso:: :py:func:`setBackgroundSymbol`
%End

    void setBackgroundSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the ``symbol`` used to render the item's background.

The item takes ownership of the symbol.

.. seealso:: :py:func:`backgroundSymbol`

.. seealso:: :py:func:`setBackgroundEnabled`
%End

    bool frameEnabled() const;
%Docstring
Returns ``True`` if the item's frame should be rendered.

.. seealso:: :py:func:`setFrameEnabled`

.. seealso:: :py:func:`frameSymbol`
%End

    void setFrameEnabled( bool enabled );
%Docstring
Sets whether the item's frame should be rendered.

.. seealso:: :py:func:`frameEnabled`

.. seealso:: :py:func:`setFrameSymbol`
%End

    const QgsFillSymbol *frameSymbol() const;
%Docstring
Returns the symbol used to render the item's frame.

.. seealso:: :py:func:`frameEnabled`

.. seealso:: :py:func:`setFrameSymbol`
%End

    void setFrameSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the ``symbol`` used to render the item's frame.

The item takes ownership of the symbol.

.. seealso:: :py:func:`frameSymbol`

.. seealso:: :py:func:`setBackgroundEnabled`
%End

  protected:
    virtual void copyCommonProperties( const QgsAnnotationItem *other );

    virtual bool writeCommonProperties( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const;

    virtual bool readCommonProperties( const QDomElement &element, const QgsReadWriteContext &context );


    virtual void renderInBounds( QgsRenderContext &context, const QRectF &painterRect, QgsFeedback *feedback ) = 0;
%Docstring
Renders the item to the specified render ``context``.

The ``painterRect`` argument specifies the bounds in painter units where
the rectangular item should be rendered within.

The ``feedback`` argument can be used to detect render cancellations
during expensive render operations.
%End

  private:
    QgsAnnotationRectItem( const QgsAnnotationRectItem &other );
};
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/annotations/qgsannotationrectitem.h                         *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/