File: qgsprocessingoutputs.sip.in

package info (click to toggle)
qgis 3.40.13%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,185,160 kB
  • sloc: cpp: 1,615,781; python: 372,865; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,829; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (566 lines) | stat: -rw-r--r-- 15,275 bytes parent folder | download | duplicates (16)
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
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/processing/qgsprocessingoutputs.h                           *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/







class QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
Base class for the definition of processing outputs.

Output definitions encapsulate the properties regarding the outputs from
algorithms, such as generated layers or calculated values.
%End

%TypeHeaderCode
#include "qgsprocessingoutputs.h"
%End
%ConvertToSubClassCode
    if ( sipCpp->type() == QgsProcessingOutputVectorLayer::typeName() )
      sipType = sipType_QgsProcessingOutputVectorLayer;
    else if ( sipCpp->type() == QgsProcessingOutputRasterLayer::typeName() )
      sipType = sipType_QgsProcessingOutputRasterLayer;
    else if ( sipCpp->type() == QgsProcessingOutputPointCloudLayer::typeName() )
      sipType = sipType_QgsProcessingOutputPointCloudLayer;
    else if ( sipCpp->type() == QgsProcessingOutputVectorTileLayer::typeName() )
      sipType = sipType_QgsProcessingOutputVectorTileLayer;
    else if ( sipCpp->type() == QgsProcessingOutputMapLayer::typeName() )
      sipType = sipType_QgsProcessingOutputMapLayer;
    else if ( sipCpp->type() == QgsProcessingOutputMultipleLayers::typeName() )
      sipType = sipType_QgsProcessingOutputMultipleLayers;
    else if ( sipCpp->type() == QgsProcessingOutputHtml::typeName() )
      sipType = sipType_QgsProcessingOutputHtml;
    else if ( sipCpp->type() == QgsProcessingOutputNumber::typeName() )
      sipType = sipType_QgsProcessingOutputNumber;
    else if ( sipCpp->type() == QgsProcessingOutputString::typeName() )
      sipType = sipType_QgsProcessingOutputString;
    else if ( sipCpp->type() == QgsProcessingOutputBoolean::typeName() )
      sipType = sipType_QgsProcessingOutputBoolean;
    else if ( sipCpp->type() == QgsProcessingOutputFolder::typeName() )
      sipType = sipType_QgsProcessingOutputFolder;
    else if ( sipCpp->type() == QgsProcessingOutputFile::typeName() )
      sipType = sipType_QgsProcessingOutputFile;
    else if ( sipCpp->type() == QgsProcessingOutputConditionalBranch::typeName() )
      sipType = sipType_QgsProcessingOutputConditionalBranch;
    else if ( sipCpp->type() == QgsProcessingOutputVariant::typeName() )
      sipType = sipType_QgsProcessingOutputVariant;
    else
      sipType = nullptr;
%End
  public:

    QgsProcessingOutputDefinition( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputDefinition.
%End

    virtual ~QgsProcessingOutputDefinition();

    virtual QString type() const = 0;
%Docstring
Unique output type name.
%End

    QString name() const;
%Docstring
Returns the name of the output. This is the internal identifier by which
algorithms access this output.

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

    void setName( const QString &name );
%Docstring
Sets the ``name`` of the output. This is the internal identifier by
which algorithms access this output.

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

    QString description() const;
%Docstring
Returns the description for the output. This is the user-visible string
used to identify this output.

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

    void setDescription( const QString &description );
%Docstring
Sets the ``description`` for the output. This is the user-visible string
used to identify this output.

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

    void setAutoCreated( bool autoCreated );
%Docstring
Sets whether an output was automatically created when adding a
parameter.

:param autoCreated: set to ``True`` if the output is to be considered as
                    automatically created.

.. seealso:: :py:func:`autoCreated`

.. versionadded:: 3.14
%End

    bool autoCreated() const;
%Docstring
Returns ``True`` if the output was automatically created when adding a
parameter.

.. seealso:: :py:func:`setAutoCreated`

.. versionadded:: 3.14
%End

    virtual QString valueAsString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;
%Docstring
Returns a string version of the parameter output ``value`` (if
possible).

:param value: value to convert
:param context: processing context

:return: - value converted to string
         - ok: ``True`` if value could be represented as a string.

.. seealso:: :py:func:`valueAsFormattedString`

.. versionadded:: 3.36
%End

    virtual QString valueAsFormattedString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;
%Docstring
Returns a HTML string version of the parameter output ``value`` (if
possible).

By default this will return the same value as
:py:func:`~QgsProcessingOutputDefinition.valueAsString`.

:param value: value to convert
:param context: processing context

:return: - value converted to string
         - ok: ``True`` if value could be represented as a string.

.. seealso:: :py:func:`valueAsString`

.. versionadded:: 3.36
%End

  protected:



};

