3103 Commits

Author SHA1 Message Date
Nyall Dawson
53ba1a1f10 Add a common interface for QgsPropertyCollection/QgsPropertyCollectionStack 2017-01-23 12:45:21 +10:00
Nyall Dawson
336b603b3a Add support for more data definable properties to diagrams:
- Distance
- Priority
- ZIndex
- IsObstacle
- Show
- AlwaysShow
- Diagram Start Angle
2017-01-23 12:45:21 +10:00
Nyall Dawson
07315bfedd Add tests for data defined diagram properties 2017-01-23 12:45:21 +10:00
Nyall Dawson
c23de083ce Setting a property to null in collections removes property 2017-01-23 12:45:21 +10:00
Nyall Dawson
f1c1589550 Initial implementation of property system 2017-01-23 12:45:21 +10:00
Nyall Dawson
9124100fb6 Python formatting updates 2017-01-23 12:25:19 +10:00
Nyall Dawson
4a800a13c2 Fix tests 2017-01-22 21:29:23 +10:00
Nyall Dawson
46f2ea13ee [FEATURE] Add inches as a measurement choice for symbology/labeling
"Make imperial great again!"
2017-01-22 21:29:23 +10:00
Nyall Dawson
b7d89a73af Consolidate all render context unit conversion to single methods
within QgsRenderContext

Fix invalid conversions, update unit tests
2017-01-22 21:29:23 +10:00
rldhont
ad963e69c3 Merge pull request #3996 from jgrocha/literal
SLD parsing: handling ogc:Literal within CssParameter
2017-01-21 10:55:34 +01:00
Nyall Dawson
56fd6e0904 Revert "Reenable full task manager tests following b45469f"
This reverts commit dd614451c9586ea598f93aab56a97a00f409a6cf.
2017-01-21 15:01:02 +10:00
Denis Rouzaud
4c3968b9aa more spelling fixes 2017-01-20 15:06:09 +01:00
Matthias Kuhn
85146ca4be Add description for starting python tests in gdb 2017-01-20 12:23:23 +01:00
Nyall Dawson
dd614451c9 Reenable full task manager tests following b45469f 2017-01-20 08:26:56 +10:00
rldhont
d1f233d083 [Server] SELECTION tests
Update GetMap SELECTION test
Add GetPrint SELECTION test

!GetPrint SELECTION has to be fixed!
2017-01-19 16:41:43 +01:00
Martin Dobias
ff8d912147 Make the one band raster creation method return data provider 2017-01-19 15:46:46 +08:00
Martin Dobias
7b27079de9 Convenience API call to create empty raster file 2017-01-19 15:46:46 +08:00
Martin Dobias
15cd8331ac Make setEditable() return true/false to indicate success/error 2017-01-19 15:46:46 +08:00
Martin Dobias
f6f6ebdb44 [FEATURE] API to enable/disable editing of raster data
To create a 2x2 raster block with one byte per pixel:

```
block = QgsRasterBlock(Qgis.Byte, 2, 2)
block.setData(b'\xaa\xbb\xcc\xdd')
```

To overwrite existing raster data at position 0,0 by the 2x2 block:

```
provider.setEditable(True)
provider.writeBlock(block, band, 0, 0)
provider.setEditable(False)
```
2017-01-19 15:46:46 +08:00
Jorge Gustavo Rocha
65c01775f6 DDL update: saving layer styles on databases
Fix #11421
2017-01-18 20:02:48 +00:00
Nyall Dawson
df3fdf52a8 Merge pull request #4005 from nyalldawson/comp_mapsettings
Remove some more QgsComposition::mapSettings use, also support different CRS in composer map items
2017-01-18 12:57:46 +10:00
Nyall Dawson
a3dd380d35 [needs-docs] Composer maps default to a "use project CRS" setting
And overriding projection is only done if user has manually
chosen a different CRS from the list.

