File: qgsinterpolatedlinerenderer.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 (471 lines) | stat: -rw-r--r-- 13,311 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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/symbology/qgsinterpolatedlinerenderer.h                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsInterpolatedLineColor
{
%Docstring(signature="appended")
Class defining color to render mesh datasets. The color can vary
depending on the dataset value.

.. versionadded:: 3.14
%End

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

    enum ColoringMethod /BaseType=IntEnum/
    {
      //! Render with a single color
      SingleColor,
      //! Render with a color ramp
      ColorRamp
    };

    QgsInterpolatedLineColor();
%Docstring
Default constructor
%End
    QgsInterpolatedLineColor( const QgsColorRampShader &colorRampShader );
%Docstring
Constructor with variable color depending on magnitude
%End
    QgsInterpolatedLineColor( const QColor &color );
%Docstring
Constructor with fixed color
%End

    void setColor( const QgsColorRampShader &colorRampShader );
%Docstring
Sets the color ramp to define the coloring
%End

    void setColor( const QColor &color );
%Docstring
Sets the single color to define the coloring
%End

    QColor color( double magnitude ) const;
%Docstring
Returns the color corresponding to the magnitude
%End

    void setColoringMethod( ColoringMethod coloringMethod );
%Docstring
Sets the coloring method used

.. versionadded:: 3.20
%End

    QgsInterpolatedLineColor::ColoringMethod coloringMethod() const;
%Docstring
Returns the coloring method used
%End

    QgsColorRampShader colorRampShader() const;
%Docstring
Returns the color ramp shader
%End

    QColor singleColor() const;
%Docstring
Returns the single color that is used if SingleColor coloring mode is
set

.. versionadded:: 3.20
%End

    QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
%Docstring
Writes configuration to a new DOM element
%End
    void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
%Docstring
Reads configuration from the given DOM element
%End

    void graduatedColors( double value1, double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients ) const;
%Docstring
Returns the break values, graduated colors and the associated gradients
between two values

- If the color is fixed or only one color for the interval (value1,
  value2), returns only one color in ``breakColors`` and void lists for
  ``breakValues``, ``gradients``
- If the color ramp is classified with 'exact', returns void
  ``gradients``
- If the color ramp is classified with 'discrete', return ``gradients``
  with uniform colors
- if nothing to render (out of range), return all lists void
%End

};

class QgsInterpolatedLineWidth
{
%Docstring(signature="appended")
Represents a width than can vary depending on values

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgsinterpolatedlinerenderer.h"
%End
  public:
    double minimumValue() const;
%Docstring
Returns the minimum value used to defined the variable width
%End
    void setMinimumValue( double minimumValue );
%Docstring
Sets the minimum value used to defined the variable width
%End

    double maximumValue() const;
%Docstring
Returns the maximum value used to defined the variable width
%End
    void setMaximumValue( double maximumValue );
%Docstring
Sets the maximum value used to defined the variable width
%End

    double minimumWidth() const;
%Docstring
Returns the minimum width used to defined the variable width
%End
    void setMinimumWidth( double minimumWidth );
%Docstring
Sets the minimum width used to defined the variable width
%End

    double maximumWidth() const;
%Docstring
Returns the maximum width used to defined the variable width
%End
    void setMaximumWidth( double maximumWidth );
%Docstring
Sets the maximum width used to defined the variable width
%End

    bool ignoreOutOfRange() const;
%Docstring
Returns whether the variable width ignores out of range value
%End
    void setIgnoreOutOfRange( bool ignoreOutOfRange );
%Docstring
Sets whether the variable width ignores out of range value
%End

    bool useAbsoluteValue() const;
%Docstring
Returns whether absolute value are used as input
%End
    void setUseAbsoluteValue( bool useAbsoluteValue );
%Docstring
Sets whether absolute value are used as input
%End

    bool isVariableWidth() const;
%Docstring
Returns whether the width is variable
%End
    void setIsVariableWidth( bool isVariableWidth );
%Docstring
Returns whether the width is variable
%End

    double fixedStrokeWidth() const;
%Docstring
Returns the fixed width
%End
    void setFixedStrokeWidth( double fixedWidth );
%Docstring
Sets the fixed width
%End

    double strokeWidth( double value ) const;
%Docstring
Returns the variable width depending on value, if not varying returns
the fixed width
%End

    QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
%Docstring
Writes configuration to a new DOM element
%End
    void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
%Docstring
Reads configuration from the given DOM element
%End

};

class QgsInterpolatedLineRenderer
{
%Docstring(signature="appended")
Represents a simple line renderer with width and color varying depending
on values.

.. versionadded:: 3.14
%End

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

    void setInterpolatedWidth( const QgsInterpolatedLineWidth &strokeWidth );
%Docstring
Sets the stroke width used to render
%End

    QgsInterpolatedLineWidth interpolatedLineWidth() const;
%Docstring
Returns the stroke width used to render

.. versionadded:: 3.20
%End

    void setWidthUnit( Qgis::RenderUnit strokeWidthUnit );
%Docstring
Sets the unit of the stroke width
%End

    Qgis::RenderUnit widthUnit() const;
%Docstring
Returns the unit of the stroke width

.. versionadded:: 3.20
%End

    void setInterpolatedColor( const QgsInterpolatedLineColor &strokeColoring );
%Docstring
Sets the stroke color used to render
%End

    QgsInterpolatedLineColor interpolatedColor() const;
%Docstring
Returns the stroke color used to render

.. versionadded:: 3.20
%End

