File: qgsprocessingcontext.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 (786 lines) | stat: -rw-r--r-- 23,284 bytes parent folder | download | duplicates (8)
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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/processing/qgsprocessingcontext.h                           *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/







class QgsProcessingContext
{
%Docstring(signature="appended")
Contains information about the context in which a processing algorithm
is executed.

Contextual information includes settings such as the associated project,
and expression context.
%End

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

    enum Flag
    {
      // For future API flexibility only and to avoid sip issues, remove when real entries are added to flags.
      Unused,
    };
    typedef QFlags<QgsProcessingContext::Flag> Flags;


    QgsProcessingContext();


    ~QgsProcessingContext();

    void copyThreadSafeSettings( const QgsProcessingContext &other );
%Docstring
Copies all settings which are safe for use across different threads from
``other`` to this context.
%End

    QgsProcessingContext::Flags flags() const /HoldGIL/;
%Docstring
Returns any flags set in the context.

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

    void setFlags( QgsProcessingContext::Flags flags ) /HoldGIL/;
%Docstring
Sets ``flags`` for the context.

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

    QgsProject *project() const /HoldGIL/;
%Docstring
Returns the project in which the algorithm is being executed.

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

    void setProject( QgsProject *project ) /HoldGIL/;
%Docstring
Sets the ``project`` in which the algorithm will be executed.

This also automatically sets the
:py:func:`~QgsProcessingContext.transformContext`,
:py:func:`~QgsProcessingContext.ellipsoid`,
:py:func:`~QgsProcessingContext.distanceUnit` and
:py:func:`~QgsProcessingContext.areaUnit` to match the project's
settings.

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

    QgsExpressionContext &expressionContext() /HoldGIL/;
%Docstring
Returns the expression context.
%End


    void setExpressionContext( const QgsExpressionContext &context );
%Docstring
Sets the expression ``context``.
%End

    QgsCoordinateTransformContext transformContext() const /HoldGIL/;
%Docstring
Returns the coordinate transform context.

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

    void setTransformContext( const QgsCoordinateTransformContext &context ) /HoldGIL/;
%Docstring
Sets the coordinate transform ``context``.

Note that setting a project for the context will automatically set the
coordinate transform context.

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

    QString ellipsoid() const /HoldGIL/;
%Docstring
Returns the ellipsoid to use for distance and area calculations.

.. seealso:: :py:func:`setEllipsoid`

.. versionadded:: 3.16
%End

    void setEllipsoid( const QString &ellipsoid ) /HoldGIL/;
%Docstring
Sets a specified ``ellipsoid`` to use for distance and area
calculations.

If not explicitly set, the ellipsoid will default to the
:py:func:`~QgsProcessingContext.project`'s ellipsoid setting.

.. seealso:: :py:func:`ellipsoid`

.. versionadded:: 3.16
%End

    Qgis::DistanceUnit distanceUnit() const /HoldGIL/;
%Docstring
Returns the distance unit to use for distance calculations.

.. seealso:: :py:func:`setDistanceUnit`

.. seealso:: :py:func:`areaUnit`

.. versionadded:: 3.16
%End

    void setDistanceUnit( Qgis::DistanceUnit unit ) /HoldGIL/;
%Docstring
Sets the ``unit`` to use for distance calculations.

If not explicitly set, the unit will default to the
:py:func:`~QgsProcessingContext.project`'s distance unit setting.

.. seealso:: :py:func:`distanceUnit`

.. seealso:: :py:func:`setAreaUnit`

.. versionadded:: 3.16
%End

    Qgis::AreaUnit areaUnit() const /HoldGIL/;
%Docstring
Returns the area unit to use for area calculations.

.. seealso:: :py:func:`setAreaUnit`

.. seealso:: :py:func:`distanceUnit`

.. versionadded:: 3.16
%End

    void setAreaUnit( Qgis::AreaUnit areaUnit ) /HoldGIL/;
%Docstring
Sets the ``unit`` to use for area calculations.

If not explicitly set, the unit will default to the
:py:func:`~QgsProcessingContext.project`'s area unit setting.

.. seealso:: :py:func:`areaUnit`

.. seealso:: :py:func:`setDistanceUnit`

.. versionadded:: 3.16
%End

    QgsDateTimeRange currentTimeRange() const /HoldGIL/;
%Docstring
Returns the current time range to use for temporal operations.

.. seealso:: :py:func:`setCurrentTimeRange`

.. versionadded:: 3.18
%End

