File: qgsprocessingprovider.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 (426 lines) | stat: -rw-r--r-- 13,506 bytes parent folder | download | duplicates (14)
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/processing/qgsprocessingprovider.h                          *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsProcessingProvider : QObject
{
%Docstring(signature="appended")
Abstract base class for processing providers.

An algorithm provider is a set of related algorithms, typically from the
same external application or related to a common area of analysis.
%End

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

    QgsProcessingProvider( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsProcessingProvider.
%End

    ~QgsProcessingProvider();


    virtual QIcon icon() const /HoldGIL/;
%Docstring
Returns an icon for the provider.

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

    virtual QString svgIconPath() const /HoldGIL/;
%Docstring
Returns a path to an SVG version of the provider's icon.

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

    virtual Qgis::ProcessingProviderFlags flags() const /HoldGIL/;
%Docstring
Returns the flags indicating how and when the provider operates and
should be exposed to users. Default is no flags.

.. versionadded:: 3.14
%End

    virtual QString id() const = 0 /HoldGIL/;
%Docstring
Returns the unique provider id, used for identifying the provider. This
string should be a unique, short, character only string, eg "qgis" or
"gdal". This string should not be localised.

.. seealso:: :py:func:`name`

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

    virtual QString helpId() const /HoldGIL/;
%Docstring
Returns the provider help id string, used for creating
:py:class:`QgsHelp` urls for algorithms belong to this provider. By
default, this returns an empty string, meaning that no
:py:class:`QgsHelp` url should be created for the provider's algorithms.

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

    virtual QString name() const = 0 /HoldGIL/;
%Docstring
Returns the provider name, which is used to describe the provider within
the GUI. This string should be short (e.g. "Lastools") and localised.

.. seealso:: :py:func:`longName`

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

    virtual QString longName() const /HoldGIL/;
%Docstring
Returns the longer version of the provider name, which can include extra
details such as version numbers. E.g. "Lastools LIDAR tools (version
2.2.1)". This string should be localised.

The default implementation returns the same string as
:py:func:`~QgsProcessingProvider.name`.

.. seealso:: :py:func:`name`

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

    virtual QString versionInfo() const /HoldGIL/;
%Docstring
Returns a version information string for the provider, or an empty
string if this is not applicable (e.g. for inbuilt Processing
providers).

For plugin based providers, this should return the plugin's version
identifier.

.. versionadded:: 3.8
%End

    virtual bool canBeActivated() const;
%Docstring
Returns ``True`` if the provider can be activated, or ``False`` if it
cannot be activated (e.g. due to missing external dependencies).

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

    virtual QString warningMessage() const;
%Docstring
Returns an optional warning message to show users when running
algorithms from this provider.

This can be used to return a translated warning message which should be
shown to users of this provider. It's intended for use in cases such as
a provider which relies on a 3rd-party backend, where the version of the
backend software is not officially supported, or for alerting users to
providers in a "beta" or "untrustworthy" state.

.. versionadded:: 3.10.1
%End

    virtual bool isActive() const;
%Docstring
Returns ``True`` if the provider is active and able to run algorithms.
%End

    virtual QStringList supportedOutputRasterLayerExtensions() const;
%Docstring
Returns a list of the raster format file extensions supported by this
provider.

.. seealso:: :py:func:`supportedOutputVectorLayerExtensions`

.. seealso:: :py:func:`supportedOutputPointCloudLayerExtensions`

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

    virtual QStringList supportedOutputVectorLayerExtensions() const;
%Docstring
Returns a list of the vector format file extensions supported by this
provider.

.. seealso:: :py:func:`supportedOutputTableExtensions`

.. seealso:: :py:func:`defaultVectorFileExtension`

.. seealso:: :py:func:`supportedOutputRasterLayerExtensions`

.. seealso:: :py:func:`supportsNonFileBasedOutput`

.. seealso:: :py:func:`supportedOutputPointCloudLayerExtensions`

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

    virtual QStringList supportedOutputPointCloudLayerExtensions() const;
%Docstring
Returns a list of the point cloud format file extensions supported by
this provider.

.. seealso:: :py:func:`supportedOutputVectorLayerExtensions`

.. seealso:: :py:func:`supportedOutputRasterLayerExtensions`

.. seealso:: :py:func:`supportedOutputVectorTileLayerExtensions`

.. seealso:: :py:func:`supportedOutputTableExtensions`

.. seealso:: :py:func:`defaultVectorFileExtension`

.. seealso:: :py:func:`supportsNonFileBasedOutput`

.. versionadded:: 3.24
%End

    virtual QStringList supportedOutputVectorTileLayerExtensions() const;
%Docstring
Returns a list of the vector tile format file extensions supported by
this provider.

By default returns a list containing only "mbtiles" extension.

.. seealso:: :py:func:`supportedOutputVectorLayerExtensions`

.. seealso:: :py:func:`supportedOutputRasterLayerExtensions`

.. seealso:: :py:func:`supportedOutputTableExtensions`

.. seealso:: :py:func:`defaultVectorFileExtension`

.. seealso:: :py:func:`supportsNonFileBasedOutput`

.. versionadded:: 3.32
%End

    virtual QStringList supportedOutputTableExtensions() const;
%Docstring
Returns a list of the table (geometry-less vector layers) file
extensions supported by this provider.

By default this is the same as
:py:func:`~QgsProcessingProvider.supportedOutputVectorLayerExtensions`.
Providers which utilize different formats for geometry-less layers can
override this method to return a different list of supported formats.

.. seealso:: :py:func:`supportedOutputVectorLayerExtensions`

.. seealso:: :py:func:`defaultVectorFileExtension`

.. seealso:: :py:func:`supportedOutputRasterLayerExtensions`

.. seealso:: :py:func:`supportsNonFileBasedOutput`

.. seealso:: :py:func:`supportedOutputPointCloudLayerExtensions`

.. versionadded:: 3.4.3
%End

    virtual bool isSupportedOutputValue( const QVariant &outputValue, const QgsProcessingDestinationParameter *parameter, QgsProcessingContext &context, QString &error /Out/ ) const;
%Docstring
Returns ``True`` if the specified ``outputValue`` is of a supported file
format for the given destination ``parameter``.

If the output value is not supported, ``error`` will be set to a
descriptive message explaining why.

.. versionadded:: 3.6
%End

    virtual QString defaultVectorFileExtension( bool hasGeometry = true ) const;
%Docstring
Returns the default file extension to use for vector outputs created by
the provider.

If ``hasGeometry`` is ``True`` then the output file format must have
support for geometry. If ``hasGeometry`` is ``False`` then non-spatial
formats can be used.

The default implementation returns the user's default Processing vector
output format setting, if it's supported by the provider (see
:py:func:`~QgsProcessingProvider.supportedOutputVectorLayerExtensions`).
Otherwise the first reported supported vector format will be used.

