113 Commits

Author SHA1 Message Date
Matthias Kuhn
92639aef64
Merge pull request #41208 from rldhont/flag-read-extent-from-xml
QgsMapLayer::ReadFlag::FlagReadExtentFromXml to extend vector layer read capabilities to other layer types
2021-05-26 10:14:04 +02:00
Nyall Dawson
f21ea8c54a Avoid styleChanged() signals being raised before new labeling
configuration is set when changing a vector layer's style preset

This causes the layer styling dock to update before the layer's
new labeling settings are set, so the dock shows the incorrect
label settings for the previously used style

Fixes #42310
2021-05-22 11:50:02 +10:00
rldhont
65761a177c QgsMapLayer::ReadFlag::FlagReadExtentFromXml to extend vector layer read capabilities to other layer types
In QgsVectorLayer, it is possible through the flag trust layer metadata to use extent read in XML
instead of extent provided by the provider.

The QgsMapLayer::ReadFlag::FlagReadExtentFromXml can be used inlayer readXML to read Extent from XML for raster, point cloud and other layers.

Funded by Ifremer
2021-05-21 09:12:07 +02:00
Nyall Dawson
af6c08bb26 Move QgsMapLayerType to separate generic header for core enums
Avoids the need to include the whole qgsmaplayer.h header and
all its dependancies when only the QgsMapLayerType enum is required.
2021-05-17 16:09:13 +10:00
Nyall Dawson
21edff4ed7 Show more details about layer CRSes in the layer properties information
screen
2021-05-11 14:25:53 +10:00
Matthias Kuhn
ef3d9a2c32
Merge branch 'master' into unvirtualize-setdatasource 2021-05-05 08:01:26 +01:00
Nyall Dawson
f5449a1fe9 (optionally) Store layer notes in QML/QLR and allow copying/pasting
when copying styles between layers

Sponsored by Alta Ehf
2021-05-05 08:44:22 +10:00
rldhont
81ed419f2c fix move 2021-04-29 16:48:59 +02:00
rldhont
809e0009eb Update method doc 2021-04-29 11:57:03 +02:00
rldhont
4afa66af30 [API] Unvirtualize layer setDataSource method
Changes in the layer API:
* The setDatasource() methods become non-virtual public method
* The virtual private setDataSourcePrivate() method is defined and the provider setDataSource implementations have been moved to this new virtual method
2021-04-26 17:14:07 +02:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Blottiere Paul
1970df7e50 Update doc to 3.20 2021-03-10 13:31:59 +01:00
Blottiere Paul
3799f60949 Update doc 2021-03-10 08:37:50 +01:00
Blottiere Paul
0c831ddec4 Invalidate wgs84 extent when setting a transform context 2021-03-10 08:37:50 +01:00
Blottiere Paul
fd965af147 mExtent is private 2021-03-10 08:37:50 +01:00
Blottiere Paul
d9dfa5d2c9 Some renaming 2021-03-10 08:37:50 +01:00
Blottiere Paul
f94e29ee65 Update doc 2021-03-10 08:37:50 +01:00
Blottiere Paul
36b77764bf Add an actual parameter to geographicExtent to bypass the trust option 2021-03-10 08:37:49 +01:00
Blottiere Paul
476ebecbe2 Read the geographic extent from project 2021-03-10 08:34:41 +01:00
Alessandro Pasotti
b6e01f98e2 Project: store geographic extent 2021-03-10 08:33:46 +01:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Matthias Kuhn
73e385fd31 Improve docstring 2020-12-23 18:10:00 +01:00
Matthias Kuhn
6ddb13ac35 Get access to project from map layer 2020-12-22 17:00:26 +01:00
Nyall Dawson
9fc11d93c7 Add a trigger3DUpdate method to QgsMapLayer so that an explicit update of the layer in 3d maps can be requested
This is the 3d equivalent of QgsMapLayer::triggerUpdate()
2020-12-16 13:58:20 +10:00
Nyall Dawson
17cc0d4aab Add style flag for elevation properties, and serialize layer
elevation properties
2020-11-28 16:45:54 +10:00
Nyall Dawson
7c964f1d41 Add base class for QgsMapLayerElevationProperties
Base class for storage of map layer elevation properties.
2020-11-28 16:45:54 +10:00
Nyall Dawson
0056bb1580 Proxy QgsRasterLayer::setOpacity/opacity to QgsRasterRenderer::setOpacity
This allows layer opacity for raster layers to be set and retrieved using
the exact same API as all other map layer types
2020-11-13 21:27:06 +10:00
Nyall Dawson
f3648ba3f6 Move getters and setters for layer opacity from QgsVectorLayer to QgsMapLayer
All the logic for rendering non-opaque layers is handled in a layer
type agnostic way already, so this just allows the existing handling
to be used for mesh/point cloud/vector tile/etc layers also
2020-11-13 21:27:06 +10:00
signedav
f360838fbd
Merge pull request #39527 from signedav/offlineindicator
Indicator for offline layers
2020-11-11 16:16:21 +01:00
signedav
9e5a67f9e7 sipified qgsmaplayer 2020-11-06 17:35:04 +01:00
Alessandro Pasotti
3e398e2ab4
Merge pull request #39577 from elpaso/hidden-layers
Hidden layers
2020-11-05 16:13:10 +01:00
Alessandro Pasotti
26a9cdf5fd Hidden layers -> Private layers 2020-11-05 12:59:27 +01:00
Peter Petrik
de6f4d6ad8 hook point cloud layer type to the rest of the code 2020-10-27 05:29:14 +10:00
signedav
9737a6dbde sipified custompropertychanged 2020-10-23 07:20:30 +02:00
Alessandro Pasotti
b0c208f008 Hidden layers flags 2020-10-22 15:26:58 +02:00
signedav
8a33a14bbb customPropertyChanged signal in map layers to handle things like e.g. the offline layer indicator in the legend tree accordingly 2020-10-21 09:18:40 +02:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Nyall Dawson
f018252023 Add a Legend category to the style selection widgets and allow
legend settings to be stored and restored in QML