    void setCurrentTimeRange( const QgsDateTimeRange &currentTimeRange ) /HoldGIL/;
%Docstring
Sets the ``current`` time range to use for temporal operations.

.. seealso:: :py:func:`currentTimeRange`

.. versionadded:: 3.18
%End

    QgsMapLayerStore *temporaryLayerStore() /HoldGIL/;
%Docstring
Returns a reference to the layer store used for storing temporary layers
during algorithm execution.
%End

    class LayerDetails
{
%Docstring(signature="appended")
Details for layers to load into projects.
%End

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

        LayerDetails( const QString &name, QgsProject *project, const QString &outputName = QString(), QgsProcessingUtils::LayerHint layerTypeHint = QgsProcessingUtils::LayerHint::UnknownType );
%Docstring
Constructor for LayerDetails.
%End

        LayerDetails();

        QString name;

        bool forceName;

        QString outputName;

        QString groupName;

        int layerSortKey;

        QgsProcessingUtils::LayerHint layerTypeHint;

        QgsProcessingLayerPostProcessorInterface *postProcessor() const;
%Docstring
Layer post-processor. May be ``None`` if no post-processing is required.

.. seealso:: :py:func:`setPostProcessor`

.. versionadded:: 3.2
%End

        void setPostProcessor( QgsProcessingLayerPostProcessorInterface *processor /Transfer/ );
%Docstring
Sets the layer post-processor. May be ``None`` if no post-processing is
required.

Ownership of ``processor`` is transferred.

.. seealso:: :py:func:`postProcessor`

.. versionadded:: 3.2
%End

        void setOutputLayerName( QgsMapLayer *layer ) const;
%Docstring
Sets a ``layer`` name to match this output, respecting any local user
settings which affect this name.

.. versionadded:: 3.10.1
%End

        QgsProject *project;

    };

    QMap< QString, QgsProcessingContext::LayerDetails > layersToLoadOnCompletion() const /HoldGIL/;
%Docstring
Returns a map of layers (by ID or datasource) to LayerDetails, to load
into the canvas upon completion of the algorithm or model.

.. seealso:: :py:func:`setLayersToLoadOnCompletion`

.. seealso:: :py:func:`addLayerToLoadOnCompletion`

.. seealso:: :py:func:`willLoadLayerOnCompletion`

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

    bool willLoadLayerOnCompletion( const QString &layer ) const /HoldGIL/;
%Docstring
Returns ``True`` if the given ``layer`` (by ID or datasource) will be
loaded into the current project upon completion of the algorithm or
model.

.. seealso:: :py:func:`layersToLoadOnCompletion`

.. seealso:: :py:func:`setLayersToLoadOnCompletion`

.. seealso:: :py:func:`addLayerToLoadOnCompletion`

.. seealso:: :py:func:`layerToLoadOnCompletionDetails`

.. versionadded:: 3.2
%End

    void setLayersToLoadOnCompletion( const QMap< QString, QgsProcessingContext::LayerDetails > &layers ) /HoldGIL/;
%Docstring
Sets the map of ``layers`` (by ID or datasource) to LayerDetails, to
load into the canvas upon completion of the algorithm or model.

.. seealso:: :py:func:`addLayerToLoadOnCompletion`

.. seealso:: :py:func:`layersToLoadOnCompletion`

.. seealso:: :py:func:`willLoadLayerOnCompletion`

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

    void addLayerToLoadOnCompletion( const QString &layer, const QgsProcessingContext::LayerDetails &details ) /HoldGIL/;
%Docstring
Adds a ``layer`` to load (by ID or datasource) into the canvas upon
completion of the algorithm or model. The ``details`` parameter dictates
the LayerDetails.

.. seealso:: :py:func:`setLayersToLoadOnCompletion`

.. seealso:: :py:func:`layersToLoadOnCompletion`

.. seealso:: :py:func:`willLoadLayerOnCompletion`

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

    QgsProcessingContext::LayerDetails &layerToLoadOnCompletionDetails( const QString &layer ) /HoldGIL/;
%Docstring
Returns a reference to the details for a given ``layer`` which is loaded
on completion of the algorithm or model.

.. warning::

