947 Commits

Author SHA1 Message Date
Nyall Dawson
bb344bcee2 Fix typo 2017-07-15 22:08:39 +10:00
Mathieu Pellerin
b5dc9fd3cd [processing] restore and improve lines to pol / pol to lines algs (#4850)
New geometry model for lines to pol / pol to lines agls.
2017-07-14 14:44:38 +07:00
Alexander Bruy
56208540f9 [processing] remove GeoAlgorithmExecutionException 2017-07-13 09:02:24 +03: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
f49b603443 Split QgsProcessingModelAlgorithm into separate components
The cpp/h file was getting too large, so split off the individual
subcomponents into their own h/cpp files to keep code
maintainable.
2017-07-08 20:49:17 +10:00
Nyall Dawson
cfa18039af Fix incorrect icon size in processing windows
Well... kind of. It fixes the toolbar button size, but for some
reason the actual icon content itself isn't being resized. I can't
work out why this is...
2017-07-08 20:49:17 +10:00
Nyall Dawson
0836c60712 Make model editor dialog more robust while loading models 2017-07-08 20:49:17 +10:00
Nyall Dawson
9d04f87249 Rename "output" style parameters for clarity
The previous naming was too easily confused with processing outputs.
Rename them to QgsProcessingParameterFileDestination, etc... to
make it clearer what they are used for.
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
Matthias Kuhn
875a5d6d9d Merge pull request #4818 from DelazJ/spelling
Fix some spelling issues
2017-07-08 10:20:40 +02:00
Nyall Dawson
e0915103fd Fix folder destinations always default to temp folder (fix #16800) 2017-07-07 17:02:19 +10:00
Nyall Dawson
b500080a31 [processing] Use correct file filter for file output dialog 2017-07-07 16:39:19 +10:00
Nyall Dawson
3f9cfe0ce7 Fix setting number parameters to expressions 2017-07-07 11:35:31 +10:00
Nyall Dawson
82ef7d2a89 Create specific expression context scope for child algorithms
Contains variables for model parameters, algorithm results for
other child algorithms which are not dependent on the
algorithm.

Allows removal of final pieces of ModelerAlgorithm code
2017-07-07 11:35:31 +10:00
Nyall Dawson
d8086e549d Use c++ method for available sources 2017-07-07 11:35:31 +10:00
Nyall Dawson
ac9a39f09a Fix processing.runAndLoadResults 2017-07-07 09:28:20 +10:00
Nyall Dawson
e9e335a7bd Don't set thinking cursors when running processing algorithms
Since now they're run in a background thread, it's not appropriate
anymore
2017-07-07 09:28:19 +10:00
Nyall Dawson
1b2086e8a6 Make algorithm dialog use background tasks to execute algorithms 2017-07-07 09:27:35 +10:00
Harrissou Sant-anna
6fab688298 Use SpatiaLite right spelling when needed 2017-07-07 01:26:38 +02:00
Harrissou Sant-anna
b57cd0deb1 [processing] align the "Iterate over layer" button (#4796) 2017-07-03 14:13:30 +07:00
Nyall Dawson
4f096a6f8b Feature source parameters cannot be used for vector layer algorithm
parameters in models

There's not a 1:1 correlation here - vector layers can be used
as inputs for sources, but sources cannot be used when a
full vector layer is required.
2017-06-27 13:18:22 +10:00
Nyall Dawson
14347a431e Also add results to results dock when running through algorithm dialog 2017-06-27 13:18:22 +10:00
Nyall Dawson
1e5d773e57 Fix use of temporary files for outputs 2017-06-27 13:18:22 +10:00
Nyall Dawson
0b4bb9e998 Remove manually set tab bar height in algorithm dialog
Breaks dialog layout on hidpi screens
2017-06-27 10:49:31 +10:00
Nyall Dawson
94619d0df3 Fix incorrect layer source from widget wrapper 2017-06-27 08:33:13 +10:00
Nyall Dawson
11d35821c0 Fix setting number inputs to algorithms in modeler 2017-06-27 08:33:13 +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
d667bf595f Move iterator exception handling to c++ 2017-06-24 08:15:06 +10:00
Nyall Dawson
e7f13f5bd8 Port model help code to c++ 2017-06-24 07:36:07 +10:00
Nyall Dawson
9c47e1b148 Fix errors when edit model help 2017-06-24 07:35:56 +10:00
Nyall Dawson
81855a715b Use FastInsert when adding features from processing 2017-06-23 14:34:38 +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
98617c90bd Report errors when executing algs within dialogs 2017-06-23 12:08:54 +10:00
Nyall Dawson
93b7c2809e Report success or failure after running algs
And auto catch python exceptions and report failure of model
2017-06-23 12:08:54 +10:00
Nyall Dawson
9d8118c995 Fix dest selection panel when used in folder mode
Also fix some UX issues with the panel in folder, such as
correctly remembering/restoring last used folders, defaulting
to home dir, don't clear value when canceling while browsing
2017-06-22 18:21:51 +10:00
Nyall Dawson
76a9844949 Add folder output type 2017-06-22 18:21:33 +10:00
Nyall Dawson
22246dc332 Upgrade postgis widget wrappers to new API 2017-06-22 18:19:50 +10:00
Nyall Dawson
8af308d277 Fix creation of widget wrappers via metadata parameters 2017-06-22 18:19:26 +10:00
Nyall Dawson
d1ed7d158e Steps towards executing models 2017-06-22 06:47:11 +10:00
Nyall Dawson
a9f97fc478 Port create attribute index alg to new api 2017-06-21 22:22:37 +10:00
Nyall Dawson
0da3652257 Rename some parameter classes for consistency 2017-06-21 22:13:16 +10:00
Nyall Dawson
f6358b2118 Begin port of modeler algorithm to c++ 2017-06-20 14:45:13 +10:00
Nyall Dawson
efe8bba006 Work on resurrecting modeler 2017-06-20 14:45:13 +10:00
Nyall Dawson
bdc5e224a3 Small cleanups 2017-06-20 14:45:13 +10:00
Nyall Dawson
54124bd0aa Restore batch algorithm mode following new processing API 2017-06-13 12:32:30 +10:00
Nyall Dawson
df73a0f4fc Remove outdated TODO 2017-06-13 10:26:35 +10:00
Nyall Dawson
63611b1d8f Port script code functions to c++ classes
Restore logging executed algorithms
2017-06-12 15:59:56 +10:00
Nyall Dawson
5177c7d181 Add a more descriptive tooltip for iterate mode button 2017-06-12 13:39:42 +10:00
Nyall Dawson
4b81630aa6 More responsive feedback when using iterate mode 2017-06-12 13:39:33 +10:00