143 Commits

Author SHA1 Message Date
Salvatore Larosa
ebb725ec04 [processing] create widget correctly from wrapper when in batch mode 2018-01-28 22:11:51 +01:00
Salvatore Larosa
550c74e106 [processing] fix wrong getter 2018-01-28 21:31:18 +01:00
Salvatore Larosa
f4f89bbcbe [processing] resurrects matrix parameter 2018-01-25 21:54:22 +01:00
Nyall Dawson
2013725793 Fix gui handling of NULL/None default values in processing script algorithms 2018-01-24 17:54:47 +11:00
Nyall Dawson
e7e37efed7
Merge pull request #5926 from nyalldawson/proc_dialog
[processing] Add api to show algorithm dialog, use dialog for history
2017-12-27 22:34:13 +11:00
Mathieu Pellerin
3b8905209e
[processing] harmonize and improve UI spacing 2017-12-27 10:50:52 +07:00
Nyall Dawson
595b9812ce [processing] Implement a todo (set layer param's wrapper values) 2017-12-21 10:04:54 +10:00
Nyall Dawson
bbf00279ad [processing] Don't sort field names in multi-field input dialog
Field names should always be listed in the order that the layer
defines them
2017-12-15 08:58:54 +11:00
volaya
ea49c8276c [processing] Set value of unused optional layer parameters to None instead of empty string 2017-12-13 14:39:12 +01:00
Nyall Dawson
901dae1110 [processing] Expose data defined button for dynamic numeric parameters
When running algorithms through the toolbox, which have dynamic
numeric parameters, add a data defined property override button
next to the widget so that users can set the overrides for these
parameters.

Previously this was available only in the backend, but not
exposed anywhere in the GUI.

Note that currently no algorithms support dynamic parameters,
so don't expect to see this everywhere. It's also only available
in toolbox/batch processing modes, not in models.
2017-12-02 11:17:18 +10:00
Nyall Dawson
8303b94685 [processing] Fix optional layer parameters are filled by default
Refs #17471

Not a full fix for 17471 - that requires handling of optional
numeric values too
2017-12-01 20:42:38 +11:00
Alexander Bruy
d65c036781 [processing] remove old params from wrappers 2017-11-28 12:27:45 +02:00
Alexander Bruy
3d4a59bb8b [processing] cleanup files from unused code and remove some files 2017-11-28 12:27:45 +02:00
Nyall Dawson
bb63a83e04 Add missing output from package algorithm 2017-11-27 06:38:21 +11:00
Nyall Dawson
4b9986eb8c [processing] Add a generic map layer output type
For occasions when an algorithm creates a map layer, but the type
is not known in advance (i.e. could be raster OR vector)
2017-11-27 06:38:21 +11:00
Nyall Dawson
7451422069 Fix package layers algorithm can't take the outputs from models
Fixes #17544
2017-11-26 12:01:41 +10:00
Mathieu Pellerin
97f749e6b4
[processing] fix error when adding refactor fields alg in empty model
(fixes #17421)
2017-11-24 18:04:50 +07:00
Nyall Dawson
612f51601a [processing] Remove expression buttons from parameters outside modeler
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
2017-11-10 10:42:25 +10:00
Médéric RIBREUX
d10aaf4bd4 Support multiple output file raster formats:
* 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.
2017-11-05 13:18:24 +01:00
Médéric RIBREUX
aa17df1a55 * Add new GRASS 7.2 algorithms.
* Fix ParameterRange GUI.
* Fix Multiple values Enum support.
2017-11-04 18:34:25 +01:00
Etienne Trimaille
386eef2e6c new string concatenation algorithm in processing 2017-10-25 08:17:59 +11:00
Nyall Dawson
5b1afd86bc "Loosen" up acceptable parameter for model child inputs
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.
2017-10-17 08:55:27 +10:00
Nyall Dawson
b39459b8ff Matching default multiple fields should also be case-insensitive 2017-09-22 12:02:48 +10:00
Nyall Dawson
c5b9fa23cd Formatting 2017-09-22 10:56:32 +10:00
Nyall Dawson
94530a9efc Allow setting default value for field parameters in models 2017-09-22 10:50:46 +10:00
nirvn
938f261596 [processing] fix map layer combo box layer reference 2017-09-18 13:37:49 +07:00
arnaud.morvan@camptocamp.com
534fe21f51 [processing] Add useCheckBoxes option to SelectionWidgetWrapper
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.
2017-09-16 09:57:13 +10:00
Nyall Dawson
f282a753c6 [processing] Fix incorrect filters in vector layer parameter selections 2017-09-15 19:41:19 +10:00
Nyall Dawson
cb70aad7a3 Fix restricting model algorithm input types to valid types for alg (refs #17030) 2017-08-23 17:34:08 +10:00
Nyall Dawson
4511ea1c12 Add a file selector for file parameters in model algorithms
Makes it more obvious to users that a fixed filename can be
used here
2017-08-23 02:14:30 +10:00
Nyall Dawson
367aba7059 Rename some processing widget wrappers to better match corresponding c++ classes 2017-08-23 00:16:42 +10:00
Nyall Dawson
ebda2fd212 Rename some enum values for clarity 2017-08-19 02:46:22 +10:00
Nyall Dawson
f2d2777bf3 Model vector layer inputs can also be used for feature source parameters 2017-08-19 01:09:22 +10:00
Nyall Dawson
8139786605 Allow adding manual layers in modeler multi layer alg parameters
This allows creation of models with child algorithms which do
things like merge a selected layer with a predefined static
layer, or create a vrt with a mix of static and user selected
layers.
2017-08-17 06:00:28 +10:00
Nyall Dawson
aefd5cce30 Fix exception when editing multi layer parameter in model 2017-08-17 05:18:33 +10:00
Nyall Dawson
b318aff6ff Fix multi layer parameters in models not giving all options for inputs 2017-08-17 05:12:11 +10:00
Nyall Dawson
1f2ea024f2 Allow adding layers which aren't open in the project to processing
parameters which accept lists of multiple layers

E.g. build vrt alg, merge vector layers alg

Otherwise you may need to load 100's of layers temporarily into
a project to perform algs on them
2017-08-17 03:52:40 +10:00
Nyall Dawson
7d7c06cd85 Implement widget wrapper for QgsProcessingParameterMapLayer 2017-08-11 04:33:18 +10:00
Nyall Dawson
e0fbe3409a Use ellipsis for isolated strings in plugins too 2017-08-11 04:33:18 +10:00
Mario Baranzini
f792661c1c Refactoring of rasterize algorithm 2017-08-08 20:59:58 +02:00
Mario Baranzini
baede356bb Refactoring 2017-08-08 17:16:17 +02:00
Nyall Dawson
b0cac0bd04 Remove debugging code 2017-08-07 17:13:07 +10:00
Nyall Dawson
470afbebbe Use correct file filters for processing vector/raster input selectors 2017-08-05 23:19:03 +10:00
Alexander Bruy
9fe326dee2 [processing] more consistent naming for class members, setters and
getters
2017-08-04 13:21:26 +03:00
Alexander Bruy
49bfe69823 [processing] add parameter representing raster band 2017-08-04 11:27:35 +03:00
Nyall Dawson
f7b25a17b1 Allow setting layer type filter for QgsProcessingParameterVectorLayer
Turns out this is required for some algorithms
2017-07-27 14:30:04 +10:00
Nyall Dawson
0836c60712 Make model editor dialog more robust while loading models 2017-07-08 20:49:17 +10:00
Nyall Dawson
f82b41e001 Move an enum to new QgsProcessing class 2017-07-08 20:49:17 +10:00
Nyall Dawson
d8086e549d Use c++ method for available sources 2017-07-07 11:35:31 +10:00
Harrissou Sant-anna
b57cd0deb1 [processing] align the "Iterate over layer" button (#4796) 2017-07-03 14:13:30 +07:00