3207 Commits

Author SHA1 Message Date
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
b71019dfda Add some unit tests for QgsProcessingRegistry 2017-01-11 10:55:16 +10: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
David Marteau
dc211f89bd WMS run as a module service ! 2017-01-10 14:34:18 +01:00
David Marteau
64fc56c808 Implement QgsFcgiRequest and QgsFcgiResponse 2017-01-10 14:34:17 +01:00
David Marteau
0150dfb728 Create module test; add more debug messages for travis 2017-01-10 14:34:17 +01:00
David Marteau
689f3b1ab2 Expose QgsServerInterface to service modules
* Instanciate QgsServerInterface even if HAVE_SERVER_PYTHON_PLUGINS is
      not defined
    * Pass QgsServerInterface in module registration methods.
    * Add QgsServer initialisation test

 #Please enter the commit message for your changes. Lines starting
2017-01-10 14:34:16 +01:00
David Marteau
bac1890f9c fix typo, use Q_UNUSED, return null/empty QString() instead literal empty string 2017-01-10 14:34:16 +01:00
David Marteau
705547e617 Removed python loader: added unRegisterService() method 2017-01-10 14:34:16 +01:00
David Marteau
7600919517 Remove Service Entry class and move name/version infos in QgsService 2017-01-10 14:34:15 +01:00
David Marteau
53555581a3 Server refactoring: Fix doc and comments
Fix typo in doc and comments
    Update documentation
    Fix return of implicitely shared objects
    Fix order of parameters in QgsServiceRegistry::registerService
