98 Commits

Author SHA1 Message Date
Luigi Pirelli
25ffc9f1c7 Hey! the var is dynamic! 2019-09-04 01:51:53 +10:00
Luigi Pirelli
7eaccc9049 changed to row_number to be consistent with other expression variables 2019-09-04 01:51:53 +10:00
Luigi Pirelli
a4b9ef73fd Added batch_number variable in algorithm scope to allow use it in the expression editor in Processing batch context 2019-09-04 01:51:53 +10:00
Nyall Dawson
ec246e3ddb [processing] Fix batch mode 'fill with parameter values' option for outputs
Fixes #30543
2019-07-09 07:20:20 +10:00
Alexander Bruy
1d1d2ca703 Revert "[processing] populate batch interface with rows when multiple layers"
This reverts commits f8890d8f047cd2bb934eaad83e1057814927adb5,
f085f5527658c0a81b9a065a6fcee4d654d16bb6 and 5844a0fc906c744327139e137642f0ec97ae240a
2019-05-30 12:05:52 +03:00
Bas Couwenberg
2628c480c5 Don't include revision in sources.
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
Alexander Bruy
f8890d8f04 [processing] populate batch interface with rows when multiple layers
selected (fix #21859)
2019-05-09 08:14:12 +10:00
Nyall Dawson
af6d3d773d [processing] Fix exception when running batch alg after loading parameters 2019-05-08 20:13:07 +10:00
Nyall Dawson
070de69e30 [processing] Fix incorrect columns hidden when toggling advanced params in batch mode 2019-04-30 14:43:58 +10:00
Nyall Dawson
1d80fe8a19 Review comments 2019-04-30 14:43:58 +10:00
Nyall Dawson
c12fd877ed [processing] Remove selected rows from batch table, not always last row 2019-04-30 14:43:58 +10:00
Nyall Dawson
9f43f2f608 [FEATURE][processing] New "Add values by expression" option for
populating batch processing dialog

This option adds news rows using the values from an expression
which returns an array. (As opposed to "Calculate by Expression",
which works only on existing rows).

The intended use case is to allow populating the batch dialog
using complex numeric series, e.g. those created by the "generate_series"
expression function.

For example, adding rows for a batch buffer using the expression

    generate_series(100, 1000, 50)

(results in new rows with values 100, 150, 200, .... 1000)
2019-04-30 14:43:58 +10:00
Nyall Dawson
ee7daa8db7 [FEATURE][processing] Add option to calculate parameter values by expression in batch dialog
This new option is available under the Autofill menu for a column. Selecting it allows users
to create a new QGIS expression to use to update the value inside that column. Existing
parameter values (including those from other columns) are available for use inside
the expression via @variables.

E.g. this allows setting output file names to complex expressions like
'/home/me/stuff/buffer_' || left(@input, 30) || '_' || @distance || '.shp'
2019-04-30 14:43:58 +10:00
Nyall Dawson
185172a946 Refactor creation of batch dialog row algorithm parameters 2019-04-30 14:43:58 +10:00
Nyall Dawson
e6e39173b2 [FEATURE][processing] In batch mode, allow population of file/layer
input columns by searching for files matching a specified pattern

With optional recursive search!
2019-04-30 14:43:58 +10:00
Nyall Dawson
5edf06a5bc [processing][needs-docs] Move batch execution double-click-to-fill-down
to an explicit widget in the table

The double-click-header action is very hidden, and many users will
not stumble upon this. By moving it to an explicit "Autofill" widget at the
top of the table, we make this important action much more user
discoverable.

It also gives the possibility of other, parameter specific, autofill
actions (e.g. fill by expression, fill by file pattern)
2019-04-30 14:43:58 +10:00
Nyall Dawson
149b35ead2 Indentation 2019-04-27 07:27:54 +10:00
Nyall Dawson
b0ad13fbbd Remove some unused code 2019-04-27 07:27:54 +10:00
Nyall Dawson
5ec43cfdc1 [processing] Add project to QgsProcessingParameterWidgetContext 2019-03-12 08:16:52 +10:00
Alexander Bruy
80dd6d5203 [processing] add missed imports to batch panel (fix #21486) 2019-03-09 20:34:15 +02:00
Nyall Dawson
521ebdc973 [processing] Wrappers built off old API can still take advantage of the full widget context 2019-02-20 05:39:04 +10:00
Nyall Dawson
60a1d6306f Fix some missing expression context variables in processing expression based widgets 2019-02-13 07:59:30 +10:00
Nyall Dawson
7f3640d8a1 [processing] Fix evaluation of linked parameters in batch mode
e.g. missing fields after selecting a layer parameter
2019-02-08 06:38:49 +11:00
Nyall Dawson
adfaf76168 Another Travis fix 2018-09-22 05:26:29 +10:00
Nyall Dawson
7af13f62c0 Set widget context for widget wrappers 2018-09-22 05:26:29 +10:00
Nyall Dawson
ac3b37ffe0 [processing] Fix wrapper value retrieval for some ported wrappers
Fixes #19813
2018-09-11 10:26:36 +10:00
Nyall Dawson
1c5250b147 [processing] Fix some exceptions in batch dialog after refactoring
Fixes #19779, #19786
2018-09-08 17:51:42 +10:00
Nyall Dawson
3c2499ba95 Add some notes on deprecated class handling 2018-09-04 19:06:07 +10:00
Nyall Dawson
8082497724 Fix evaluation of Python wrapper values 2018-09-04 19:06:07 +10:00
Nyall Dawson
644ef6a752 [processing] Initial work on porting base GUI classes to c++
- Add abstract base class for Processing widget wrappers to c++
- Add wrapper factory interface to c++
- Make QgsProcessingGuiRegistry also register widget wrapper
factories, and be responsible for creation of new c++
processing widget wrapper instances
- Start on private c++ implementation of boolean widget wrapper,
including unit tests
2018-09-04 19:06:07 +10:00
Nyall Dawson
c0d9528090 Silence python warnings from 3rd party libraries on startup 2018-05-22 06:02:55 +10:00
Nyall Dawson
81d53644eb [processing] Fix restoring parameter values from batch panel load button
Fixes #18236
2018-02-27 11:58:50 +11:00
Nyall Dawson
6e44a27764 [processing] Fix exception when parameters are missing in batch dialog
Refs #18236
2018-02-27 11:58:50 +11:00
Denis Rouzaud
3dc3d9d1b2 unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
make enum items lower case
remove unused QgsMessageLog::None and All
2018-02-06 08:56:40 -04:00
Salvatore Larosa
77163ba0ec [processing] fix toggle advanced mode button in batch panel (#6193) 2018-01-29 08:12:30 +01:00
Alexander Bruy
3d4a59bb8b [processing] cleanup files from unused code and remove some files 2017-11-28 12:27:45 +02:00
Alexander Bruy
0059b2b692 [processing] remove Python 2 compatibility layer 2017-11-28 12:27:45 +02:00
Alexander Bruy
30cefca19e
Merge pull request #5593 from nyalldawson/batch_rows
[processing] Change min rows in batch processing to 1
2017-11-10 08:35:00 +02:00
Nyall Dawson
bd9945ffe3 [processing] Change min rows in batch processing to 1
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
2017-11-10 13:48:54 +10:00
Nyall Dawson
08b189df89 Fix error when double clicking destination param in batch dialog 2017-11-10 13:40:50 +10:00
Nyall Dawson
feb66d2cd8 Fix saving/load batch processing models 2017-11-10 13:22:49 +10:00
Nyall Dawson
8526a2dd3f Remember last used folder for processing batch save/load
Fixes #16310
2017-11-10 13:17:01 +10:00
Nyall Dawson
797437823c [processing] Fix cannot resize columns in batch dialog
Fixes #17227
2017-11-10 11:25:11 +10:00
Harrissou Sant-anna
f5025cc668 Use a more appropriate dialog title for message boxes
and capitalise first letters
2017-10-27 01:43:26 +02:00
Nyall Dawson
54124bd0aa Restore batch algorithm mode following new processing API 2017-06-13 12:32:30 +10:00
Nyall Dawson
189f804714 Adapt more code to c++ API 2017-06-06 07:41:19 +10:00
Nyall Dawson
ef59d0c454 Port parameter checking to c++ 2017-06-06 07:41:19 +10:00
Nyall Dawson
fb811766f8 Add framework for algorithm outputs
This somewhat changes the meaning of outputs from processing 2.x.
In 2.x processing outputs were used both as a method of specifying
inputs to algorithms (file paths to destination layers created
by the algorithm) AND pure outputs (such as statistics calculated
by the algorithm).

This is now split. The old input-type-outputs (destination layers)
are now input parameters (since the parameter value IS an input to the
algorithm). To differentiate them from parameters indicating pure
input layers a new "isDestination()" method was added to
QgsProcessingParameterDefinition.

Output definitions are now purely indications of values CREATED
by the algorithms. Suitable candidates are the existing calculated
stats and actual file path/URI of any layers created by the algorithm.
Moving forward we should ensure all algorithms output as much
useful information as possible - e.g. number of features processed,
number of skipped features, count null geometries encountered, etc...
2017-06-06 07:41:19 +10:00
Nyall Dawson
03e40f7497 [processing] Remove all remaining algorithm copies
Algorithms are no longer copied - just a single const instance
of each algorithm is used
2017-06-06 07:41:19 +10:00
Nyall Dawson
b64a71df61 Port algorithm countVisibleParameters to c++ 2017-06-06 07:41:19 +10:00