   First check :py:func:`~QgsProcessingContext.willLoadLayerOnCompletion`, or calling this method will incorrectly
   add ``layer`` as a layer to load on completion.

.. seealso:: :py:func:`willLoadLayerOnCompletion`

.. seealso:: :py:func:`addLayerToLoadOnCompletion`

.. seealso:: :py:func:`setLayersToLoadOnCompletion`

.. seealso:: :py:func:`layersToLoadOnCompletion`

.. versionadded:: 3.2
%End

    Qgis::InvalidGeometryCheck invalidGeometryCheck() const /HoldGIL/;
%Docstring
Returns the behavior used for checking invalid geometries in input
layers.

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

    void setInvalidGeometryCheck( Qgis::InvalidGeometryCheck check );
%Docstring
Sets the behavior used for checking invalid geometries in input layers.
Settings this to anything but
:py:class:`QgsFeatureRequest`.GeometryNoCheck will also reset the
:py:func:`~QgsProcessingContext.invalidGeometryCallback` to a default
implementation.

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

    void setInvalidGeometryCallback( SIP_PYCALLABLE / AllowNone / );
%Docstring
Sets a callback function to use when encountering an invalid geometry
and :py:func:`~QgsProcessingContext.invalidGeometryCheck` is set to
GeometryAbortOnInvalid. This function will be called using the feature
with invalid geometry as a parameter.

.. seealso:: :py:func:`invalidGeometryCallback`
%End
%MethodCode
    Py_BEGIN_ALLOW_THREADS

    sipCpp->setInvalidGeometryCallback( [a0]( const QgsFeature &arg )
    {
      SIP_BLOCK_THREADS
      Py_XDECREF( sipCallMethod( NULL, a0, "D", &arg, sipType_QgsFeature, NULL ) );
      SIP_UNBLOCK_THREADS
    } );

    Py_END_ALLOW_THREADS
%End



    void setTransformErrorCallback( SIP_PYCALLABLE / AllowNone / );
%Docstring
Sets a callback function to use when encountering a transform error when
iterating features. This function will be called using the feature which
encountered the transform error as a parameter.

.. seealso:: :py:func:`transformErrorCallback`
%End
%MethodCode
    Py_BEGIN_ALLOW_THREADS

    sipCpp->setTransformErrorCallback( [a0]( const QgsFeature &arg )
    {
      SIP_BLOCK_THREADS
      Py_XDECREF( sipCallMethod( NULL, a0, "D", &arg, sipType_QgsFeature, NULL ) );
      SIP_UNBLOCK_THREADS
    } );

    Py_END_ALLOW_THREADS
%End


    QString defaultEncoding() const /HoldGIL/;
%Docstring
Returns the default encoding to use for newly created files.

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

    void setDefaultEncoding( const QString &encoding ) /HoldGIL/;
%Docstring
Sets the default ``encoding`` to use for newly created files.

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

    QgsProcessingFeedback *feedback() /HoldGIL/;
%Docstring
Returns the associated feedback object.

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

    void setFeedback( QgsProcessingFeedback *feedback ) /HoldGIL/;
%Docstring
Sets an associated ``feedback`` object. This allows context related
functions to report feedback and errors to users and processing logs.
While ideally this feedback object should outlive the context, only a
weak pointer to ``feedback`` is stored and no errors will occur if
feedback is deleted before the context. Ownership of ``feedback`` is not
transferred.

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

    QThread *thread() /HoldGIL/;
%Docstring
Returns the thread in which the context lives.

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

    void pushToThread( QThread *thread );
%Docstring
Pushes the thread affinity for the context (including all layers
contained in the :py:func:`~QgsProcessingContext.temporaryLayerStore`)
into another ``thread``. This method is only safe to call when the
current thread matches the existing thread affinity for the context (see
:py:func:`~QgsProcessingContext.thread`).

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

    void takeResultsFrom( QgsProcessingContext &context );
%Docstring
Takes the results from another ``context`` and merges them with the
results currently stored in this context. This includes settings like
any layers loaded in the
:py:func:`~QgsProcessingContext.temporaryLayerStore` and
:py:func:`~QgsProcessingContext.layersToLoadOnCompletion`. This is only
safe to call when both this context and the other ``context`` share the
same :py:func:`~QgsProcessingContext.thread` affinity, and that thread
is the current thread.
%End

    QgsMapLayer *getMapLayer( const QString &identifier );
%Docstring
Returns a map layer from the context with a matching ``identifier``.
This method considers layer IDs, names and sources when matching the
``identifier`` (see :py:func:`QgsProcessingUtils.mapLayerFromString()`
for details).

Ownership is not transferred and remains with the context.

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

