3324 Commits

Author SHA1 Message Date
jdugge
45f2cd5583 Fix duplicate QgsRectangle.toString methods
Condenses the 2 duplicate methods to a single method which is usable from the Python bindings.
2017-03-21 15:58:39 +10:00
Nyall Dawson
51c1d67091 Fix Coverity null pointer dereference warning 2017-03-21 15:32:56 +10:00
Nyall Dawson
041129d507 Fix loading composition triggers render of all composer maps
Also cleanup some more unused API methods
2017-03-21 10:32:53 +10:00
Nyall Dawson
8d01573168 Add/refine test masks for server test 2017-03-21 10:32:53 +10:00
Nyall Dawson
885269ee78 Only create composer item config widgets on demand
Instead of creating them for all items when composer window
is opened, instead just create and destroy them when
required. None are too heavy to have a noticable delay
when selecting items, but in contrast keeping them around
forever is wasteful on memory.

Also clean up a lot of duplicate composer/composition
code and remove unnecessary signals from api (use a single
itemAdded signal instead of multiple signals for every
item type)
2017-03-21 10:32:53 +10:00
Nyall Dawson
53160c7b21 [composer] Port composer manager to layout manager
Also switch to using a proper model to show/edit compositions
in the dialog.
2017-03-21 10:32:53 +10:00
Nyall Dawson
148e2bcf52 Better method to autogenerate composer names 2017-03-21 10:32:53 +10:00
Nyall Dawson
79a11dcdfe Extend layout manager tests 2017-03-21 10:32:52 +10:00
Nyall Dawson
3a1ac1a995 [composer] Attach compositions to QgsProject
This adds a new QgsLayoutManager class which is used for
storage and serializing/deserializing of compositions.

A QgsLayoutManager is attached to QgsProject. This allows
core code to access the compositions attached to a project.
The intention is to move all handling of compositions from
app to core, making it easy for server to access project
compositions without resorting to fragile xml parsing.
2017-03-21 10:32:52 +10:00
Alessandro Pasotti
5adbc641d4 QgsSettings: added Auth, App and Providers sections
That should be all we need for namespaced settings.
2017-03-20 16:09:34 +01:00
Matthias Kuhn
616b4dd987 Set feature valid on setId 2017-03-18 12:11:52 +01:00
Matthias Kuhn
babab3da01 Fix failing test 2017-03-18 12:11:52 +01:00
Matthias Kuhn
255eb98be6 Make features valid on setAttribute and setGeometry
Implements https://github.com/qgis/qgis3.0_api/issues/75
2017-03-18 12:11:52 +01:00
Even Rouault
ed1b0a2e74 Merge pull request #4270 from rouault/wfs_outputformat
[WFS provider] Select GML3 output format for WFS 1.0 when available
2017-03-17 13:48:28 +01:00
Even Rouault
852f01b0f9 [WFS provider] Select GML3 output format for WFS 1.0 when available
Some WFS servers like QGIS servers can expose GML3 output format for GetFeature
requests, which enable to retrieve curve geometries, instead of linearized ones
with the default GML2 output format. So use GML3 when advertized, and that
no explicit outputFormat is passed in the URI.
2017-03-16 13:32:39 +01:00
Nyall Dawson
ae45d8d490 Move composer title to composition name
Allows the name to be retrieved from core code
2017-03-15 15:19:13 +10:00
Nyall Dawson
738f4415d9 Merge pull request #4253 from nyalldawson/multi_canvas2
[FEATURE] Multi canvas/additional map views
2017-03-15 10:06:39 +10:00
Nyall Dawson
647e814bfd Merge pull request #4248 from arnaud-morvan/expressions_with_null
Improve NULL handling in expressions
2017-03-15 06:59:54 +10:00
Nyall Dawson
730d10a153 Fix failing test 2017-03-14 17:27:45 +10:00
Nyall Dawson
dbfee13bbf Indentation 2017-03-14 09:34:50 +10:00
Nyall Dawson
95806bb59b Make extra map views either follow the main canvas layers/styles,
or allow them to be set to follow a map theme preset

