5257 Commits

Author SHA1 Message Date
Nyall Dawson
4b32e7cc78 [afs] Implemented decodeUri for AFS provider
Allows retrieval of the web URL for an AFS layer
2018-11-07 15:30:17 +10:00
Denis Rouzaud
107e646219 rename QgsLocatorWidgetCore to QgsLocatorModelBridge 2018-11-06 13:59:37 -04:00
Denis Rouzaud
f652e8dcba save current extent and CRS in locator core
remove remaining bits of interface
2018-11-06 13:37:39 -04:00
Denis Rouzaud
6a9d7a69d8 implement roleNames for QgsLocatorModel 2018-11-06 10:09:20 -04:00
Denis Rouzaud
20d8db9e28 Revert "create a core interface for QgsMapCanvas"
This reverts commit 79c5b35a3925336e01e9ac1a6a75fd32eb3b8cdd.
2018-11-06 10:09:12 -04:00
Denis Rouzaud
078b445057 move part of the logic of QgsLocatorWidget to core 2018-11-06 10:08:33 -04:00
Denis Rouzaud
79c5b35a39 create a core interface for QgsMapCanvas 2018-11-06 10:06:22 -04:00
Alessandro Pasotti
c8b26771cf
Merge pull request #8359 from elpaso/handle-bad-layers2
[needs-docs][feature] Deferred handling of bad layers
2018-11-06 08:43:18 +01:00
Nyall Dawson
19ef2f904b Add missing /Factory/ annotation 2018-11-05 22:02:32 +10:00
Nyall Dawson
82baff87d4 Add a __repr__ method to QgsMimeDataUtils::Uri 2018-11-05 22:02:32 +10:00
Alessandro Pasotti
f02345bd8b Remove unnecessary project from test data 2018-11-05 10:27:02 +01:00
Alessandro Pasotti
eb02004b60 Store original style as QDomDocument instead of an XML string 2018-11-05 10:27:02 +01:00
Alessandro Pasotti
a4182c1e04 Remove unnecessary project from test data 2018-11-05 10:26:39 +01:00
Alessandro Pasotti
7a259c6ea5 Better handling of invalid relations ...
- do not add them to the manager dialog
- do not add relations to not existent layers (but keep relations to invalid layers)
2018-11-05 10:26:39 +01:00
Alessandro Pasotti
bc424d09c1 Store original style as QDomDocument instead of an XML string 2018-11-05 10:26:39 +01:00
Alessandro Pasotti
0cd21c91f1 Keep invalid relations and update them when the data source changes
Added a check for layer.isValid in relation.isValid, keep
relations in the manager even if they are not valid and
connect dataSourceChanged with updateRelationStatus
2018-11-05 10:24:35 +01:00
Alessandro Pasotti
2bd90da9c1 Added a validOnly flag to mapLayers to filter for valid layers only 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
3fe7848c16 Noted in the method documentation that dataProvider() may return null 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
f856b4c8e3 Renamed originalXmlProperties methods and variables 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
326640d881 Implement setDataSource for rasters 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
c32d542be5 Move setDataSource to QgsMapLayer
also setter and getter for providerType
2018-11-05 10:24:35 +01:00
Alessandro Pasotti
497a7da9de Added API methods to retrieve only valid maplayers
... and to count them

Tests updated accordingly, note that from now on
the assumption that a layer store or a layer project
contains only valid layers will not be true anymore.

To be honest it has never been true, because a
layer can become invalid at any time during
its life cycle, so better never assume that a
layer from the store or from the project is vaid.
2018-11-05 10:24:35 +01:00
Alessandro Pasotti
1b041f4f4f Add storeInvalidLayersProperties to store invalid layers
This can be used to restore initial layer status or to
apply styles and other layer properties if the data
source is changed.

The idea is that the user can fix bad layers at any time,
and by setting a new datasource she probably wants
to keep the original layer properties.
2018-11-05 10:24:35 +01:00
Alessandro Pasotti
bc4a1efac4 The store can now add invalid maplayers 2018-11-05 10:24:35 +01:00
Nyall Dawson
7be2925649 Remove QgsGeometry bool operator
This is too dangerous -- it gets silently casted to numeric values
instead of throwing compilation errors
2018-11-05 08:39:10 +10:00
Nyall Dawson
48e7e204c0 Move some browser directory action handling from core/gui to app 2018-11-04 21:07:27 +10:00
Nyall Dawson
6ec7f02e83 Add a QgsDataItemGuiProvider interface and registry for providers
These providers will be used to control how the browser data items
behave within GUI, and to allow separation of GUI related
properties of browser items from the core code.

