860 Commits

Author SHA1 Message Date
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
Nyall Dawson
b9e0b46f9f Fix running algorithms in iterating mode 2017-06-12 13:35:31 +10:00
Nyall Dawson
d8302a26f2 Fix feature source widget returns source even when not set 2017-06-12 10:38:40 +10:00
Nyall Dawson
c52e6a72ba Fix raster layers showing as input choices for vector algs 2017-06-12 10:35:22 +10:00
Nyall Dawson
b40f409de2 Nicer formatting for log in algorithm dialog 2017-06-12 08:31:37 +10:00
Nyall Dawson
e49cc78674 Make html output in basic stats algorithm optional 2017-06-12 07:26:02 +10:00
Nyall Dawson
cb41ef1adc Output useful logging when running algorithms from toolbox
Now outputs the input parameters, execution time, and results
2017-06-12 07:26:02 +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
aa544a14c0 Only use a temporary feedback object when running algorithms
Otherwise canceling a run causes all future runs to be canceled
2017-06-12 07:26:02 +10:00
Nyall Dawson
2d2c229332 Port checkInputCRS to c++, and allow algorithms to flag when they
require all input layers to be in the same CRS

The default behaviour is to assume that algorithms are well behaved
and can handle multi-CRS inputs, but algs have the option to
flag that they do not allow this and require the input CRS check.

Those algs should document that they require all inputs to have
matching CRS - processing 3.0 behaviour is to assume that algs
can handle this.
2017-06-12 07:26:02 +10:00
Nyall Dawson
ea18e8e9db Resurrect grid polygon algorithm 2017-06-12 07:26:02 +10:00
Nyall Dawson
d8260b8c47 [FEATURE] Port Extract by Expression to new API, allow saving
non matching features to separate output
2017-06-12 07:26:02 +10:00
Nyall Dawson
be2ec2f1a7 Fix running processing algs through locator 2017-06-11 20:54:03 +10:00
Nyall Dawson
6b55300fbc If a feature sink parameter is optional and not set, don't create the sink
This adds a lot of flexibility to algorithms, as it makes output
sinks truely optional. For instance, the various "Extract by..."
algorithms could add a new optional sink for features which
'fail' the extraction criteria. This effectively allows these
algorithms to become feature 'routers', directing features onto
other parts of a model depending on whether they pass or fail
the test.

But in this situation we don't always care about these failing
features, and we don't want to force them to always be fetched
from the provider. By making the outputs truely optional,
the algorithm can tweak its logic to either fetch all features
and send them to the correct output, or only fetch
matching features from the provider in the first place (a big
speed boost).
2017-06-09 14:22:29 +10:00
Alexander Bruy
e89502f43d fix help opening 2017-06-06 11:50:28 +03:00
Alexander Bruy
0773e549f2 [processing] move collapse button to the top 2017-06-06 10:51:22 +03:00
Alexander Bruy
8af3707b18 [processing] use arrow cursor for collapse button 2017-06-06 10:51:22 +03:00
Alexander Bruy
f4853a2173 [processing] add button to collapse/expand short help 2017-06-06 10:51:22 +03:00
Alexander Bruy
a137a7c0f3 [processing] open help in the default webbrowser to be consistent with
the rest of QGIS dialogs
2017-06-06 10:51:22 +03:00
Alexander Bruy
77fa17781e [processing] save and restore geometry of the algorithm dialog 2017-06-06 10:51:22 +03:00
Nyall Dawson
9038872200 Fix warning 2017-06-06 15:43:19 +10:00
Nyall Dawson
c1d35a043b Port getHTMLOutputsCount to c++ API 2017-06-06 15:39:54 +10:00
Nyall Dawson
74ffdb1187 Fix field widget wrapper 2017-06-06 15:21:09 +10:00
Nyall Dawson
2f28736e8e Remove some unused code 2017-06-06 14:38:52 +10:00
Nyall Dawson
a27c22d9b1 Add raster layer output parameters 2017-06-06 14:38:24 +10:00
Nyall Dawson
b75a174780 Rename QgsProcessingFeatureSinkDefinition to QgsProcessingOutputLayerDefinition
Since it also applies to raster layer outputs, we need a more generic name
2017-06-06 13:43:55 +10:00
Nyall Dawson
d53fa8d2af Port another alg to new API 2017-06-06 12:36:10 +10:00
Nyall Dawson
ab64428891 Add a cancel button for algorithms which support cancelation 2017-06-06 11:40:33 +10:00
Nyall Dawson
39d20a4cb4 Move algorithm expression context generation to QgsProcessingAlgorithm
Fix error when selecting "from expression" in algorithm parameter dialog
2017-06-06 11:25:09 +10:00
Nyall Dawson
607fed8c48 Restore ability to save outputs directly to Spatialite/PostGIS providers 2017-06-06 10:34:57 +10:00
Nyall Dawson
5e92c0dbf4 Fix saving processing outputs with correct encoding 2017-06-06 09:51:49 +10:00
Nyall Dawson
77072b15ac Rename QgsProcessingFeatureSink to QgsProcessingFeatureSinkDefinition
For consistency with QgsProcessingFeatureSourceDefinition
2017-06-06 08:42:48 +10:00
Nyall Dawson
81da209bf5 Use a QgsProject pointer instead of bool loadIntoProject
Allows potential future use case of loading results into
a different open project
2017-06-06 08:40:23 +10:00
Nyall Dawson
ea2e477d91 Fix failing tests, temporarily disable some processing tests during
refactoring
2017-06-06 07:41:20 +10:00
Nyall Dawson
7683b25f81 Move getFileFilter from params to gui wrappers 2017-06-06 07:41:20 +10:00
Nyall Dawson
7f687345f8 [FEATURE][processing] Add checkbox for each vector input layer
to control whether selected features only are to be used

Replaces the old global setting and makes it immediately obvious
to users when the selection will be respected
2017-06-06 07:41:20 +10:00
Nyall Dawson
46596c50f2 Restore correct layer naming when loading results 2017-06-06 07:41:20 +10:00
Nyall Dawson
5b9d925c70 Fix loading of results after running algorithms 2017-06-06 07:41:20 +10:00