I.e. all styling and configuration operations for secondary
views are done in the main map canvas. Theme presets can be made
in the main canvas, and then assigned to the secondary views.
2017-03-14 09:28:34 +10:00
Nyall Dawson
ee969df8a9 Correctly handle reading/writing multiple canvas to project 2017-03-14 09:28:33 +10:00
Juergen E. Fischer
8bea742216 fix flake8 warnings 2017-03-13 20:13:51 +01:00
arnaud.morvan@camptocamp.com
f355fcd96e Fix geometry aggregate when first geometry is NULL (usertype) 2017-03-13 13:16:43 +01:00
arnaud.morvan@camptocamp.com
adb13e1cc7 Fix aggregate when group_by value is NULL 2017-03-13 13:16:43 +01:00
arnaud.morvan@camptocamp.com
b798c3a7ca Handle NULL in function "Array" 2017-03-13 13:16:43 +01:00
Nyall Dawson
a271199b0c When theme is removed, canvas falls back to default view 2017-03-13 15:03:07 +10:00
Nyall Dawson
2cba52846e If no project layer order set, use layer tree layer order
for QgsMapThemeCollection::masterVisibleLayers()
2017-03-13 14:42:22 +10:00
Nyall Dawson
0d0a81b00d Clearing map canvas theme falls back to project layers 2017-03-13 14:11:58 +10:00
Nyall Dawson
7f85169e30 Move test to correct location 2017-03-13 14:08:20 +10:00
Nyall Dawson
70bc526b6c Indentation 2017-03-13 14:04:40 +10:00
Nyall Dawson
452abb2484 Add method to QgsMapThemeCollection to retrieve ordered list of
visible layers for the project
2017-03-13 13:40:48 +10:00
Nyall Dawson
98eda3521c Auto-set GUI for custom layer order when API call to QgsProject::setLayerOrder
is made
2017-03-13 12:52:55 +10:00
Nyall Dawson
2c3c1f7fbb If no project layer order is set, fall back to stored layer order
when retrieving map theme layers

Since we don't ever want to return no layers in this situation
using the stored order is an acceptable last resort

Should only affect custom scripts run outside of QGIS app
in any case!
2017-03-13 12:52:55 +10:00
Nyall Dawson
5eccaf6020 Project layer order returns all layers in order, not just visible ones
Otherwise map themes with different visible layers cannot be
correctly ordered
2017-03-13 12:52:55 +10:00
Nyall Dawson
9faa628f8b Layer order in map themes must always respect project layer order 2017-03-13 12:52:55 +10:00
Nyall Dawson
6cfc6a1b98 Allow retrieval of project layer order through QgsProject
Previously this was only accessible through app
2017-03-13 12:52:55 +10:00
Nyall Dawson
9842fcbfc7 Add convience method to block while canvas is rendering
NOT to be called from anything but unit tests and standalone
scripts!!
2017-03-13 10:00:36 +10:00
Nyall Dawson
af532ecdf3 Improved docs for QgsMapCanvas::setTheme, handle setLayers and
setLayerStyleOverrides when canvas is following a map theme
2017-03-13 09:53:09 +10:00
Nyall Dawson
588a8fc9e9 Add unit test for changing appearance of style in a theme 2017-03-13 08:39:37 +10:00
Nyall Dawson
1e6bffe414 Allow setting map canvases to auto follow a map theme 2017-03-13 08:39:37 +10:00
Blottiere Paul
d10d67728a [BUGFIX] Embedded groups are empty 2017-03-12 12:50:27 +08:00
Juergen E. Fischer
7293c057fc windows test:
* skip options startup test (--help shows a message box on windows)
* avoid initial console help
2017-03-11 11:00:57 +01:00
Matthias Kuhn
fc92e2a63e Fix QgsXmlUtils reading list to variant and add test 2017-03-09 20:54:45 +01:00
Matthias Kuhn
0170580019 Save QgsProperty related objects via QVariants 2017-03-09 20:54:44 +01:00
Larry Shaffer
2af1e9f482 Skip WMS_GetPrint_SRS test in PyQgsServer, instead of commenting out
As per discussion with Alessandro Pasotti
2017-03-09 09:53:54 -07:00
Nyall Dawson
41d5f30961 [needs-docs] Attribute table "show selected features" shows no features
when none are selected

This change is being driven by performance - the "show selected" mode
can be used to speed up the attribute table loading for large layers.
The current behaviour (showing ALL features when none are selected)
breaks this performance benefit, because if users accidently open
the table with no selection then they are forced to wait for the
entire table to load (sometimes takes hours on large tables/slow
connections).
2017-03-09 09:03:11 +10:00
Nyall Dawson
95040c1b42 Follow up addition of new units 2017-03-09 06:46:53 +10:00
Matthias Kuhn
8b2180f379 Unit tests for mm/cm units 2017-03-08 11:37:20 +01:00
Matthias Kuhn
56163e2810 Modularize distance and area formatting 2017-03-08 11:36:28 +01:00