442 Commits

Author SHA1 Message Date
Alexander Bruy
1ba34dcbea [processing] add matrix and enum parameters to wrappers and handle them
in the modeler dialogs
2018-05-11 15:49:06 +10:00
Alexander Bruy
038da1131d [processing] modeler GUI for matrix parameter 2018-05-11 15:49:06 +10:00
Alexander Bruy
ffa4b04e29 [processing] add modeler GUI for enum parameter 2018-05-11 15:49:06 +10:00
nirvn
08db66fb03 [processing] draw vector icons when available in modeler 2018-04-30 13:04:20 +07: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
Alexander Bruy
90c65405fd [processing] use parameter description instead of name when retrieving
parameter from the registry
2018-04-17 11:09:30 +03:00
Matthias Kuhn
d7b75d1e99 Immediately apply configuration after change 2018-04-09 13:10:49 +02:00
Matthias Kuhn
dbced352b8 Fix use before assign 2018-04-09 13:10:48 +02:00
Matthias Kuhn
eb39d2379c Move processing algorithm configuration code to gui lib 2018-04-09 13:10:47 +02:00
Matthias Kuhn
3be4324d60 Move processing algorithm configuration widget to gui library
This way we can also use all the fancy widgets like a QgsExpressionLineEdit.
2018-04-09 13:10:47 +02:00
Matthias Kuhn
e6ef7639cb [processing] Allow algorithms to provide additional configuration widgets 2018-04-09 13:10:46 +02:00
Matthias Kuhn
4a14a36034 Remove leftover method getCustomModelerParametersDialog 2018-04-09 09:15:15 +02:00
Matthias Kuhn
4e4c189820 Remove unrequired cast 2018-04-05 22:50:13 +02:00
Matthias Kuhn
6eabb45043 Fix type hints in ModelerParametersDialog attributes 2018-04-05 22:47:23 +02:00
Matthias Kuhn
7c191a46c2 Make modeler text translatable 2018-04-05 22:47:12 +02:00
Matthias Kuhn
0aa8241da4 Avoid catch all exception 2018-04-05 22:46:59 +02:00
Rashad Kanavath
3408e02c46 [processing] create and manage label in WidgetWrapper
ModelerParametersDialog and ParametersPanel have to keep list of
wrappers only. widget and label( if needed) are created through
WidgetWrapper.createLabel()
2018-04-03 06:09:44 +10:00
Alexander Bruy
092557b16a [processing] correctly handle inactive providers in the modeler (fix #18461) 2018-03-19 11:55:10 +02:00
Juergen E. Fischer
ad4d0a17d5 processing: make error messages moved to message bar translatable again (followup 6e2288dcc) 2018-03-09 17:21:12 +01:00
Matthias Kuhn
c3a843619f Use flags for parameter type extra info 2018-03-07 09:00:33 +11:00
Matthias Kuhn
eeb6f44df7 Some addition error case info 2018-03-07 09:00:33 +11:00
Matthias Kuhn
e67939b183 Fix editing models with custom params 2018-03-07 09:00:33 +11:00
Matthias Kuhn
6bad21f78a Avoid freeze by infinite recursion 2018-03-07 09:00:33 +11:00
Matthias Kuhn
9f76c4171c Fix parameter name rendering problem 2018-03-07 09:00:33 +11:00
Matthias Kuhn
a1fc70f88d Improved error reporting for unknown parameters 2018-03-07 09:00:33 +11:00
Matthias Kuhn
16e2aad293 Use translated parameter names for sorting 2018-03-07 09:00:33 +11:00
Matthias Kuhn
031aa9c0e4 Better error reporting for model exception 2018-03-07 09:00:33 +11:00
Matthias Kuhn
a337d2050b Make use of new processing parameter infrastructure 2018-03-07 09:00:33 +11:00
Matthias Kuhn
0c730596fa Hide unsupported parameters in modeller 2018-03-01 10:42:51 -05:00
Matthias Kuhn
9aac4e38df Use translated text in modeller 2018-03-01 09:47:35 -05:00
Matthias Kuhn
eba96fb9cc Add a processing parameter registry
to manage parameter metadata in a single place.
2018-03-01 08:12:41 -05:00
Matthias Kuhn
8b784400f7 Avoid catchall exception 2018-03-01 08:12:41 -05:00
Nyall Dawson
bfa3cab0bb [processing] Fix model docks are not removed when closing modeler
Actually caused by the modeler dialog never being deleted correctly.

Fixes #18213
2018-02-26 20:52:42 +11:00
Alexander Bruy
a54192cb72 [processing][help] use new anchor style also for modeler 2018-02-25 12:23:57 +02:00
Juergen E. Fischer
9a3bfa01c2 fix translation strings 2018-02-22 00:37:48 +01:00
Nyall Dawson
0481666b77
Merge pull request #6408 from arnaud-morvan/processing_reload_fix
Processing reload fixes
2018-02-22 10:03:51 +11:00
arnaud.morvan@camptocamp.com
d3a4a34515 [processing] Fix slot prototype in ModelerAlgorithmProvider. Fix #18162 2018-02-21 21:42:21 +00:00
Nyall Dawson
835cca7cae [processing] More string HIG fixes 2018-02-22 06:44:17 +11:00
Nyall Dawson
bd99f6979b More dialog title HIG fixes 2018-02-22 06:44:17 +11:00
Nyall Dawson
146d408190 [processing] Add direct action to open an existing model in editor 2018-02-22 06:44:17 +11:00
Nyall Dawson
277e06ec28 [processing] Fix some message box titles 2018-02-22 06:44:17 +11:00
Nyall Dawson
206f22b9c7 [processing] Fix algorithm help link in modeler
Fixes #18147
2018-02-20 10:03:27 +11:00
Juergen E. Fischer
6dfedc38e9 translation string fixes and cleanups 2018-02-15 22:31:15 +01:00
Nyall Dawson
2d1e9188f1 [processing] Allow providers to return a different helpId() vs
their unique id()

This is used when generating the QgsHelp url for algorithms
attached to the providers.

Implement helpId overrides for the native and 3d providers so
that they return 'qgis' helpIds, meaning that all QGIS processing
algorithm documentation can be kept within the same url path
regardless of which QGIS provider library it sits within.

This also allows us to freely move algorithms from the Python
'qgis' provider to c++ 'native' provider in future releases
without breaking the help URLs.

Fixes #17231
2018-02-09 11:26:03 +10:00
Denis Rouzaud
3dc3d9d1b2 unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
make enum items lower case
remove unused QgsMessageLog::None and All
2018-02-06 08:56:40 -04:00
Alexander Bruy
567ebb9dd0 [processing] fixes after rebasing 2018-02-05 08:53:52 +02:00
Alexander Bruy
54167bcaa6 fix indentation 2018-02-05 08:50:44 +02:00
Alexander Bruy
4f2a4644db [processing] remove obsolete code and disable exporting models as script
until we update it so support new scripts format
2018-02-05 08:50:44 +02:00
Alexander Bruy
53ff800ff8 [processing] temporarily disable fetch actions for scripts and models 2018-02-05 08:50:37 +02:00
Alexander Bruy
aee3b44909 [processing] remove not needed trAction method 2018-02-05 08:49:41 +02:00