This means that templates and compositions in server can still
adapt to follow the project CRS, but if desired specific map
items (eg an overview map) can use the CRS override to always
show in a particular CRS.
2017-01-18 12:30:47 +10:00
Martin Dobias
433d04b68e QgsRasterBlock::data() for efficient access to pixel data also in Python (#4009)
Also adds some unit tests and API cleanups
2017-01-18 09:52:45 +08:00
Nyall Dawson
6a4d605256 Fix some test failures 2017-01-18 07:38:06 +10:00
Nyall Dawson
9a6d714061 [FEATURE][composer] Allow choice of CRS for map items
This allows the CRS for map items to differ from the canvas/project
CRS. It also allows different map items to have different CRS,
eg an overview map can be set to a different CRS to the main map.

An unfortunate side effect of this change and the ongoing work
to separate compositions from canvas is that datum transforms
are no longer supported in composer. This cannot be fixed until
the datum transform store is rewritten to not depend on canvas
(ie, it's also broken for upcoming multi-canvas work)
2017-01-17 19:18:47 +10:00
Nyall Dawson
305f9f0e98 Remove some more QgsComposition::mapSettings use 2017-01-17 15:44:46 +10:00
Jorge Gustavo Rocha
5c2fec325a SLD parsing: handling ogc:Literal within CssParameter 2017-01-17 01:39:01 +00:00
Denis Rouzaud
b119744773 replace cancelling, cancelled and cancellation by canceling, canceled and cancelation, respectively (#4000)
* replace cancelling and cancelled by canceling and canceled, respectively

see https://github.com/qgis/qgis3_UIX_discussion/issues/19

* replace cancellation by cancelation
2017-01-16 22:27:14 +01:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
Alessandro Pasotti
39a5f6a4f9 Merge pull request #3999 from elpaso/wfst-fixes-15597-16043
[bugfix] WFS-T Fixes #15597 #16043
2017-01-16 11:55:10 +01:00
Alessandro Pasotti
9324bdac1f [bugfix] WFS-T Fixes #15597 #16043
This commit fixes a few bugs on WFS-T with
servers that support WFS-T > 1.0.0 when user
configure version != 1.0.0 ("auto" is the default).

It also fixes WFS-T multiple operations on GeoServer
when an insert operation is among them and the feature
store does not return generated feature ids for the
inserted features (i.e. shapefiles).

Tested on GeoServer and QGIS Server

 (cherry-picked from 502a8da40380)
2017-01-16 11:38:14 +01:00
Denis Rouzaud
bf22cbfa9d [spellcheck] fix case detection + some fixes 2017-01-16 10:56:42 +01:00
Nyall Dawson
8a9cee0fb6 [composer] Use reference map when creating render context for
draw shape/arrow/nodes/paper symbols

This commit removes some more instances where changes in the
canvas affect compositions. Previously the symbols drawn
in shape/arrow/etc items were using the scale from the canvas.
This meant that the appearance of these items in composer
would change depending on canvas zoom if they used symbols
with map unit sizes.

Now they take their map scale from the composition's reference
map. While this has the nice side effect that now map units
can be used in the appearance of these items and they're
guaranteed to match up with the reference map item, the main
intention here is to remove more of the forced links between
compositions (core) and the main canvas (app).
2017-01-16 15:52:19 +10:00
Nyall Dawson
8a722d2981 Move QgsSymbolLayerUtils::createRenderContext to QgsRenderContext::fromQPainter
This method is useful in many contexts outside of symbology
2017-01-16 15:52:19 +10:00
Nyall Dawson
f32d11b508 [composer] Use largest map in composition as reference map if no
reference map is explicitly set
2017-01-16 15:52:19 +10:00
Nyall Dawson
e0934d7766 [composer][needs-docs] Rename "world file map" option to "reference map"
This option will be used for more than just world file generation,
and instead will indicate which map should be considered the master
map for the composition from which any composer properties
calculating map units will derive the scale from.
2017-01-16 15:52:19 +10:00
Even Rouault
6de4fceec2 GML parser: fix parsing of typenames and geometry names with non-ASCII character (#16009) 2017-01-14 16:09:54 +01:00
Nyall Dawson
b5480633e4 Standardise names for static variables
All non-const variables are prefixed with "s", all const
statics are ALL_CAPS
2017-01-14 16:40:24 +10:00
Blottiere Paul
932d9fb5d3 [server] parallel map rendering 2017-01-13 09:24:31 +01:00
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Denis Rouzaud
4467487e1c respect CamelCase for enums and their values 2017-01-11 14:10:11 +01: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
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
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