    QgsMapLayer *takeResultLayer( const QString &id ) /TransferBack/;
%Docstring
Takes the result map layer with matching ``id`` from the context and
transfers ownership of it back to the caller. This method can be used to
remove temporary layers which are not required for further processing
from a context.

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

    QString preferredVectorFormat() const /HoldGIL/;
%Docstring
Returns the preferred vector format to use for vector outputs.

This method returns a file extension to use when creating vector outputs
(e.g. "shp"). Generally, it is preferable to use the extension
associated with a particular parameter, which can be retrieved through
:py:func:`QgsProcessingDestinationParameter.defaultFileExtension()`.
However, in some cases, a specific parameter may not be available to
call this method on (e.g. for an algorithm which has only an output
folder parameter and which creates multiple output layers in that
folder). In this case, the format returned by this function should be
used when creating these outputs.

It is the algorithm's responsibility to check whether the returned
format is acceptable for the algorithm, and to provide an appropriate
fallback when the returned format is not usable.

.. seealso:: :py:func:`setPreferredVectorFormat`

.. seealso:: :py:func:`preferredRasterFormat`

.. versionadded:: 3.10
%End

    void setPreferredVectorFormat( const QString &format ) /HoldGIL/;
%Docstring
Sets the preferred vector ``format`` to use for vector outputs.

This method sets a file extension to use when creating vector outputs
(e.g. "shp"). Generally, it is preferable to use the extension
associated with a particular parameter, which can be retrieved through
:py:func:`QgsProcessingDestinationParameter.defaultFileExtension()`.
However, in some cases, a specific parameter may not be available to
call this method on (e.g. for an algorithm which has only an output
folder parameter and which creates multiple output layers in that
folder). In this case, the format set by this function will be used when
creating these outputs.

.. seealso:: :py:func:`preferredVectorFormat`

.. seealso:: :py:func:`setPreferredRasterFormat`

.. versionadded:: 3.10
%End

    QString preferredRasterFormat() const /HoldGIL/;
%Docstring
Returns the preferred raster format to use for raster outputs.

This method returns a file extension to use when creating raster outputs
(e.g. "tif"). Generally, it is preferable to use the extension
associated with a particular parameter, which can be retrieved through
:py:func:`QgsProcessingDestinationParameter.defaultFileExtension()`.
However, in some cases, a specific parameter may not be available to
call this method on (e.g. for an algorithm which has only an output
folder parameter and which creates multiple output layers in that
folder). In this case, the format returned by this function should be
used when creating these outputs.

It is the algorithm's responsibility to check whether the returned
format is acceptable for the algorithm, and to provide an appropriate
fallback when the returned format is not usable.

.. seealso:: :py:func:`setPreferredRasterFormat`

.. seealso:: :py:func:`preferredVectorFormat`

.. versionadded:: 3.10
%End

    void setPreferredRasterFormat( const QString &format ) /HoldGIL/;
%Docstring
Sets the preferred raster ``format`` to use for raster outputs.

This method sets a file extension to use when creating raster outputs
(e.g. "tif"). Generally, it is preferable to use the extension
associated with a particular parameter, which can be retrieved through
:py:func:`QgsProcessingDestinationParameter.defaultFileExtension()`.
However, in some cases, a specific parameter may not be available to
call this method on (e.g. for an algorithm which has only an output
folder parameter and which creates multiple output layers in that
folder). In this case, the format set by this function will be used when
creating these outputs.

.. seealso:: :py:func:`preferredRasterFormat`

.. seealso:: :py:func:`setPreferredVectorFormat`

.. versionadded:: 3.10
%End

    Qgis::ProcessingLogLevel logLevel() const /HoldGIL/;
%Docstring
Returns the logging level for algorithms to use when pushing feedback
messages to users.

.. seealso:: :py:func:`setLogLevel`

.. versionadded:: 3.20
%End

    void setLogLevel( Qgis::ProcessingLogLevel level ) /HoldGIL/;
%Docstring
Sets the logging ``level`` for algorithms to use when pushing feedback
messages to users.

.. seealso:: :py:func:`logLevel`

.. versionadded:: 3.20
%End