Fixes #37683
2020-09-17 07:27:34 +10:00
rldhont
45e9ecb1c2 Trust layer metadata propagation
The trust flag at the projetc level is only used to read vector layer extent from xml, not from provider.

This flag was not available at the vector layer and data provider level.

We propose a new QgsMapLayer reading flag to propagate the trust layer metadata prohect's read flag an d a new provider options to trust datasource config.
Trusting the datasource config means that the provider can use estimated metadata, the primary key is unique and the detectable geometry type and srid are the same as the requested.
2020-09-09 09:35:32 +02:00
Nyall Dawson
6901d6f68a After loading an ArcGIS Vector Tile Service layer, automatically load
and set the default style and labels for the layer

Also populate the layer metadata with the available content from the
service definition (e.g. layer attribution)
2020-09-08 15:45:58 +10:00
Nyall Dawson
f496173bd7 Fix messy doxygen blocks which mess with sipify script
Fixes #38291
2020-08-20 17:01:35 +10:00
Matthias Kuhn
1aa6697533 Make layer validity a property
Adds the possibility to react to layer validity at runtime
2020-08-08 10:05:07 +02:00
Nyall Dawson
6f90139fe9 Dox, build fixes 2020-08-05 16:27:09 +10:00
Nyall Dawson
4c04254b8b Add sip cast code for QgsAnnotationLayer 2020-08-05 16:27:09 +10:00
Nyall Dawson
21a2599d0d Move annotation layer renderer to own file 2020-08-05 16:27:09 +10:00
Nyall Dawson
35d9a657c8 Add AnnotationLayer to layer item type enum, silence warnings 2020-08-05 16:27:09 +10:00
Vincent Cloarec
6be16a5bfe
Memory dataset group and possibility to persist it (#37389)
[FEATURE] Introduces memory dataset groups for mesh layer. These dataset groups are temporary and are not kept when the project is closed.

Memory dataset groups can be created from the mesh calculator with a new option.

Allows the possibility to remove or save these memory dataset groups to a file with specified driver.
2020-07-01 10:18:27 +02:00
Denis Rouzaud
044a05d828 run sipify 2020-06-19 08:47:23 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
79f8fd9892 Move reponsibility for saving/restoring temporal properties
to QgsMapLayer::read/writeCommonStyle

Correctly stores these settings in QML files and when duplicating
layers

Fixes #36531, fixes #36530
2020-05-20 03:47:59 +10:00