typedef QList< const QgsProcessingOutputDefinition * > QgsProcessingOutputDefinitions;

class QgsProcessingOutputMapLayer : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A map layer output for processing algorithms, where layers may be either
vector or raster.

If the actual layer output type is known (e.g. always vector or always
raster), use :py:class:`QgsProcessingOutputVectorLayer` or
:py:class:`QgsProcessingOutputRasterLayer` instead.
%End

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

    QgsProcessingOutputMapLayer( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputMapLayer.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End

    virtual QString type() const;


};

class QgsProcessingOutputVectorLayer : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A vector layer output for processing algorithms.
%End

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

    QgsProcessingOutputVectorLayer( const QString &name, const QString &description = QString(), Qgis::ProcessingSourceType type = Qgis::ProcessingSourceType::VectorAnyGeometry );
%Docstring
Constructor for QgsProcessingOutputVectorLayer.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;

    Qgis::ProcessingSourceType dataType() const;
%Docstring
Returns the layer type for the output layer.

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

    void setDataType( Qgis::ProcessingSourceType type );
%Docstring
Sets the layer ``type`` for the output layer.

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

};

class QgsProcessingOutputRasterLayer : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A raster layer output for processing algorithms.
%End

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

    QgsProcessingOutputRasterLayer( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputRasterLayer.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
};

class QgsProcessingOutputPointCloudLayer : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A pointcloud layer output for processing algorithms.

.. versionadded:: 3.24
%End

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

    QgsProcessingOutputPointCloudLayer( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputPointCloudLayer.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
};

class QgsProcessingOutputMultipleLayers : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A multi-layer output for processing algorithms which create map layers,
when the number and nature of the output layers is not predefined.

.. note::

   Always prefer to explicitly define :py:class:`QgsProcessingOutputVectorLayer`,
   :py:class:`QgsProcessingOutputRasterLayer` or :py:class:`QgsProcessingOutputMapLayer` where possible. :py:class:`QgsProcessingOutputMultipleLayers`
   should only ever be used when the number of output layers is not
   fixed - e.g. as a result of processing all layers in a specified
   folder.
%End

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

    QgsProcessingOutputMultipleLayers( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputMultipleLayers.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;

    virtual QString valueAsString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;


};

class QgsProcessingOutputHtml : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A HTML file output for processing algorithms.
%End

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

    QgsProcessingOutputHtml( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputHtml.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
    virtual QString valueAsFormattedString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;

};


class QgsProcessingOutputVariant : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A variant output for processing algorithms, capable of storing any
QVariant value.

.. versionadded:: 3.34
%End

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

    QgsProcessingOutputVariant( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputVariant.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;

    virtual QString valueAsString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;


};

class QgsProcessingOutputNumber : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A numeric output for processing algorithms.
%End

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

    QgsProcessingOutputNumber( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputNumber.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
    virtual QString valueAsString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;


};

class QgsProcessingOutputString : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A string output for processing algorithms.
%End

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

    QgsProcessingOutputString( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputString.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
};

class QgsProcessingOutputBoolean : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A boolean output for processing algorithms.

.. versionadded:: 3.8
%End

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

    QgsProcessingOutputBoolean( const QString &name, const QString &description = QString() );
%Docstring
Constructor for :py:class:`QgsProcessingOutputNumber`.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
    virtual QString valueAsString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;

};

class QgsProcessingOutputFolder : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A folder output for processing algorithms.
%End

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


    QgsProcessingOutputFolder( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputFolder.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
    virtual QString valueAsFormattedString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;


};

class QgsProcessingOutputFile : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A file output for processing algorithms.
%End

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

    QgsProcessingOutputFile( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputFile.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
    virtual QString valueAsFormattedString( const QVariant &value, QgsProcessingContext &context, bool &ok /Out/ ) const;


};

class QgsProcessingOutputConditionalBranch : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A conditional branch output for processing algorithms, which represents
a possible model logic flow which branches out from this algorithm.

.. versionadded:: 3.14
%End

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

    QgsProcessingOutputConditionalBranch( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputConditionalBranch.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
};

class QgsProcessingOutputVectorTileLayer : QgsProcessingOutputDefinition
{
%Docstring(signature="appended")
A vector tile layer output for processing algorithms.

.. versionadded:: 3.32
%End

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

    QgsProcessingOutputVectorTileLayer( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputVectorTileLayer.
%End

    static QString typeName();
%Docstring
Returns the type name for the output class.
%End
    virtual QString type() const;
};

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