    void render( double value1, double value2, const QgsPointXY &point1, const QgsPointXY &point2, QgsRenderContext &context ) const;
%Docstring
Renders a line in the ``context`` between ``point1`` and ``point2`` with
color and width that vary depending on ``value1`` and ``value2``

This method assumes that ``point1`` and ``point2`` are in map units. See
:py:func:`~QgsInterpolatedLineRenderer.renderInDeviceCoordinates` for an
equivalent method which renders lines in painter coordinates.
%End

    void render( double valueColor1, double valueColor2, double valueWidth1, double valueWidth2, const QgsPointXY &point1, const QgsPointXY &point2, QgsRenderContext &context ) const;
%Docstring
Renders a line in the ``context`` between ``point1`` and ``point2`` with
color that varies depending on ``valueColor1`` and ``valueColor2`` and
and width that varies between ``valueWidth1`` and ``valueWidth2``

This method assumes that ``point1`` and ``point2`` are in map units. See
:py:func:`~QgsInterpolatedLineRenderer.renderInDeviceCoordinates` for an
equivalent method which renders lines in painter coordinates.

.. versionadded:: 3.20
%End

    void renderInDeviceCoordinates( double valueColor1, double valueColor2, double valueWidth1, double valueWidth2, QPointF point1, QPointF point2, QgsRenderContext &context ) const;
%Docstring
Renders a line in the ``context`` between ``point1`` and ``point2`` in
device (painter) coordinates with color that varies depending on
``valueColor1`` and ``valueColor2`` and and width that varies between
``valueWidth1`` and ``valueWidth2``.

.. versionadded:: 3.22
%End

    void setSelected( bool selected );
%Docstring
Sets if the rendering must be done as the element is selected

.. versionadded:: 3.20
%End

};

class QgsInterpolatedLineSymbolLayer : QgsLineSymbolLayer
{
%Docstring(signature="appended")
A symbol layer that represents vector layer line feature as interpolated
line The interpolation is done between two values defined at the
extremities

.. versionadded:: 3.20
%End

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

    QgsInterpolatedLineSymbolLayer();

    static QgsSymbolLayer *create( const QVariantMap &properties ) /Factory/;
%Docstring
Creates the symbol layer
%End

    virtual Qgis::SymbolLayerFlags flags() const;

    virtual QString layerType() const;

    virtual void startRender( QgsSymbolRenderContext &context );

    virtual void stopRender( QgsSymbolRenderContext &context );

    virtual QgsInterpolatedLineSymbolLayer *clone() const /Factory/;

    virtual QVariantMap properties() const;

    virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size );

    virtual QColor color() const;


    virtual void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context );

    virtual void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context );

    virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );

    virtual bool canCauseArtifactsBetweenAdjacentTiles() const;


 void setExpressionsStringForWidth( const QString &start, const QString &end ) /Deprecated/;
%Docstring
Sets the expressions (as string) that define the extremety values af the
line feature for width.

.. deprecated:: 3.40

   Use setDataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineStartWidthValue ) and setDataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineEndWidthValue ) instead.
%End

 QString startValueExpressionForWidth() const /Deprecated/;
%Docstring
Returns the epression related to the start extremity value for width.

.. deprecated:: 3.40

   Use dataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineStartWidthValue ) instead.
%End

 QString endValueExpressionForWidth() const /Deprecated/;
%Docstring
Returns the expression related to the end extremity value for width.

.. deprecated:: 3.40

   Use dataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineEndWidthValue ) instead.
%End


    void setWidthUnit( Qgis::RenderUnit strokeWidthUnit );
%Docstring
Sets the width unit.

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

    Qgis::RenderUnit widthUnit() const;
%Docstring
Returns the width unit.

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

    void setInterpolatedWidth( const QgsInterpolatedLineWidth &interpolatedLineWidth );
%Docstring
Sets the interpolated width used to render the width of lines, ``see``
:py:class:`QgsInterpolatedLineWidth`.

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

    QgsInterpolatedLineWidth interpolatedWidth() const;
%Docstring
Returns the interpolated width used to render the width of lines, see
``:py:class:`QgsInterpolatedLineWidth```.

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

 void setExpressionsStringForColor( const QString &start, const QString &end ) /Deprecated/;
%Docstring
Sets the expressions (as string) that define the extremety values af the
line feature for color.

.. deprecated:: 3.40

   Use setDataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineStartColorValue ) and setDataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineEndColorValue ) instead.
%End

 QString startValueExpressionForColor() const /Deprecated/;
%Docstring
Returns the epression related to the start extremity value for width for
color

.. deprecated:: 3.40

   Use dataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineStartColorValue ) instead.
%End

 QString endValueExpressionForColor() const /Deprecated/;
%Docstring
Returns the expression related to the end extremity value for width for
color

.. deprecated:: 3.40

   Use dataDefinedProperty( :py:class:`QgsSymbolLayer`.PropertyLineEndColorValue ) instead.
%End

    void setInterpolatedColor( const QgsInterpolatedLineColor &interpolatedLineColor );
%Docstring
Sets the interpolated color used to render the colors of lines, ``see``
:py:class:`QgsInterpolatedLineColor`.

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

    QgsInterpolatedLineColor interpolatedColor() const;
%Docstring
Returns the interpolated color used to render the colors of lines, see
``:py:class:`QgsInterpolatedLineColor```.

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

  private:
    QgsInterpolatedLineSymbolLayer( const QgsInterpolatedLineSymbolLayer &copy );
};


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