helpful comments next to all static enum parameter values used
in child algorithms with the corresponding text.
I.e. instead of
alg_params = {
'END_CAP_STYLE': 2,
}
we now export
alg_params = {
'END_CAP_STYLE': 2, # Flat
}
Much more readable!
Instead of forcing a quasi-random ordering of inputs for models,
this commit exposes a new "Reorder Model Inputs" option in the model
designer which allows users control over the exact order of
inputs to show users for their model.
No more illogical ordering like showing a field choice before the
layer choice it's based on!
Sponsored by NaturalGIS
This allows a range of new possibilities, including:
- models with static outputs for child algorithms, e.g. always saving
a child algorithm's output to a geopackage or postgres layer
- models with expression based output values for child algorithms, e.g.
generating an automatic file name based on today's date and saving
outputs to that file
These are a visual guide, allowing designers to create logical groups
of algorithms relating to a single task ("eg 'Prepare data')
The title and color of the group boxes can be customized
When designing a model, users typically will need to run the model
many times as they tweak its structure.
This change causes the parameters used when running the model from
the designer to be remembered and saved into the model, so that
each time you run the model from the designer you don't have to
re-set all the input parameter values to the desired test ones.
Makes iterative model design SO much easier!
Sponsored by Alta Ehf
This allows users to create comments attached to model components (inputs,
algorithms or outputs). Comments are shown linked to the associated component,
and can be freely moved around the model.
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)
Makes for nicer dox for both c++ and Python!
And require that showing help is opt-in. Apart from a handful
of built-in providers, most providers will not have help pages
available within the QGIS documentation (including model and
script algorithms). Accordingly, we should hide the help button
by default and only show it for these selected providers.
Note that 3rd party algorithms can still specify custom helpUrl
urls, in which case the button WILL be shown.
A new widget which handles parameter values for child algorithms
within a model. Instead of the previous approach of requiring
individual widget wrappers to handle creation of a suitable
model widget, we do all this automatically for them.
This widget uses a stacked widget with a toolbutton to select
the parameter's source, instead of the previous combo box approach
(which didn't scale well for large models). I.e. users select
first whether the value is taken from a static value, a
model input, or an output from a different child algorithm. The
widget then changes appearance and behavior based on this
choice.
Additionally, a new option is present for all parameters
of using a "precalculated expression". This expression is
evaluated once before the child algorithm is executed
and used during the execution of that algorithm.