15 Commits

Author SHA1 Message Date
Luigi Pirelli
8fa5b04c03 typo 2018-09-08 07:41:11 +10:00
Luigi Pirelli
7944f6704b added test for RangePanel widget 2018-09-08 07:41:11 +10:00
Nyall Dawson
5241ff3c22 [processing] Fix creation of new layers doesn't default output folder
Fixes #19637
2018-08-21 15:09:37 +10:00
Nyall Dawson
2692de6ed0 [FEATURE][processing] Choice of units for non degree/unknown distances
When an algorithm has a distance parameter in meters/feet/etc (i.e.
non-geographic distances), show a combo box allowing choice of
unit type.

(We don't (and should never) expose this for distances in degrees --
it's up to users in this situation to choose a suitable local
projection and reproject their data to match. Refs: a recent
talk by @volaya)
2018-07-27 13:24:03 +10:00
Nyall Dawson
6a4d9c9bd4 [processing] Ensure feature source wrapper always returns direct
layer id/source whenever 'use selected features' is unchecked,
instead of always returning a QgsProcessingFeatureSourceDefinition
2018-07-25 08:20:07 +10:00
Nyall Dawson
f43adf7a8b Fix test 2018-07-03 09:43:40 +10:00
Nyall Dawson
c68262da7f [processing] Correctly set default value for matrix parameters
Fixes #18871
2018-05-02 04:55:41 +10:00
Nyall Dawson
d87f75aa98 [processing] Unit tests for distance param widget wrapper 2018-04-20 22:44:28 +10:00
Nyall Dawson
6a2625664e [processing] Add dedicated "distance" parameter
This is a subclass of QgsProcessingParameterNumber, but specifically
for numeric parameters which represent distances. It is linked
to a parent parameter, from which the distance unit will
be determined, and is shown using a dedicated distance widget
within the processing parameters panel. This widget shows
the distance unit.

This avoids the confusion when running algorithms which
use distances where the unit depends on a layer or CRS parameter -
e.g. the distance parameter in the buffer algorithm gives
the distance in layer units... so now we can show those units
directly within the dialog. Hopefully this leads to less
user confusion and accidental "1000 degree buffers"!

Additionally - if the unit is in degrees, a small warning
icon is shown next to the parameter. The tooltip for this
icon advises users to reproject data into a suitable
projected local coordinate system.

Initially implemented for the native buffer and single
sided buffer algorithm only - but more will be added.

Fixes #16290
2018-04-20 18:27:00 +10:00
Nyall Dawson
f6e63d7f4c Fixes and cleanups to algorithm dialogs 2017-12-01 18:15:40 +11:00
Nyall Dawson
54f8825350 Fix processing tests 2017-10-16 20:10:37 +11:00
Nyall Dawson
367aba7059 Rename some processing widget wrappers to better match corresponding c++ classes 2017-08-23 00:16:42 +10:00
Nyall Dawson
c119c286eb Add basic unit tests for constructing processing widget wrappers 2017-08-23 00:13:15 +10:00
Nyall Dawson
bf7abdea76 Followup 69a25d 2017-08-05 06:53:19 +10:00
Nyall Dawson
69a25d0f43 Add initial test suite for processing algorithm dialog 2017-08-05 06:48:23 +10:00