...instead of embedding in output destination file selector. Otherwise
Qt downgrades the file picker to the Qt basic file picker, instead of
the native OS file picker. Which is a huge downgrade and barely
functional for users.
Also remember last selected file format
By always trying to load all layers, we severely limit the usefulness
of batch processing. E.g. try clipping 200 layers - and then
get ready to punch something as you wait for all the results to load.
This change avoids holding onto resources and layers from earlier iterations,
and allows batch processing of many more items then is possible
if we hold on to these layers
While no-one is likely to use the batch dialog to run a single
operation, it's a bit unexpected to see two empty rows, which
can't be removed, when first opening this dialog
Since these expressions were only evaluated immediately, it led to
confusing behavior for users who were expecting that the expression
would be applied per-feature.
Given that expressions can be directly entered into spin boxes, we already
have a way of users evaluating simple calculations for numeric
parameters at least.
I don't think there's a strong enough use case for needing to
calculate string results to leave the confusing expression builder
option in place.
This should be re-evaluated when we add UI support for dynamic
parameters (which are already supported in the backend), where
expressions are evaluated per-feature.
Fixes#17267
* A new createopt textbox has been added to the parameters dialog for algorithms which exports to raster files.
* A new metaopt textbox has also been added to the Algorithm parameters dialog.
* Raster file format is detected from output filename extension.
* GdalUtils has been improved to correctly detect raster formats supported for creation.
* QFileDialog for output rasters now display only file filters for supported output raster file formats.
This change ensures that searching for algorithms always returns
native algorithms before matching 3rd party algorithms
TODO: we really need to replace the toolbox tree with a proper
model and redo the sorting/filtering using a sort/filter proxy
model.
Previously we took a harsher approach to filtering which inputs
were acceptable for child algorithm parameters. E.g. a child algorithm
with a vector layer input would only show outputs from other algorithms
which generated a vector layer output.
But this can needlessly restrict what's possible in models. E.g.
an algorithm which outputs a QgsProcessingOutputFile or
QgsProcessingOutputString could potentially be a valid source
to a vector layer. So we should allow these as possible
inputs for vector layer parameters too.
This commit adds many extra acceptable input types for
child parameters. It will probably expose "corner cases" where
algorithms may get unexpected input types, but these will
not affect existing model stability and can be fixed when
identified.
The payoff is a much more flexible modeler.
This allow to show checkboxes or radioboxes intead of line edit with button.
This is configurable for each algorithm thought ParameterSelection metadata parameter.
It is also possible to choose the number of columns.
This is not applied in case of the BatchDialog.