36579 Commits

Author SHA1 Message Date
Matthias Kuhn
cce07020ff Fix attribute table shows columns twice
If they have been defined with different capitalization
2017-01-12 15:02:16 +01:00
Alexander Bruy
b6632b0731 [processing] workaround for fixing broken build 2017-01-12 14:49:26 +02:00
Alexander Bruy
75a7637838 [processing] fix typo in method name 2017-01-12 12:54:13 +02:00
Alexander Bruy
03eaad5bfd [processing] fix handling of the "selection" type settings 2017-01-12 12:52:04 +02:00
rldhont
b823874f8e [BUGFIX][Server] Add short names in restricted layer list
The restricted layer list contains layer names and layer ids if layer ids are used as service layer name.
This code adds layer  short name to the restricted layer list if layer ids are not used as service layer name.
2017-01-12 11:35:47 +01:00
Nyall Dawson
a13ef7bdc1 Use feature from expression context in expression builder preview
instead of always getting first feature from the layer

This means that e.g. expression builder previews in composer atlas
will use the current atlas preview feature

Also remove an unnecessary restriction that blocks the preview if
a layer has no features
2017-01-12 16:09:40 +10:00
Nyall Dawson
55f6b11225 [composer] Fix expressions inserted into HTML item source are lost on refresh 2017-01-12 15:45:18 +10:00
Nyall Dawson
b7706b358f Rename some static variables for consistency
Ensure non-const statics have "s" prefix and const statics
are in all caps
2017-01-12 15:17:47 +10:00
Nyall Dawson
3705ff18ce Nicer creation of static QMaps
c++11/Qt5 allow us to clean up the creation and initialization
of static QMaps and avoid the need for initialization functions
2017-01-12 15:17:47 +10:00
Tudor Bărăscu
dbefbfeff0 show field alias when presenting constraint msg
Before, when a field didn't passed the defined constraints
it showed a message in the form of "field name: Constraint defined message".

Now, if if a field alias is defined, the message is in the form of
"field alias: Constraint defined message"

See #15455
2017-01-11 22:42:09 +01:00
Alexander Bruy
6214d4d446 [processing] fix wrong parameter definition (fix #16063) 2017-01-11 19:23:08 +02:00
Alexander Bruy
80d0d05b18 [FEATURE][processing] remove TauDEM provider from core Processing
TauDEM is quite specific set of tools and it requires installation of
some additional tools. So we decide to turn it into separate provider,
reducing core codebase size and maintenance efforts.

Tagged as feature to not forget mention in changelog and documentation
2017-01-11 15:15:37 +02:00
Denis Rouzaud
4467487e1c respect CamelCase for enums and their values 2017-01-11 14:10:11 +01:00
Alexander Bruy
6be4505493 [processing] update OTB's white- and blacklist. Drop obsolete 3.x
versions and add latest 5.8.0
2017-01-11 13:43:17 +02:00
Alexander Bruy
371fe1dd48 [processing] add new MultiImageSamplingRate algorithm from OTB 5.8.0 2017-01-11 13:42:29 +02:00
Denis Rouzaud
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +01:00
rldhont
bc4c470294 Merge pull request #3960 from rldhont/server-wms-transparent-bgcolor
[BUGFIX][Server] Re-enable Transparent and Bgcolor parameter for GetMap
2017-01-11 10:58:16 +01:00
Nyall Dawson
e656c63ab7 Remove duplicate QgsFeature::setFeatureId method
Leave just QgsFeature::setId and document api break
2017-01-11 10:05:31 +01:00
rldhont
bf73e2c240 [BUGFIX][Server] Re-enable Transparent and Bgcolor parameter for GetMap
Fixed #15990 wms png transparency not honoured

And add tests for transparent and bgcolor in GetMap and GetLegendGraphic
2017-01-11 09:48:10 +01:00
Nyall Dawson
3e2b4fc421 Merge pull request #3968 from nyalldawson/item_vars
[FEATURE] item_variables expression function inside compositions
2017-01-11 13:15:22 +10:00
Nyall Dawson
db1009cbfa [FEATURE] New expression variables for map settings
- map_crs, map_crs_definition: retrieves crs details for map
- map_units: retrieves units for map (eg 'meters','degrees')
2017-01-11 12:26:32 +10:00
Nyall Dawson
f2032ea268 [FEATURE] item_variables expression function inside compositions
This adds a new item_variables expression function when expressions
are used inside a composition context.

The function takes a single argument, the id for an item inside
the composition, and returns a map of variable name to value
for that item.

This allows you to do things like insert text in a label fetching
properties of another item in the composition, eg

Insert scale of map into a label:

map_get( item_variables( 'map'),'map_scale')

Insert x coordinate of map center into a label:

x(map_get( item_variables( 'map'),'map_extent_center'))
2017-01-11 12:26:32 +10:00
Nyall Dawson
d25fcec03d Add method to retrieve variables from a QgsExpressionContext as a QVariantMap 2017-01-11 12:25:37 +10:00
Nyall Dawson
a7806d1a39 Merge pull request #3959 from nyalldawson/processing_port_feedback
[processing] Port feedback object to c++
2017-01-11 12:00:38 +10:00
Nyall Dawson
86e1138a04 [processing] Correctly handle when no feedback object is passed 2017-01-11 11:11:11 +10:00
Nyall Dawson
ede452be85 [processing] Port feedback object to c++
Algorithms are now passed a QgsProcessingFeedback object
instead of the loosely defined progress parameter.
2017-01-11 11:11:10 +10:00
Nyall Dawson
26a8a54c00 Merge pull request #3966 from nyalldawson/proc_prov_c
[processing] Port some stuff to c++
2017-01-11 11:10:11 +10:00
Nyall Dawson
04eb293362 [processing] Move some SVG icons out of plugin to themes
...and swap to using QgsApplication methods for retrieving cached icons,
implement svgIconPath for providers with SVG icons
2017-01-11 10:55:16 +10:00
Nyall Dawson
bf484dafa8 [processing] Allow providers to return path to SVG icon 2017-01-11 10:55:16 +10:00
Nyall Dawson
b71019dfda Add some unit tests for QgsProcessingRegistry 2017-01-11 10:55:16 +10:00
Nyall Dawson
dca697b427 [processing] New c++ QgsProcessingRegistry class
Intended as a registry for the various processing components,
including providers, algorithms and various parameters and outputs.

Currently handles only registration of providers, as a step toward
removing processing's algList (this requires first porting
the algorithm class to c++)

