952 Commits

Author SHA1 Message Date
Nyall Dawson
81d53644eb [processing] Fix restoring parameter values from batch panel load button
Fixes #18236
2018-02-27 11:58:50 +11:00
Nyall Dawson
6e44a27764 [processing] Fix exception when parameters are missing in batch dialog
Refs #18236
2018-02-27 11:58:50 +11:00
Alexander Bruy
673421b00d
Merge pull request #6423 from nyalldawson/proc_auto_select_alg
[processing] Some toolbox ux tweaks
2018-02-23 08:38:22 +02:00
Nyall Dawson
75a9150a41 [processing] Fix config exception with INT/FLOAT settings
Fixes #18179
2018-02-23 10:43:30 +10:00
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
nirvn
6573eb30e7 [processing] small fix in the MultipleLayerWidgetWrapper wrapper 2018-02-21 12:00:32 +07:00
Nyall Dawson
fdebddd13a [processing] Fix raster layers shown as inputs for certain vector algs
Fixes #18148, #18149
2018-02-20 10:03:27 +11:00
Juergen E. Fischer
2c53630747 add missing copyright headers 2018-02-18 20:53:40 +01:00
Nyall Dawson
a6a36acc14
Merge pull request #6316 from nyalldawson/locator_thread
Make QgsLocator more thread safe
2018-02-16 12:36:09 +11:00
Juergen E. Fischer
6dfedc38e9 translation string fixes and cleanups 2018-02-15 22:31:15 +01:00
nirvn
4aef3b719f [processing] fix python error with OSM vector layers 2018-02-15 15:56:53 +07:00
Nyall Dawson
46dc2f6e5b [processing] Avoid losing static, user-entered parameter values
in model child algorithms

Prior to this change if you edited an algorithm in a model and
tried to enter a preset string for certain parameter types, this
string would get silently discarded on closing the dialog. E.g.
with a dissolve algorithm it was not possible to have a fixed
field name within the model to dissolve by.

This was caused by WidgetWrapper.comboValue  returning the customData
for these manually entered values in the parameters combo box,
yet manually entered values never have custom data.

To work around this we only return the custom data if its
set for the selected item - otherwise we return the text unchanged.
In order to handle the "[not set]" options, a new static custom
data value of WidgetWrapper.NOT_SET_OPTION is added to that
comboValue can detect this and return the appropriate None value.
2018-02-15 17:45:19 +11:00
Nyall Dawson
8ceb6fc007 [processing] In batch dialog, use layer names for input layers
if they are unique in the current project

Instead of always using the layer id, which is generally
gibberish and meaningless for users, instead prefer to use
the layer name as an input in the batch processing dialog. This
is done only if the name is unique within the current project's
loaded layers.

This change makes the dialog more user-friendly, but more importantly
it means that autofilling output values based on an input layer
parameter generates more meaningful automatic output file names.
2018-02-14 16:46:26 +10:00
Nyall Dawson
66b9b435b6 [processing] Fix destination files are silently ignored when relaunching
algorithms from the history panel
2018-02-13 14:24:48 +10:00
nirvn
4ada4989e5 [processing] automatically open results viewer panel when items added 2018-02-12 18:09:38 +07:00
nirvn
207a94738d [processing] offer hyperlink to file path in the results viewer
because users don't always get that there is a dbl-click action
against the tree view items.
2018-02-12 18:09:38 +07:00
Nyall Dawson
7609ab7c9d Allow certain locator filters to operate on the main thread
Some filters are fast enough to return results that it's overkill
to run them in a background thread - add a flag to these filters
to allow them to run (blocking) in the main thread instead.
2018-02-12 20:28:32 +10:00
Nyall Dawson
d5e649292d Fix error when running gdal algorithms through locator 2018-02-12 20:28:32 +10:00
Nyall Dawson
981afb3da1 Make QgsLocator more thread safe
- add a clone() method to filters, and always search using the
clone instead of the original filter
- add a prepare() method to filters, which is always run in the
main thread and can be used to prepare the filter for safe
background execution (e.g. creating feature iterators in advance)
- don't use QtConcurrent to perform searches in background threads,
since it is not safe to use with QObjects
- instead manually create threads and ensure that cloned objects
are always moved to the thread that they will run in, to ensure
that they correctly have thread affinity with the thread in which
they are executed
2018-02-12 20:26:26 +10:00
nirvn
e5d7733bfc [processing] harmonize order of result panel (latest first) and add timestamp 2018-02-12 13:51:31 +07:00
Nyall Dawson
414c3a4bfe Fix unavailable layer inputs for multi-layer inputs set to any map layer type 2018-02-11 11:00:49 +10:00
Nyall Dawson
4bcc9df5b4 [processing] Add explicit output type for multiple layers
This was a missing capability in the processing API - while algorithms
could declare multiple layer input parameters, there was no corresponding
multi-layer output. This meant that algorithms (such as Package Layers,
Vector Split) which create a set of layers which cannot be determined
in advance had no way to pass these generated layers on for further model
processing steps.

