5979 Commits

Author SHA1 Message Date
Nyall Dawson
e0cf578096 [processing] Add some missing sources to expression contexts 2018-02-15 09:14:01 +11:00
Nyall Dawson
8154a85f29 Fix Python exception in Random Points in Polygon alg
Fixes #18103
2018-02-15 09:14:01 +11:00
Alexander Bruy
b664f12ed6
Merge pull request #6340 from nyalldawson/batch_layer_name
[processing] In batch dialog, use layer names for input layers
2018-02-14 11:06:36 +02: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
nirvn
2d24bbf819 [needs-docs][processing] update raster calculator help to reflect updated logic 2018-02-14 07:43:05 +07:00
Salvatore Larosa
abeef2573c macOS: fix shortcut even for processing tool button 2018-02-13 16:51:04 +01:00
Nyall Dawson
ea40f1e82a More capitalization homogenization 2018-02-13 19:49:15 +11:00
Nyall Dawson
fa56aa5542 [dbmanager] Fix python error when scrolling postgis results
Fixes #17835
2018-02-13 19:49:15 +11:00
Nyall Dawson
ad849615a3 Fix python error when trying to export db manager table 2018-02-13 19:49:15 +11:00
Nyall Dawson
6b4e734d95 [dbmanager] Fix inconsistent capitalization, HIG violations,
and unprofessional strings
2018-02-13 19:49:15 +11:00
Nyall Dawson
c08e4c53a9 Fix invalid (deprecated) escape strings in db manager 2018-02-13 19:49:15 +11: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
1994c44644 [processing] harmonize results viewer action behavior 2018-02-13 10:40:17 +07: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
Alexander Bruy
178509347a [processing] add enums support for fields and feature source parameters
(follow up 068d74d5)
2018-02-11 14:05:09 +02: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
54a99c27a3 [processing] Add multi layer outputs to Package Layers and Vector Split algorithms 2018-02-11 11:00:33 +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
Alexander Bruy
603d2e6364
Merge pull request #6293 from alexbruy/processing-enums
[processing] allow enums values to be used in description files
2018-02-09 09:08:05 +02:00
Alexander Bruy
90cc17b934
Merge pull request #6298 from nyalldawson/fix_17231
[processing] Allow providers to return a different helpId() vs their unique id()
2018-02-09 09:07:37 +02:00
nirvn
bcb68dda54 [processing] fix batch input selection panel for multiple layers parameter 2018-02-09 14:05:26 +07:00
nirvn
9562b9dad2 [processing] only pass needed raster entries in QgsRasterCalculator constructor 2018-02-09 14:05:26 +07:00
nirvn
e27847d383 [processing] make output crs optional in the raster calculator 2018-02-09 14:05:26 +07:00
nirvn
c4874b3161 [processing] use feedback object in raster calculator 2018-02-09 14:05:26 +07:00
nirvn
2ed225d5f4 [processing] ressurect raster calculator and add CRS parameter 2018-02-09 14:05:26 +07: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
Alexander Bruy
068d74d51a [processing] allow enums values to be used in description files 2018-02-08 17:22:20 +02:00
Alexander Bruy
fcb50a6857 Revert "[processing] throw error if no layers selected in raster calculator"
This reverts commit c09c3018035eb7a4f47acbde7f3dae405ba444db.
2018-02-08 13:25:20 +02:00
Alexander Bruy
c12884cc6b [processing] remove obsolete script tests 2018-02-06 19:25:48 +02: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
567ebb9dd0 [processing] fixes after rebasing 2018-02-05 08:53:52 +02:00
Alexander Bruy
15a185dab0 [processing] turn keep n biggest parts script into normal algorithm 2018-02-05 08:50:44 +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
fa5ab81a2a [processing] scripts also can be feature-based algorithms 2018-02-05 08:50:37 +02:00
Alexander Bruy
cd7bb16ad5 [processing] class name is not needed anymore to load scripts 2018-02-05 08:50:37 +02:00
Alexander Bruy
5ad3af592f [processing] remove tests for old scripts 2018-02-05 08:50:37 +02:00
Alexander Bruy
f5f0399171 [processing] use custom editor class, as QgsCodeEditor is not available
on some platforms
2018-02-05 08:50:37 +02:00