A QgsProcessingRegistry instance is attached to QgsApplication,
and is retrieved by QgsApplication::processingRegistry()
2017-01-11 10:55:15 +10:00
Nyall Dawson
bb24dfe245 [processing] c++ base class for providers
Nothing particularly exciting here yet, but this commit
moves the definition of the provider base class to a c++
QgsProcessingProvider abstract base class.

As part of this some existing python methods were renamed
to make their use clearer and to fit with the QGIS c++
api conventions:

- getName was renamed to id
- getDescription was renamed to name
- getIcon was renamed to icon

These API breaks are documented
2017-01-11 10:55:15 +10:00
rldhont
243f01cbe9 Merge pull request #3974 from dmarteau/cleanup_qgsrequesthandler
Remove code moved to wms service
2017-01-10 20:22:10 +01:00
Denis Rouzaud
37ebcdd1cd [spellcheck] allow inwords checks and line skipping
spell check will be done automatically in words by default (when some conditions are fulfilled)
possibility to avoid in words checking by adding :* at the end in spelling.dat

one can add #spellok at the end of a line of code to skip spell check on this line
2017-01-10 20:18:37 +01:00
Alexander Bruy
1ad965b4fa [processing] add test for Distance matrix algorithm to prevent
TableWriter class breakage in future
2017-01-10 20:24:05 +02:00
Alexander Bruy
c4cc954141 [processing] restore functionality of the TableWriter class (fix #16053) 2017-01-10 20:23:05 +02:00
Alexander Bruy
e01c476e40 fix leak when using global expression context scope 2017-01-10 19:41:36 +02:00
Matthias Kuhn
48bcca6033 Merge pull request #3911 from alexbruy/generic-help
Generic help for QGIS
2017-01-10 17:32:19 +01:00
Alexander Bruy
bcb69c5f34 fix regex to correctly handle strings like $$$qgis_version 2017-01-10 17:55:53 +02:00
Alexander Bruy
c5b3b1ac0d support escape syntax. $$qgis_version will be kept and $qgis_version
will be replaced with value
2017-01-10 17:55:52 +02:00
Alexander Bruy
f77e677734 add missed SIP bindings 2017-01-10 17:55:52 +02:00
Alexander Bruy
37df7290b4 remove debug statements 2017-01-10 17:55:52 +02:00
Alexander Bruy
8ff7a3880f add 'qgis_short_version' expression variable to retrieve QGIS version
in the major.minor notation (can be useful for help system and probably
in other places)
2017-01-10 17:55:52 +02:00
Alexander Bruy
a0743438e5 allow using expression variables in help path. Currently only from
global scope. Syntax should be '$variable_name', e.g. $qgis_version.
When accessing help those variables will be replaced with corresponding
values
2017-01-10 17:55:52 +02:00
Alexander Bruy
c2bd4b940b [FEATURE] new global expression variable $qgis_locale
Returns current locale used by QGIS. By default this is current
system locale. If user enabled locale override in QGIS settings
overriden locale will be returned.
2017-01-10 17:55:51 +02:00
Alexander Bruy
68e09d4c63 add support for proxies 2017-01-10 17:55:51 +02:00
Alexander Bruy
b74aefd3c9 move QgsHelp to gui 2017-01-10 17:55:51 +02:00
Alexander Bruy
91a96d19fa more robust check for network help location 2017-01-10 17:55:51 +02:00
Alexander Bruy
212406cd65 make all QgsHelp methods static 2017-01-10 17:55:51 +02:00
Alexander Bruy
1882aea159 improve QSettings handling 2017-01-10 17:55:50 +02:00