138 Commits

Author SHA1 Message Date
Nyall Dawson
62cd1edbb3 [processing] Pressing enter in search box executes the selected algorithm 2018-02-23 08:27:40 +10:00
Nyall Dawson
82bfc407b8 [processing] When searching in toolbox, automatically select
the first visible algorithm if the previously selected item
was hidden

Avoids hidden selections in the toolbox
2018-02-23 08:26:47 +10:00
Juergen E. Fischer
9a3bfa01c2 fix translation strings 2018-02-22 00:37:48 +01:00
Nyall Dawson
835cca7cae [processing] More string HIG fixes 2018-02-22 06:44:17 +11:00
Juergen E. Fischer
6dfedc38e9 translation string fixes and cleanups 2018-02-15 22:31:15 +01:00
Alexander Bruy
23a5dd3197 [processing] fix file permissions 2018-02-06 19:25:48 +02:00
Alexander Bruy
aee3b44909 [processing] remove not needed trAction method 2018-02-05 08:49:41 +02:00
nirvn
6d5dce22f6 [processing] properly size toolbar button for provider actions 2018-01-26 13:11:24 +07:00
Mathieu Pellerin
34c2d32b3e
[processing] add actions when provider is registered / activated 2018-01-25 16:16:44 +07: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
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
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
b8defc113c When processing tasks are clicked in task manager, reopen the
algorithm dialog
2018-01-16 19:45:40 +10: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
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
Etienne Trimaille
cf685f0f5f add missing import operator (#5724) 2017-11-24 22:03:19 +07:00
Mathieu Pellerin
c2b3ac5624
[processing] order 3rd party provider groups (#5723) 2017-11-24 17:58:43 +07:00
Nyall Dawson
4ce166241e Allow processing providers to specify a long name, and show it in tooltips
Add version number to gdal provider long name
2017-10-19 13:12:31 +10:00
Nyall Dawson
a33376fe09 Drop version and count from algorithm item in tree view 2017-10-19 12:01:40 +10:00
Nyall Dawson
925ec6098c [processing] Always list native algorithms before 3rd party providers
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.
2017-10-19 12:01:40 +10:00
Nyall Dawson
34a8c8aab8 Fix exception when running alg with no parameters from toolbox 2017-09-24 07:46:35 +10:00
Nyall Dawson
fadfb3562a Fix error when adding disabled plugin based processing providers 2017-09-04 11:16:17 +10:00
Nyall Dawson
0669167af2 Rename processing 'recently used algorithms' to 'recently used'
Since we show much more than just 'algorithms' here
2017-08-23 17:35:09 +10:00
arnaud.morvan@camptocamp.com
40ccd3bcb3 [processing] Correctly delete processing dialogs
del only delete the python variable, not the dialog which is owned by the main window.
2017-08-05 09:31:40 +02:00
Nyall Dawson
5c844a5cfb Really delete processing dialogs
The dialogs are parented to the main window, which means sip
transfers the ownership to the main window - and they are
never deleted as a result. This results in various error
messages caused by the widgets hanging around forever
and listening out for various signals they are connected to.
2017-07-12 18:52:53 +10:00
Nyall Dawson
1e13d733c2 Move declaration of algorithm parameters/outputs to a new virtual
initAlgorithm() method

This allows 2 benefits:
- algorithms can be subclassed and have subclasses add additional
parameters/outputs to the algorithm. With the previous approach
of declaring parameters/outputs in the constructor, it's not
possible to call virtual methods to add additional parameters/
outputs (since you can't call virtual methods from a constructor).

- initAlgorithm takes a variant map argument, allowing the algorithm
to dynamically adjust its declared parameters and outputs according
to this configuration map. This potentially allows model algorithms which
can be configured to have variable numbers of parameters and
outputs at run time. E.g. a "router" algorithm which directs
features to one of any number of output sinks depending on some
user configured criteria.
2017-07-10 16:31:14 +10:00
Nyall Dawson
8f586ef020 Move groups from QGIS (and QGIS native) provider to top level items
in processing toolbox

Helps aid in user discoverability of these algorithms, and
indicates to users that these should generally be the
preferred algorithm choices if duplicates exist from other
providers.
2017-06-24 12:01:16 +10:00
Nyall Dawson
4ea85362f4 Transform errors encountered while iterating features in
processing are non-fatal. We report them to users, and treat the
feature as having no geometry, but don't stop execution.
2017-06-23 12:08:54 +10:00
Nyall Dawson
1d6d4be556 Correctly reject algorithm dialog
Algorithm dialog was not being rejected when close button was
called (only hidden), leading to old dialogs and widgets
hanging around forever...
2017-06-12 07:26:02 +10:00
Nyall Dawson
bdf051a03a Partially port a trial python alg to new API 2017-06-06 07:41:19 +10:00
Nyall Dawson
4cb7d18b1c Push parameters into processAlgorithm and related functions 2017-06-06 07:41:19 +10:00
Nyall Dawson
1e788556f0 Port getCustomParametersDialog to QgsProcessingAlgorithm 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
fac8ca4d4f Move execution check to QgsProcessingAlgorithm 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
Nyall Dawson
ae97c333d6 Revert "Port algorithm countVisibleParameters to c++"
This reverts commit c3c694f8ccfbe0b64df14365f950f5895968a66a.
2017-05-15 10:24:38 +10:00
Nyall Dawson
c3c694f8cc Port algorithm countVisibleParameters to c++ 2017-05-15 08:44:28 +10:00
Nyall Dawson
b34ee28cd8 [processing] Fix refreshing alg list does not refresh toolbox
Fix #16455, #16463
2017-05-01 17:29:40 +10:00
Nyall Dawson
ac84326464 [processing] Fix executing models 2017-05-01 17:29:40 +10:00
Nyall Dawson
fd2c18ee16 Refactor processing writer to use QgsFeatureSink, and to store
temporary output layers in the provided processing context

Should fix loss of intermediate memory layers when running
a multi-step model
2017-04-26 17:38:40 +10:00
Nyall Dawson
dd4f530cfb [processing] Pass context argument to processAlgorithm 2017-04-26 12:53:35 +10:00
Nyall Dawson
42a614154c Also refactor provider context menu actions and remove from AlgorithmProvider 2017-04-07 13:21:28 +10:00
Nyall Dawson
651355d569 Refactor provider actions and remove from AlgorithmProvider 2017-04-07 13:21:28 +10:00
Nyall Dawson
117260dcf3 Remove activation control from AlgorithmProvider
Split between QgsProcessingProvider and subclasses
2017-04-07 13:21:28 +10:00
Nyall Dawson
fb1cf1e185 Remove processing algList
All functionality has been moved to QgsProcessingRegistry
2017-04-07 13:21:28 +10:00