906 Commits

Author SHA1 Message Date
Nyall Dawson
2013725793 Fix gui handling of NULL/None default values in processing script algorithms 2018-01-24 17:54:47 +11:00
Mathieu Pellerin
c5d9830db2
[needs-docs][processing] move providers actions into the processing
panel toolbar (#6150)
2018-01-24 13:24:44 +07:00
Nyall Dawson
54f9846eda Fix executing processing scripts through script editor 2018-01-24 15:53:33 +11:00
Nyall Dawson
63db1be890 [processing] Improve main window Toolbox action
Brings the behaviour into line with the styling dock, where
the action is checkable and checked only when the toolbox
is open AND user visible (i.e. not hidden behind another tab). If
the toolbox is open but hidden, then hitting the Toolbox action
brings it to the front tab.

Otherwise it's often necessary to hit to Toolbox shortcut twice -
once to close a hidden toolbox tab, and a second time to open
and raise it.
2018-01-24 11:38:07 +11:00
Alexander Bruy
d7e1813180 [processing] make items hidden after adding them to the view (fix #17881) 2018-01-23 10:00:28 +02:00
Nyall Dawson
40f09fab85 [processing] Fix creating tests when alg has optional outputs 2018-01-23 12:18:55 +11:00
Mathieu Pellerin
add40c1e22
[processing] use combined vector and raster filters for map layer file picker 2018-01-16 18:01:21 +07:00
Nyall Dawson
87c1986c4b Improved memory managment of algorithm dialogs
Ensure that dialogs are always correctly deleted when appropriate.

Also, if an algorithm is running in a background task and hits
an error, we automatically re-show the algorithm dialog and the
associated log for debugging.

Fixes #16858
2018-01-16 19:45:40 +10:00
Nyall Dawson
971aec8056 Rename QgsTaskManager::triggered to taskTriggered 2018-01-16 19:45:40 +10:00
Nyall Dawson
b8defc113c When processing tasks are clicked in task manager, reopen the
algorithm dialog
2018-01-16 19:45:40 +10:00
Nyall Dawson
240c52a4c0 [processing] Show a modal progress dialog when running algorithms
which cannot run in background tasks

This is not fantastic UX, but we have lots of constraints here:

- The algorithm dialog itself cannot be made modal. There's child
widgets (such as the point and extent parameter widgets) which
interact with the main QGIS window.
- There is no reliable way in Qt to make a dialog modal after
it's shown (e.g. make it modal only when the algorithm is
running). Trust me - I've tried everything, and all approaches
break with some corner case.
- For non-background algorithms, we must have processEvents calls
in order to show the algorithm feedback and progress to users,
and detect cancel button clicks. Yet these processEvents calls
means that users can interact with other parts of QGIS, e.g.
removing layers from a project, and other operations which
could cause the algorithm to crash. So we MUST have some modal
dialog in order to block interactions outside of allowing
the cancel button clicks/progress repainting.

I've tried many approaches, but this is the only one which
works reliably...
2018-01-10 08:33:36 +10:00
Nyall Dawson
c14e6ca772 Most c++ algorithms can run safely in background threads 2018-01-10 05:33:02 +10:00
Nyall Dawson
40e47e0fe7 [processing] Add flag to indicate whether an algorithm is safe
to run in a background thread
2018-01-10 05:33:02 +10: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
b25681cc43 [needs-docs][processing] Double clicking a history entry shows
the algorithm dialog instead of immediately executing same alg

This allows users to edit the parameters before re-running,
which is a more common user-operation (e.g. changing the
input layer, changing a parameter value "oops, that buffer
was a bit too big....").

If someone wants to exactly re-run the algorithm without changes
it's only one extra click anyway...
2017-12-21 11:01:56 +10:00
Nyall Dawson
ce28cf5087 Save algorithm results to dialog 2017-12-21 10:38:38 +10:00
Nyall Dawson
edcd058e32 [processing] Add a setParameters method to AlgorithmDialog
Allows pre-populating the dialog with non-default parameter
values.
2017-12-21 10:22:19 +10:00
Nyall Dawson
595b9812ce [processing] Implement a todo (set layer param's wrapper values) 2017-12-21 10:04:54 +10:00
Alexander Bruy
e9feeaacc6
Merge pull request #5875 from alexbruy/processing-editor
[FEATURE][processing][needs-docs] add find and replace functionality to script editor
2017-12-15 13:21:41 +02:00
Alexander Bruy
5016c21ed3 [FEATURE][processing][needs-docs] add find and replace functionality to
Processing script editor (forward-port from 2.18 branch)
2017-12-15 11:07:15 +02: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
volaya
0858652e84 [Processing] correctly report missing layers in postprocessing task 2017-12-13 14:39:10 +01:00
Alexander Bruy
79d83f2066 [processing] use core methods for raster and vector extensions handling 2017-12-11 09:38:14 +02:00
Nyall Dawson
1625d1fa2c Disable direct parameter value input when data defined override is set 2017-12-02 11:17:19 +10:00
Nyall Dawson
58ab507717 Fix failing test 2017-12-02 11:17:18 +10: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
1c1de3a88b [processing] Fix optional numeric parameters cannot be cleared
Without this change optional numeric parameters have no way to
be cleared in the GUI - they are always forced to have a value

Fixes #17471 - but I've noticed that many optional numeric
GRASS parameters have a non-null default value. These may
need to be investigated and manually changed to None defaults
in the description files.
2017-12-01 20:42:38 +11:00
Nyall Dawson
6b56565f89 Show nicer tooltips for numeric processing parameters
With min/max and default values (when set)
2017-12-01 20:42:38 +11: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
Nyall Dawson
f6e63d7f4c Fixes and cleanups to algorithm dialogs 2017-12-01 18:15:40 +11:00
Nyall Dawson
ce170918c9 Start moving processing algorithm dialog to c++
In an attempt to avoid Python global interpreter locks which
block the UI thread.
2017-12-01 18:15:40 +11:00
Nyall Dawson
c12770d041 Indentation 2017-12-01 10:00:42 +11:00
Nyall Dawson
e1ce7dda70 Show algorithm ID in tooltip in toolbox 2017-12-01 10:00:42 +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
Alexander Bruy
0059b2b692 [processing] remove Python 2 compatibility layer 2017-11-28 12:27:45 +02:00
Nyall Dawson
c0e732b799 [processing] Add QGIS 3d provider
Adds a new QGIS processing provider for 3d algorithms, available
only when QGIS is built WITH_3D

Currently includes only a single algorithm for tesselating geometries,
which exposes the functionality of QgsTesselator to processing.

Like the native c++ algorithm provider, algorithms in the 3d
provider are transparently merged with the other QGIS providers
(i.e. they aren't separated into their own group)
2017-11-27 06:54:29 +11: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
Etienne Trimaille
cf685f0f5f add missing import operator (#5724) 2017-11-24 22:03:19 +07: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
Mathieu Pellerin
c2b3ac5624
[processing] order 3rd party provider groups (#5723) 2017-11-24 17:58:43 +07:00
Nyall Dawson
aca22663d0 [processing] Change save as spatialite option to save as GeoPackage
Since it's much more useful. Also add a prompt for layer name, so that
you can save the results of an algorithm into an existing geopackage
without wiping existing layers.
2017-11-24 09:31:50 +10:00
Nyall Dawson
b97c6a8d88 Use native file picker for spatialite export option also 2017-11-22 05:26:34 +10:00
Nyall Dawson
31086d3ac5 [processing] Move destination encoding option to separate menu action
...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
2017-11-21 21:24:18 +10:00
Matthias Kuhn
06bae21d51
Merge pull request #5579 from DelazJ/logmessages
Clarify where and what Log Messages is
2017-11-20 15:54:29 +01:00
Nyall Dawson
d0c2a41c6c Fix error when running postgis algs 2017-11-16 13:38:42 +10:00