2017-01-10 14:34:15 +01:00
David Marteau
1e0d830529 Server refactoring: implements service modules registry
Implementation for https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74
2017-01-10 14:34:15 +01:00
Nyall Dawson
21ad4ed78b Merge pull request #3940 from nyalldawson/gdal2
Bump minimum GDAL version to 2.0, remove old version #ifdefs
2017-01-10 11:37:17 +10:00
Marco Hugentobler
d3da17910d Adapt numbers in test for QgsLineStringV2::sumUpArea
(forward port from df0f97)
2017-01-10 09:08:33 +10:00
Marco Hugentobler
7107c16ec0 Add unit test that makes sure that the area of a closed compound curve ring is the same as a closed linestring with the same number of vertices
(forward port from be71066)
2017-01-10 09:05:12 +10:00
rldhont
3e80a52995 Revert "Merge pull request #3886 from pblottiere/servermultithread"
This reverts commit 350a2b513446462120946241cf7fb1bb67ca828b, reversing
changes made to 590a981195289be702bc7bf5382ece25a09ae6bb.
2017-01-09 14:05:28 +01:00
rldhont
350a2b5134 Merge pull request #3886 from pblottiere/servermultithread
[server] parallel map rendering
2017-01-09 13:38:04 +01:00
Nyall Dawson
4b8c5bea29 Remove some more macros not needed with GDAL>=2 requirement 2017-01-09 19:39:00 +10:00
Martin Dobias
542c48650e Fix avoid intersections test 2017-01-07 17:22:08 +08:00
Martin Dobias
8c340f7144 Make composition associated with QgsProject (#3957)
... rather than using project singleton within compositions
2017-01-06 17:22:34 +08:00
Martin Dobias
660867cb4e Explicitly pass QgsProject object when dealing with expression contexts
Continued effort to reduce number of uses of QgsProject as singleton...
2017-01-06 11:34:55 +08:00
Nyall Dawson
af5eb6aaab Disable flaky test 2017-01-06 10:54:11 +10:00
Alexander Bruy
12ab928e4b Merge pull request #3918 from alexbruy/processing-providers
Processing providers updates
2017-01-05 11:02:19 +02:00
Matthias Kuhn
8b9857079a Use qgis_grass_lib.h import for GRASS_LIB_EXPORT macro 2017-01-05 00:12:11 +01:00
Matthias Kuhn
38a8ddacd9 Add qgis_app.h with APP_EXPORT macro 2017-01-05 00:12:11 +01:00
Matthias Kuhn
d006784ded Add qgis_analysis.h with ANALYSIS_EXPORT macro 2017-01-05 00:12:11 +01:00
Matthias Kuhn
2306c1136a Add qgis_python.h with PYTHON_EXPORT macro 2017-01-05 00:12:11 +01:00
Matthias Kuhn
4c1f178ac9 Add qgis_gui.h with GUI_EXPORT macro 2017-01-05 00:12:11 +01:00
Matthias Kuhn
0302719cf0 Add qgis_core.h to with CORE_EXPORT macro
This removes complexity from the compiler flags because defines
happen in a file.
2017-01-05 00:12:11 +01:00
Even Rouault
f67cdc3965 Merge pull request #3935 from rouault/group_visibility
[FEATURE] Change of ergonomy of the visibility of layers inside groups
2017-01-04 15:22:48 +01:00
Martin Dobias
6c5956b22b QgsProject: cleanup of read/write method + removal of unused bad layer handler class 2017-01-04 20:29:53 +08:00
Nyall Dawson
0ce30217f1 Implement some QGIS 3 TODOs for diagram API 2017-01-04 18:17:22 +10:00
rldhont
8475fc36f3 Update [QGIS Server] CITE WMS 130 Test project 2017-01-03 14:55:00 +01:00
rldhont
454df31b17 [BUGFIX][Server] WMS compliance: stretched, distort, increase, decrease
The commit d44f1eba2fed18b3fef8d8865d79b3b6d8bc4d69 seems to break some WMS 1.3.0 client and WMS compliancy.
The commit d44f1eba2fed18b3fef8d8865d79b3b6d8bc4d69 has been written to fix an issue with QGIS WMS Client and to render image like other WMS Server.

This commit has been written to fix issue introduce by d44f1eba2fed18b3fef8d8865d79b3b6d8bc4d69.
It is based on MapServer code:
* https://github.com/mapserver/mapserver/blob/master/mapdraw.c#L115
* https://github.com/mapserver/mapserver/blob/master/HISTORY.TXT#L3768

And take account of axis invertion for output CRS.
2017-01-03 14:55:00 +01:00
Nyall Dawson
57917ab118 Compile some string functions 2017-01-03 15:32:57 +10:00
Nyall Dawson
30f498f006 Compile some supported functions for spatialite provider 2017-01-03 15:32:57 +10:00
Nyall Dawson
9615ac42b4 Handle division operator during expression compilation 2017-01-03 15:32:57 +10:00
Nyall Dawson
b0bc763475 Bump minimum GDAL version to 2.0, remove old version #ifdefs 2017-01-03 15:10:28 +10:00
Blottiere Paul
f7729b3096 [server] parallel map rendering 2017-01-02 22:13:45 +01:00
rldhont
4bc06b18e9 [Feature][PostgreSQL] Tests: Compile expression functions 2017-01-02 16:25:33 +01:00
rldhont
735b1c359a [Feature][PostgreSQL] Compile expression functions 2017-01-02 16:25:32 +01:00
Even Rouault
60a1701377 [FEATURE] Change of ergonomy of the visibility of layers inside groups
See https://github.com/qgis/QGIS-Enhancement-Proposals/issues/86

- Checking/unchecking a group doesn't change the check state of its children.
A node is visible if and only if it is checked and all its parents too.
- There is no more a semi-checked state for a group
- Ctrl-clic on a unchecked group will check the group and all its descendants.
- Ctrl-clic on a unchecked layer will check the lager and all its parents.
- Ctrl-clic on a checked group will uncheck the group and all its descendants.
- Ctrl-clic on a checked layer will uncheck the layer and all its parents.
- Those actions are available in contextual menu items in the tree view.
- Invisible layers because they or their parent(s) is unchecked are greyed out.
2017-01-02 13:25:25 +01:00
Nyall Dawson
8ebc73b495 Merge pull request #3914 from nyalldawson/bye_singletons
Remove some singletons by moving instances to QgsApplication
2017-01-02 09:00:58 +10:00
Alexander Bruy
c5835e9adc [processing] fix test and menus after renaming GdalOgr provider 2016-12-31 09:09:07 +02:00
Nyall Dawson
850171cbb5 Optimise destructors (pt 1)
- Remove some non-base class empty destructors. These add no value
and it's better to let the compiler auto generate optimised versions
- use virtual ~Class = default instead of virtual ~Class {}
2016-12-30 13:52:57 +10:00
Harrissou Sant-anna
ef85cdcf83 Replace "eg" by "e.g." or "for example" 2016-12-30 00:03:22 +01:00
Harrissou Sant-anna
69af2facde Replace more splitted by split 2016-12-29 01:46:19 +01:00
Nyall Dawson
585d9dbff1 Fix tests 2016-12-28 17:43:22 +10:00
Nyall Dawson
9d4adc1c70 Remove some singletons by moving instances to QgsApplication
- QgsColorSchemeRegistry
- QgsDataItemProviderRegistry
- QgsGPSConnectionRegistry
- QgsMessageLog
- QgsPaintEffectRegistry
- QgsPluginLayerRegistry
- QgsRasterRendererRegistry
- QgsRendererRegistry
- QgsSvgCache
- QgsSymbolLayerRegistry
2016-12-28 16:59:03 +10:00