89 Commits

Author SHA1 Message Date
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
Martin Dobias
8d24e1744b Added zmin/zmax parameters to limit usable zoom levels 2020-03-27 14:07:24 +01:00
Martin Dobias
5ec1890643 Moved to proper QgsMapLayer subclass + icon + optional tile borders 2020-03-27 12:08:40 +01:00
David Signer
81317996be reading of all the custom properties to e.g. copy them to the offline project 2020-03-18 10:48:25 +10:00
Nyall Dawson
313b000147 Minor temporal properties cleanups and dox improvements 2020-02-24 20:35:25 +10:00
Samweli
c4355ab8b7 updates on map layers temporal properties classes 2020-02-08 08:26:21 +03:00
Samweli
930f7a596d added new map layer temporal properties sub classes with tests 2020-02-08 08:26:21 +03:00
Samweli
8232f2db5a edits per review on qgs map canvas 2020-02-08 08:26:21 +03:00
Samweli
618f257874 moved qgsabstracttemporal class to qgstemporalrangeobject class as per review suggestions 2020-02-08 08:26:21 +03:00
Samweli
62efb55af2 updates on tests and abstract temporal class 2020-02-08 08:26:21 +03:00
Alessandro Pasotti
90ac90b4a9 Weak relations and auto-restore when loading a style 2019-12-19 10:33:24 +01:00
Nyall Dawson
377848e2ad Add QgsMapLayer::isTemporary to test whether a map layer is temporary
These include memory layer provider layers, or layers physically
stored inside a user's temporary folder (e.g. /tmp)
2019-11-09 13:43:03 +10:00
Alessandro Pasotti
faeaab1a57 Sipify 2019-10-31 17:33:49 +01:00
Alessandro Pasotti
73beaca45a Address PR comments 2019-10-30 14:41:34 +01:00
Alessandro Pasotti
64949dc227 Check vector layer widget broken dependencies 2019-10-30 14:41:34 +01:00
Denis Rouzaud
758d7cff4a run sipify to update deprecation annotations 2019-10-15 13:17:38 +02:00
Nyall Dawson
cb06519d16 [api] Add API to indicate that individual layers may be loaded without any
CRS validation, regardless of the user's settings

This avoids hacks put in place in other parts of QGIS code or in plugins
to temporarily deactivate the CRS validation prompt, providing a supported,
stable method to indicate that when loading a particular layer no CRS
validation is required.
2019-10-09 15:01:51 +10:00
Matthias Kuhn
61812648a3 Add API to hook into resolveReferences 2019-09-18 09:32:02 +02:00
Julien Cabieces
5b71e21613 [FEATURE] [needs-docs] Add circular data dependencies (#30947)
* [FEATURE] [needs-docs] Add circular data dependencies
2019-08-26 08:36:07 +02:00
Denis Rouzaud
e4faaf4988
add __repr__ for QgsMapLayer (#31108) 2019-08-06 13:36:14 +02:00
Nyall Dawson
51ed8c95b2 Dox++ 2019-07-10 08:10:49 +10:00
Nyall Dawson
0cdad2307b Add api to allow reading a QgsProject file without loading any layers
This causes the project to be read, but no data providers created for
layers (i.e. the same result as loading a project in the app and
choosing to leave bad layers in the project).

It's intended for occasions when you want to efficiently access properties
of a project without the (often very expensive) cost of actually
loading layers. E.g. to just read project metadata, parse the
layer tree structure, extract print layouts or renderer properties, etc.
2019-07-10 08:10:49 +10:00
Nyall Dawson
590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00
Alessandro Pasotti
103ef762ca Factor out generateId for layers and fix QLR mutiple layers id import 2019-06-10 17:58:22 +02:00
Alessandro Pasotti
394a189682 Fix class documentation 2019-04-17 10:06:41 +10:00