.. seealso:: :py:func:`supportedOutputVectorLayerExtensions`

.. seealso:: :py:func:`defaultRasterFileExtension`

.. seealso:: :py:func:`defaultPointCloudFileExtension`

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

    virtual QString defaultRasterFileExtension() const;
%Docstring
Returns the default file extension to use for raster outputs created by
the provider.

The default implementation returns the user's default Processing raster
output format setting, if it's supported by the provider (see
:py:func:`~QgsProcessingProvider.supportedOutputRasterLayerExtensions`).
Otherwise the first reported supported raster format will be used.

.. seealso:: :py:func:`supportedOutputRasterLayerExtensions`

.. seealso:: :py:func:`defaultVectorFileExtension`

.. seealso:: :py:func:`defaultPointCloudFileExtension`

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

    virtual QString defaultPointCloudFileExtension() const;
%Docstring
Returns the default file extension to use for point cloud outputs
created by the provider.

The default implementation returns the user's default Processing point
cloud output format setting, if it's supported by the provider (see
:py:func:`~QgsProcessingProvider.supportedOutputPointCloudLayerExtensions`).
Otherwise the first reported supported point cloud format will be used.

.. seealso:: :py:func:`supportedOutputPointCloudLayerExtensions`

.. seealso:: :py:func:`defaultVectorFileExtension`

.. seealso:: :py:func:`defaultRasterFileExtension`

.. seealso:: :py:func:`defaultVectorTileFileExtension`

.. versionadded:: 3.24
%End

    virtual QString defaultVectorTileFileExtension() const;
%Docstring
Returns the default file extension to use for vector tile outputs
created by the provider.

The default implementation returns the user's default Processing vector
tile output format setting, if it's supported by the provider (see
:py:func:`~QgsProcessingProvider.supportedOutputVectorTileLayerExtensions`).
Otherwise the first reported supported vector tile format will be used.

.. seealso:: :py:func:`supportedOutputPointCloudLayerExtensions`

.. seealso:: :py:func:`defaultVectorFileExtension`

.. seealso:: :py:func:`defaultRasterFileExtension`

.. versionadded:: 3.32
%End

    virtual bool supportsNonFileBasedOutput() const;
%Docstring
Returns ``True`` if the provider supports non-file based outputs (such
as memory layers or direct database outputs). If a provider returns
``False`` for this method than it indicates that none of the outputs
from any of the provider's algorithms have support for non-file based
outputs. Returning ``True`` indicates that the algorithm's parameters
will each individually declare their non-file based support.

The default behavior for providers is to support non-file based outputs,
and most providers which rely solely on QGIS API (and which do not
depend on third-party scripts or external dependencies) will
automatically support this.

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

    virtual bool load();
%Docstring
Loads the provider. This will be called when the plugin is being loaded,
and any general setup actions should occur in an overridden version of
this method. Subclasses should not individually load any algorithms in
their :py:func:`~QgsProcessingProvider.load` implementations, as that
must occur within the :py:func:`~QgsProcessingProvider.loadAlgorithms`
method. Instead, subclasses should call
:py:func:`~QgsProcessingProvider.refreshAlgorithms` from any overloaded
:py:func:`~QgsProcessingProvider.load` method to trigger an initial load
of the provider's algorithms.

:return: ``True`` if provider could be successfully loaded

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

    virtual void unload();
%Docstring
Unloads the provider. Any tear-down steps required by the provider
should be implemented here.

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

    void refreshAlgorithms();
%Docstring
Refreshes the algorithms available from the provider, causing it to
re-populate with all associated algorithms.
%End

    QList< const QgsProcessingAlgorithm * > algorithms() const;
%Docstring
Returns a list of algorithms supplied by this provider.

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

    const QgsProcessingAlgorithm *algorithm( const QString &name ) const;
%Docstring
Returns the matching algorithm by ``name``, or ``None`` if no matching
algorithm is contained by this provider.

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

  signals:

    void algorithmsLoaded();
%Docstring
Emitted when the provider has loaded (or refreshed) its list of
available algorithms.

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

  protected:

    virtual void loadAlgorithms() = 0;
%Docstring
Loads all algorithms belonging to this provider. Subclasses should
implement this, calling :py:func:`~QgsProcessingProvider.addAlgorithm`
to register all their associated algorithms.
%End

    bool addAlgorithm( QgsProcessingAlgorithm *algorithm /Transfer/ );
%Docstring
Adds an ``algorithm`` to the provider. Ownership of the algorithm is
transferred to the provider.
%End

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



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