    QString temporaryFolder() const /HoldGIL/;
%Docstring
Returns the (optional) temporary folder to use when running algorithms.

If set, this overrides the standard global Processing temporary folder
and should be used for all temporary files created during algorithm
execution.

.. seealso:: :py:func:`setTemporaryFolder`

.. versionadded:: 3.32
%End

    void setTemporaryFolder( const QString &folder ) /HoldGIL/;
%Docstring
Sets the (optional) temporary ``folder`` to use when running algorithms.

If set, this overrides the standard global Processing temporary folder
and should be used for all temporary files created during algorithm
execution.

.. seealso:: :py:func:`temporaryFolder`

.. versionadded:: 3.32
%End

    int maximumThreads() const /HoldGIL/;
%Docstring
Returns the (optional) number of threads to use when running algorithms.

.. warning::

   Not all algorithms which support multithreaded execution will
   respect this setting, depending on the multi-threading framework in use.
   Multithreaded algorithms must check this value and adapt their thread
   handling accordingly -- the setting will not be automatically applied.

.. seealso:: :py:func:`setMaximumThreads`

.. versionadded:: 3.32
%End

    void setMaximumThreads( int threads ) /HoldGIL/;
%Docstring
Sets the (optional) number of ``threads`` to use when running
algorithms.

If set, this overrides the standard global Processing number of threads
setting. Note that if algorithm implementation does not support
multhreaded execution, this setting will be ignored.

.. warning::

   Not all algorithms which support multithreaded execution will
   respect this setting, depending on the multi-threading framework in use.
   Multithreaded algorithms must check this value and adapt their thread
   handling accordingly -- the setting will not be automatically applied.

.. seealso:: :py:func:`maximumThreads`

.. versionadded:: 3.32
%End

    QVariantMap exportToMap() const /HoldGIL/;
%Docstring
Exports the context's settings to a variant map.

.. versionadded:: 3.24
%End

    enum class ProcessArgumentFlag
    {
      IncludeProjectPath,
    };
    typedef QFlags<QgsProcessingContext::ProcessArgumentFlag> ProcessArgumentFlags;


    QStringList asQgisProcessArguments( QgsProcessingContext::ProcessArgumentFlags flags = QgsProcessingContext::ProcessArgumentFlags() ) const;
%Docstring
Returns list of the equivalent qgis_process arguments representing the
settings from the context.

.. versionadded:: 3.24
%End




    QgsProcessingModelResult modelResult() const;
%Docstring
Returns the model results, populated when the context is used to run a
model algorithm.

.. versionadded:: 3.38
%End


    void clearModelResult();
%Docstring
Clears model results previously populated when the context was used to
run a model algorithm.

.. versionadded:: 3.42
%End

  private:
    QgsProcessingContext( const QgsProcessingContext &other );
};

QFlags<QgsProcessingContext::Flag> operator|(QgsProcessingContext::Flag f1, QFlags<QgsProcessingContext::Flag> f2);

QFlags<QgsProcessingContext::ProcessArgumentFlag> operator|(QgsProcessingContext::ProcessArgumentFlag f1, QFlags<QgsProcessingContext::ProcessArgumentFlag> f2);



class QgsProcessingLayerPostProcessorInterface
{
%Docstring(signature="appended")
An interface for layer post-processing handlers for execution following
a processing algorithm operation.

Note that post-processing of a layer will ONLY occur if that layer is
set to be loaded into a QGIS project on algorithm completion. See
:py:func:`QgsProcessingContext.layersToLoadOnCompletion()`.

Algorithms that wish to set post-processing steps for generated layers
should implement this interface in a separate class (NOT the algorithm
class itself!).

.. versionadded:: 3.2
%End

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

    virtual ~QgsProcessingLayerPostProcessorInterface();

    virtual void postProcessLayer( QgsMapLayer *layer, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0;
%Docstring
Post-processes the specified ``layer``, following successful execution
of a processing algorithm. This method always runs in the main thread
and can be used to setup renderers, editor widgets, metadata, etc for
the given layer.

Post-processing classes can utilize settings from the algorithm's
``context`` and report logging messages or errors via the given
``feedback`` object.

In the case of an algorithm run as part of a larger model, the
post-processing occurs following the completed execution of the entire
model.

Note that post-processing of a layer will ONLY occur if that layer is
set to be loaded into a QGIS project on algorithm completion. See
:py:func:`QgsProcessingContext.layersToLoadOnCompletion()`.
%End

};






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