Brings back QGIS 2.18's ability to directly convert a Processing model
to an equivalent Processing Python script algorithm, correctly
updated and working in the 3.x API.
Available from the model dialog, and from the right-click context
menu on an existing model.
Sponsored by Solspec
options should be available for certain model outputs and script
algorithm outputs
We do this by swapping the test for non-file based output support
from checking only the algorithm's provider to instead checking
on a parameter-by-parameter basis.
This is done in order to support models. For models, depending
on what child algorithm a model output is based off, an individual
model may or may not have support for non-file based outputs. E.g
a model may generate outputs from a native qgis alg (supporting
these outputs) AND an output from a GDAL alg (with no support
for these outputs). In this case we need to enable or disable
the ui controls for non-file based outputs on an individual
output basis.
For scripts (for now) we blindly just say all outputs support
non-file based formats. This is going to be the case most of
the time, since scripts will usually be written using PyQGIS
API. For the exceptions (e.g. scripts which call other algs
like GDAL algs) we probably should add some way for the script
to indicate whether an individual output supports this, but
for now we just say they all do.
Fixes#17949
Contains variables for model parameters, algorithm results for
other child algorithms which are not dependent on the
algorithm.
Allows removal of final pieces of ModelerAlgorithm code
Nothing particularly exciting here yet, but this commit
moves the definition of the provider base class to a c++
QgsProcessingProvider abstract base class.
As part of this some existing python methods were renamed
to make their use clearer and to fit with the QGIS c++
api conventions:
- getName was renamed to id
- getDescription was renamed to name
- getIcon was renamed to icon
These API breaks are documented
This fixes some design errors (mainly the ModelerUtils class, which is not needed anymore to hold a copy of algs and providers in order to avoid circular dependencies) and removes unused code