41914 Commits

Author SHA1 Message Date
Nyall Dawson
506f6d40b7 [processing] Fix picking point from map always triggers a release
event for previous map tool
2017-09-24 12:09:38 +10:00
Nyall Dawson
6efcc2fe86 Transparently reproject source points in algs 2017-09-24 12:09:38 +10:00
Nyall Dawson
e1eef7ed19 Allow use of QgsPointXY/QgsReferencedPointXY for point parameter values 2017-09-24 12:09:38 +10:00
Nyall Dawson
8902d5f48f Merge pull request #5244 from nyalldawson/proc_misc
[processing] Misc test related fixes
2017-09-24 10:37:06 +10:00
Nyall Dawson
db04d65593 Use processing config help key 2017-09-24 08:30:28 +10:00
Nyall Dawson
8dffa33a27 Allow QgsOptionsPageWidget to set a specific help key to view
when clicking help in the options dialog
2017-09-24 08:29:39 +10:00
Harrissou Sant-anna
34b9ae293d Set the most accurate User Manual page to Options tabs
Because some of the tabs in Options dialog have a dedicated chapter where they are fully described, better use those links instead of the global one.
2017-09-24 08:00:43 +10:00
Nyall Dawson
fe98fe1131 Merge pull request #5236 from nyalldawson/field_default
[processing] Allow setting default values for field parameters in models
2017-09-24 07:58:39 +10:00
Alexander Bruy
afac940d37 [processing] add band parameter support in test generator 2017-09-24 07:50:05 +10:00
Alexander Bruy
f60d8885c9 [processing] more fixes for tests creation 2017-09-24 07:49:55 +10:00
Nyall Dawson
92e481e7c3 Fix creation of SAGA tests 2017-09-24 07:48:46 +10:00
Nyall Dawson
acbba3a387 Fix excepthook handling in standalone scripts 2017-09-24 07:47:45 +10:00
Nyall Dawson
34a8c8aab8 Fix exception when running alg with no parameters from toolbox 2017-09-24 07:46:35 +10:00
Juergen E. Fischer
9e36fd9c6d remove app startup tests depending on removed options configpath and --optionspath 2017-09-23 19:38:42 +02:00
Juergen E. Fischer
36e24f6c10 fix metasearch settings (fixes #16532) 2017-09-23 14:50:32 +02:00
Juergen E. Fischer
fdbc123891 INSTALL: add ubuntu artful (implements #17177) 2017-09-23 14:40:52 +02:00
Nyall Dawson
53aba6109c Merge pull request #5241 from nyalldawson/clean_code
[processing] Code cleanups
2017-09-23 17:21:05 +10:00
Nyall Dawson
e3f128b55f Expand test coverage of compound curves 2017-09-23 16:16:13 +10:00
Etienne Trimaille
ba81068f49 [FEATURE] [needs-docs] Metadata editor
Adds a new metadata tab to layer properties, representing the new metadata model from QEP #91
2017-09-23 14:08:32 +10:00
Muhammad Yarjuna Rohmat
e2678936df [FEATURE][geonode] integration - copy style action
Allows copying styles directly from geonode layers for pasting into project layers.
2017-09-23 13:36:57 +10:00
Nyall Dawson
5a802b595d Add missing test files 2017-09-23 10:36:33 +10:00
Nyall Dawson
ae42bf4b6e Update expected test results (rename field) 2017-09-23 09:27:26 +10:00
Nyall Dawson
0dd434c183 [processing] Port mean coordinates to c++
And remove final use of inefficient vector.extractPoints function
2017-09-23 09:25:18 +10:00
Nyall Dawson
10d6ef06e8 Replace more duplicate code with QgsProcessingUtils.combineFields 2017-09-23 08:41:54 +10:00
Nyall Dawson
a191c77bcb Remove duplicate testForUniqueness method (replaced with QgsProcessingUtils.combineFields) 2017-09-23 08:37:35 +10:00
Ismail Sunni
54e5bfda5c Fix 'Qsci/qsciapis.h' file not found 2017-09-22 21:41:35 +02:00
Juergen E. Fischer
644bdd4ed8 fix typo 2017-09-22 20:54:21 +02:00
Matthias Kuhn
6dfe44f72b Merge pull request #5179 from vmora/listen_notify
[FEATURE] layer refresh and trigger actions on provider notification
2017-09-22 19:32:46 +02:00
Juergen E. Fischer
782ed47d00 translation string improvements 2017-09-22 15:00:31 +02:00
Vincent Mora
02e3916bf5 [FEATURE] layer refresh and trigger actions on provider notification
[needs-docs]

In vector layer properties (only usefull for postgres datasources)

**in the rendering tab**

A "Refresh layer on notification" checkbox has been added to refresh layer
on provider notification.

For a postgres datasource, if a `NOTIFY qgis;` command is issued by one of the database clients,
a refresh of the layer will occur.

If the "Only if message is" checkbox is checked, the notification will trigger the refresh only
if the message contend is the one specified, e.g. if the user enters
"refresh" in the box right next to the "Only if message is" checkbox,
then a `NOTIFY qgis, 'refresh';` command in the datatabase will trigger
a layer refresh, but `NOTIFY qgis;` or `NOTIFY qgis, 'something else';`
won't.

**in the actions tab**

A column "On notification" has been added, the action editor widget
a has text field "Execute if notification message matches" to
specify a filter for notification from the provider. The filter is a
Perl-type regex.

Note that, as opposed to the "layer refresh" that

Exemple:
  - QGIS side "Execute if notification message matches" `^trigger my action`
  - Postgres side: `NOTIFY qgis, 'trigger my action'` will trigger the action
  - Postgres side: `NOTIFY qgis, 'trigger my action some additional data'` will trigger the action
  - Postgres side: `NOTIFY qgis, 'do not trigger my action some additional data'` will NOT trigger the action

Please note that if the `^`, which means "starts with",  in `^trigger my action` had been ommited,
the last notification would have triggered the action because the
notification message contains the `trigger my action`

A new qgis variable `notification_message` is available for use in
actions, it holds the contend of the notification message. To continue
with the previous exemple, if the action is of python type with the code:

```python
print('[% @notification_message %]')
```

The three notifictions above will result in two printed lines
```
trigger my action
trigger my action some additional data
```

User Warning:

For postgres providers, if the "Refresh layer on notification" is checked, or if one layer action has
"On notification" specified, a new connection to the database is made to
listen to postgres notifications. This olds even if transaction groups
are enabled at the project level.

Note that once the notification mechanism is started in a QGIS
session, it will not stop, even if there is no more need for it (Refresh
layer on notification" unchecked and no "On notification" in any
action). Consequently the connection listening to notification will
remain open.

IMPLEMENTATION DETAILS:

A notify signal has been added to the abstract QgsVectorDataProvider
along with a setListening function that enables/disble the notification
mechanism.

For the moment only the postgres provider implements the notification.

QgsAction has a notificationMessage member function that holds the regex
to match to trigger action

QgsActionManager becomes a QObject and is doing the filtering and execute actions on
notifications.

The notification notion extends beyond SRGBD servers (postgres and oracle at
least have the notify) and the "watch file" in the delimitedtext
provider could also benefit from this interface.

For the postgres provider a thread is created with a second connection
to the database. This thread is responsible for listening postgres
notifications.

It would be nice to avoid the creation of one listening chanel per
provider in the case transaction groups are enabled.

Please note that when listening starts (a thread and connection is
created in the postgres provider) it cannot be stopped by removing the
connected actions or unchecking the refresh check box. Indeed, since we
don't know who needs the signals, we dont't want to stop the service.

The service will not restart in the next qgis session though.

If this behavior is not deemed appropriate, we could use
```
int QObject::receivers ( const char * signal ) const
```
and have QgsDataProvider::setListening return a bool to tell the caller
if the signal has actually been closed.
2017-09-22 12:51:51 +02:00
Juergen E. Fischer
8b32d8d949 translation string fixes 2017-09-22 11:38:42 +02:00
Juergen E. Fischer
d6d7c6e499 fix build 2017-09-22 10:02:20 +02:00
Nyall Dawson
22eddfd4c0 Merge pull request #5238 from nyalldawson/geometry_coverage
Geometry unit test coverage + fixes
2017-09-22 17:18:39 +10:00
Nyall Dawson
a6b1c3ee9f Merge pull request #5237 from nyalldawson/port_algs
[processing] Port line intersection and split with lines to c++
2017-09-22 17:18:05 +10:00
Nyall Dawson
5d6c178f71 Merge pull request #5227 from nyalldawson/browser_awesome
[browser] Show QPT print templates and Python scripts
2017-09-22 16:45:00 +10:00
Nyall Dawson
db738f65e6 Merge pull request #5234 from nyalldawson/action_lifetime
Fix browser action item lifetime
2017-09-22 16:11:42 +10:00
Nyall Dawson
cbca7c97bc Boost test coverage of geometry classes 2017-09-22 15:41:41 +10:00
Nyall Dawson
57b76920d6 Expand docs 2017-09-22 15:22:01 +10:00
Nyall Dawson
395ed9307b Fix incorrect result for reversing compound curves 2017-09-22 15:20:24 +10:00
Nyall Dawson
21f92a6fb2 Port line intersection and split with lines to c++ 2017-09-22 15:19:32 +10:00
Nyall Dawson
c41dca937c Port processing combineFields to c++ 2017-09-22 15:19:32 +10:00
Nyall Dawson
cf636dcafa Merge pull request #5235 from nyalldawson/model_progress2
[processing] Proper progress reports during model execution
2017-09-22 15:17:51 +10:00
Nyall Dawson
33d2d1119c Update sip 2017-09-22 12:50:47 +10:00
Nyall Dawson
b39459b8ff Matching default multiple fields should also be case-insensitive 2017-09-22 12:02:48 +10:00
Nyall Dawson
b4a798e892 Setting field for QgsFieldComboBox should be case-insensitive 2017-09-22 11:39:17 +10:00
Larry Shaffer
559973739c Merge pull request #5202 from dmarteau/fix_ln_option_OSX
Execute ln command with GNU compatible options in install phase
2017-09-21 19:37:42 -06:00
Nyall Dawson
c5b9fa23cd Formatting 2017-09-22 10:56:32 +10:00
Nyall Dawson
94530a9efc Allow setting default value for field parameters in models 2017-09-22 10:50:46 +10:00
Nyall Dawson
eaee80acfe Better debugging for models by showing child algorithm parameters in the log 2017-09-22 10:32:17 +10:00
Nyall Dawson
6afe25ef0f [processing] Proper progress reports during model execution
Instead of showing the progress reports for each child algorithm
individually, which leads to repeated 0->100% progress for every
step of a model, we proxy the progress reports and account for the
overall progress through a model as well. This means that
the progress accounts for both the progress within the current
model step AND the total number of steps left to execute.
2017-09-22 10:32:17 +10:00