File: qgstextshadowsettings.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 (381 lines) | stat: -rw-r--r-- 9,751 bytes parent folder | download | duplicates (6)
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/textrenderer/qgstextshadowsettings.h                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsTextShadowSettings
{
%Docstring(signature="appended")
Container for settings relating to a text shadow.

.. note::

   :py:class:`QgsTextShadowSettings` objects are implicitly shared.
%End

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

    enum ShadowPlacement /BaseType=IntEnum/
    {
      ShadowLowest,
      ShadowText,
      ShadowBuffer,
      ShadowShape
    };

    QgsTextShadowSettings();
    QgsTextShadowSettings( const QgsTextShadowSettings &other );


    ~QgsTextShadowSettings();

    bool operator==( const QgsTextShadowSettings &other ) const;
    bool operator!=( const QgsTextShadowSettings &other ) const;

    bool enabled() const;
%Docstring
Returns whether the shadow is enabled.

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

    void setEnabled( bool enabled );
%Docstring
Sets whether the text shadow will be drawn.

:param enabled: set to ``True`` to draw shadow

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

    QgsTextShadowSettings::ShadowPlacement shadowPlacement() const;
%Docstring
Returns the placement for the drop shadow. The placement determines both
the z-order stacking position for the shadow and the what shape (e.g.,
text, background shape) is used for casting the shadow.

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

    void setShadowPlacement( QgsTextShadowSettings::ShadowPlacement placement );
%Docstring
Sets the placement for the drop shadow. The placement determines both
the z-order stacking position for the shadow and the what shape (e.g.,
text, background shape) is used for casting the shadow.

:param placement: shadow placement

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

    int offsetAngle() const;
%Docstring
Returns the angle for offsetting the position of the shadow from the
text.

.. seealso:: :py:func:`setOffsetAngle`

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

    void setOffsetAngle( int angle );
%Docstring
Sets the angle for offsetting the position of the shadow from the text.

:param angle: offset angle in degrees

.. seealso:: :py:func:`offsetAngle`

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

    double offsetDistance() const;
%Docstring
Returns the distance for offsetting the position of the shadow from the
text. Offset units are retrieved via
:py:func:`~QgsTextShadowSettings.offsetUnit`.

.. seealso:: :py:func:`setOffsetDistance`

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

    void setOffsetDistance( double distance );
%Docstring
Sets the distance for offsetting the position of the shadow from the
text. Offset units are specified via
:py:func:`~QgsTextShadowSettings.setOffsetUnit`.

:param distance: offset distance

.. seealso:: :py:func:`offsetDistance`

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

    Qgis::RenderUnit offsetUnit() const;
%Docstring
Returns the units used for the shadow's offset.

.. seealso:: :py:func:`setOffsetUnit`

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

    void setOffsetUnit( Qgis::RenderUnit units );
%Docstring
Sets the units used for the shadow's offset.

:param units: shadow distance units

.. seealso:: :py:func:`offsetUnit`

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

    QgsMapUnitScale offsetMapUnitScale() const;
%Docstring
Returns the map unit scale object for the shadow offset distance. This
is only used if the :py:func:`~QgsTextShadowSettings.offsetUnit` is set
to :py:class:`QgsUnitTypes`.RenderMapUnit.

.. seealso:: :py:func:`setOffsetMapUnitScale`

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

    void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit scale object for the shadow offset distance. This is
only used if the :py:func:`~QgsTextShadowSettings.offsetUnit` is set to
:py:class:`QgsUnitTypes`.RenderMapUnit.

:param scale: scale for shadow offset

.. seealso:: :py:func:`offsetMapUnitScale`

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

    bool offsetGlobal() const;
%Docstring
Returns ``True`` if the global shadow offset will be used.

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

    void setOffsetGlobal( bool global );
%Docstring
Sets whether the global shadow offset should be used.

:param global: set to ``True`` to use global shadow offset.
%End

    double blurRadius() const;
%Docstring
Returns the blur radius for the shadow. Radius units are retrieved via
:py:func:`~QgsTextShadowSettings.blurRadiusUnits`.

.. seealso:: :py:func:`setBlurRadius`

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

    void setBlurRadius( double blurRadius );
%Docstring
Sets the blur radius for the shadow. Radius units are specified via
:py:func:`~QgsTextShadowSettings.setBlurRadiusUnits`.

:param blurRadius: blur radius

.. seealso:: :py:func:`blurRadius`

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

    Qgis::RenderUnit blurRadiusUnit() const;
%Docstring
Returns the units used for the shadow's blur radius.

.. seealso:: :py:func:`setBlurRadiusUnit`

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

    void setBlurRadiusUnit( Qgis::RenderUnit units );
%Docstring
Sets the units used for the shadow's blur radius.

:param units: shadow blur radius units

.. seealso:: :py:func:`blurRadiusUnit`

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

    QgsMapUnitScale blurRadiusMapUnitScale() const;
%Docstring
Returns the map unit scale object for the shadow blur radius. This is
only used if the :py:func:`~QgsTextShadowSettings.blurRadiusUnit` is set
to :py:class:`QgsUnitTypes`.RenderMapUnit.

.. seealso:: :py:func:`setBlurRadiusMapUnitScale`

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

    void setBlurRadiusMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit scale object for the shadow blur radius. This is only
used if the :py:func:`~QgsTextShadowSettings.blurRadiusUnit` is set to
:py:class:`QgsUnitTypes`.RenderMapUnit.

:param scale: scale for shadow blur radius

.. seealso:: :py:func:`blurRadiusMapUnitScale`

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

    bool blurAlphaOnly() const;
%Docstring
Returns whether only the alpha channel for the shadow will be blurred.

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

    void setBlurAlphaOnly( bool alphaOnly );
%Docstring
Sets whether only the alpha channel for the shadow should be blurred.

:param alphaOnly: set to ``True`` to blur only the alpha channel. If
                  ``False``, all channels (including red, green and blue
                  channel) will be blurred.

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

    double opacity() const;
%Docstring
Returns the shadow's opacity. The opacity is a double value between 0
(fully transparent) and 1 (totally opaque).

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

    void setOpacity( double opacity );
%Docstring
Sets the shadow's opacity.

:param opacity: opacity as a double value between 0 (fully transparent)
                and 1 (totally opaque)

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

    int scale() const;
%Docstring
Returns the scaling used for the drop shadow (in percentage of original
size).

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

    void setScale( int scale );
%Docstring
Sets the scaling used for the drop shadow (in percentage of original
size).

:param scale: scale percent for drop shadow

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

    QColor color() const;
%Docstring
Returns the color of the drop shadow.

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

    void setColor( const QColor &color );
%Docstring
Sets the color for the drop shadow.

:param color: shadow color

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

    QPainter::CompositionMode blendMode() const;
%Docstring
Returns the blending mode used for drawing the drop shadow.

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

    void setBlendMode( QPainter::CompositionMode mode );
%Docstring
Sets the blending mode used for drawing the drop shadow.

:param mode: blending mode

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

    void readFromLayer( QgsVectorLayer *layer );
%Docstring
Reads settings from a layer's custom properties (for QGIS 2.x projects).

:param layer: source vector layer
%End

    void readXml( const QDomElement &elem );
%Docstring
Read settings from a DOM element.

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

    QDomElement writeXml( QDomDocument &doc ) const;
%Docstring
Write settings into a DOM element.

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

    void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
%Docstring
Updates the format by evaluating current values of data defined
properties.

.. versionadded:: 3.10
%End

    QSet<QString> referencedFields( const QgsRenderContext &context ) const;
%Docstring
Returns all field names referenced by the configuration (e.g. from data
defined properties).

.. versionadded:: 3.14
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/textrenderer/qgstextshadowsettings.h                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/