A new registry QgsDataItemGuiProviderRegistry has been created
(modeled off QgsDataItemProviderRegistry), with an application
wide instance available from QgsGui::instance()->dataItemGuiProviderRegistry()
2018-11-04 21:07:27 +10:00
Nyall Dawson
5c5f2ed7e3 Add method to get QgsLayerItem::LayerType from a map layer 2018-11-01 20:41:08 +10:00
Matthias Kuhn
c55b4eb4c8
Make sip a bit happier 2018-10-31 12:15:43 +01:00
Matthias Kuhn
87c126323c
Regenerate fids for "multipart to singlepart algorithm" 2018-10-31 10:27:56 +01:00
Matthias Kuhn
a4d4c55c82
Parameter name harmonization 2018-10-31 10:27:55 +01:00
Matthias Kuhn
6fe832b984
Add missing param doc 2018-10-31 10:27:55 +01:00
Matthias Kuhn
50cf8b9e4e
Unify parameter names 2018-10-31 10:27:54 +01:00
Matthias Kuhn
229c617785
Ignore FID field when merging vector layers to geopackage 2018-10-31 10:27:54 +01:00
rldhont
6249b07f7c
Merge pull request #8320 from rldhont/server-reactivate-print-selection-3
[Server] Reactivate the capability to print selection with Server 3.4
2018-10-26 14:23:09 +02:00
Matthias Kuhn
a0e3c2df3b
Merge pull request #8335 from m-kuhn/qgsrectangleSnappedToGrid
Add QgsRectangle::snappedToGrid
2018-10-26 10:00:39 +02:00
Nyall Dawson
d1e2978314 Add warning to QgsLayerTreeLayer::layer() dox
Because the returned pointer must ALWAYS be tested before
being dereferenced
2018-10-26 16:57:36 +10:00
Matthias Kuhn
0da210df52
Add QgsRectangle::snappedToGrid
Snaps a rectangle to a grid.
2018-10-26 07:58:27 +02:00
Nyall Dawson
1ae010a6c9 Fix some clang truncate to int warnings 2018-10-26 15:03:54 +10:00
Denis Rouzaud
8eb193020a
Merge pull request #8330 from 3nids/fix9160
Properly zoom to feature for single point selected
2018-10-25 13:34:49 -08:00
lbartoletti
94ce3b92a9
Merge branch 'master' into bugfix_18902 2018-10-25 20:30:39 +02:00
Denis Rouzaud
5577d83a75 mark method as const 2018-10-25 13:49:26 -04:00
Denis Rouzaud
80d0c33f5b add QgsRectangle::scaled which returns the scaled rectangle
facilitates one-lines
2018-10-25 13:37:07 -04:00
Denis Rouzaud
699d8487dc
add QgsFeatureRequest::setNoAttributes (#8326)
since it's more convenient than setSubsetOfAttributes( QgsAttributesList() )
2018-10-25 07:35:05 -08:00
rldhont
a9e6950eee [Server] Use Project selection color in GetPrint for 3.4
Because selection was deactivated in layout, selection color was not transmitted from QgsProject to QgsLayoutRenderContext to QgsMapSettings.

forward porting of #7294
2018-10-25 14:31:07 +02:00
rldhont
74f2785532 [Server] Reactivate the capability to print selection with Server 3.4
The capability to print selection has been removed by the commit aaa7003 to
prevent accidental selections showing in exports from composer.

It is reactivated only for QGIS Server.

Fixes #13459 QGIS Server WMS GetPrint request don't respect SELECTION parameter

It's a forward porting of #7185
2018-10-25 11:33:43 +02:00
Denis Rouzaud
1bcd306197 add missing SIP_DEPRECATED annotation 2018-10-24 07:54:06 -08:00
Alessandro Pasotti
a51d7f5be3 Code layout 2018-10-23 18:56:27 +02:00
Alessandro Pasotti
15f4138a47 [db-manager] Store exception text in the task and pass it over to the caller
Fix #2019 - DBManager fails to display error messages with virtual layers
2018-10-23 14:59:10 +02:00
Nyall Dawson
8cf64c8a51 [layouts] Add option to filter "add layer to legend" dialog to
layers visible within the (linked) map only

Fixes #20186
2018-10-23 16:41:06 +10:00