It's also useful for algorithms which operate on a specified folder,
processing all layers found there, and allowing these generated
outputs to be utilised in other model steps (e.g. packaging
all of them, merging them, etc)
2018-02-11 10:57:44 +10:00
Juergen E. Fischer
9302613f28 fix #18066 2018-02-09 09:38:04 +01:00
nirvn
bcb68dda54 [processing] fix batch input selection panel for multiple layers parameter 2018-02-09 14:05:26 +07:00
Alexander Bruy
23a5dd3197 [processing] fix file permissions 2018-02-06 19:25:48 +02:00
Denis Rouzaud
3205c96af6
Merge pull request #6275 from 3nids/messagelevel
unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
2018-02-06 05:28:17 -09: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
Denis Rouzaud
9389be83c6 [processing] search also show children in config 2018-02-06 08:36:46 -04:00
Denis Rouzaud
3b17d5a784 processing search: also search in group items and fix return value 2018-02-05 09:31:57 -04:00
Nyall Dawson
c8d1d2d588 Fix hang in options search widget 2018-02-05 08:51:47 -04:00
Denis Rouzaud
8d55cadeb7 Allow adding custom highlight widget to custom pages in option 2018-02-05 08:51:47 -04:00
Alexander Bruy
aee3b44909 [processing] remove not needed trAction method 2018-02-05 08:49:41 +02:00
Alexander Bruy
862b1139fa [processing] move script provider stuff into provider directory 2018-02-05 08:49:29 +02:00
Alexander Bruy
87e55ba3c7 [processing] remove Get scripts and models functionality
Users should use Resource Sharing plugin instead
2018-02-04 11:11:47 +02:00
Salvatore Larosa
77163ba0ec [processing] fix toggle advanced mode button in batch panel (#6193) 2018-01-29 08:12:30 +01:00
Nyall Dawson
a05d941e4e [processing] Default to allowing background execution of algorithms
Since the underlying issues with the Python bindings are now fixed,
in most cases we can safely default to allowing an algorithm to
run in a background thread!!

So now we make this the default, and require individual algorithms
which are NOT thread safe to declare this. This includes algorithms
which directly manipulate the current project or layers (such as
setting layer styles), alter the selections in layers, or which
rely on 3rd party libraries (for now, SAGA and GRASS algorithms
are marked as not thread safe... TODO - someone more familiar with
these libraries can investigate and remove the flag if appropriate).

Also models are marked as non-thread safe. TODO: only flag an
individual model as thread-unsafe if any of its child algorithms
report this flag.
2018-01-29 17:37:05 +11:00
Salvatore Larosa
ebb725ec04 [processing] create widget correctly from wrapper when in batch mode 2018-01-28 22:11:51 +01:00
Salvatore Larosa
550c74e106 [processing] fix wrong getter 2018-01-28 21:31:18 +01:00
nirvn
6d5dce22f6 [processing] properly size toolbar button for provider actions 2018-01-26 13:11:24 +07:00
Salvatore Larosa
f4f89bbcbe [processing] resurrects matrix parameter 2018-01-25 21:54:22 +01:00
Mathieu Pellerin
34c2d32b3e
[processing] add actions when provider is registered / activated 2018-01-25 16:16:44 +07:00
Nyall Dawson
bf19eb6f35 [processing] Non-filed based outputs (e.g. postgis, geopackage)
options should be available for certain model outputs and script
algorithm outputs

We do this by swapping the test for non-file based output support
from checking only the algorithm's provider to instead checking
on a parameter-by-parameter basis.

This is done in order to support models. For models, depending
on what child algorithm a model output is based off, an individual
model may or may not have support for non-file based outputs. E.g
a model may generate outputs from a native qgis alg (supporting
these outputs) AND an output from a GDAL alg (with no support
for these outputs). In this case we need to enable or disable
the ui controls for non-file based outputs on an individual
output basis.

For scripts (for now) we blindly just say all outputs support
non-file based formats. This is going to be the case most of
the time, since scripts will usually be written using PyQGIS
API. For the exceptions (e.g. scripts which call other algs
like GDAL algs) we probably should add some way for the script
to indicate whether an individual output supports this, but
for now we just say they all do.

Fixes #17949
2018-01-25 15:47:42 +11:00
nirvn
746701bf33 [processing] add default extension to empty filter when available 2018-01-24 18:18:32 +07:00
Nyall Dawson
2013725793 Fix gui handling of NULL/None default values in processing script algorithms 2018-01-24 17:54:47 +11: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
54f9846eda Fix executing processing scripts through script editor 2018-01-24 15:53:33 +11: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