121 Commits

Author SHA1 Message Date
Etienne Trimaille
21c3f3fcbf
Add API for having many metadataUrl on a layer 2021-09-16 14:10:06 +02:00
nirvn
2a2eace0e1 Move generalHtmlMetadata to QgsMapLayer class, guard from null data provider, harmonize looks and details ordering across map layer types 2021-08-24 14:52:40 +10:00
Nyall Dawson
3b2e640cee Add a new enum for inherent map layer properties, and add property
to annotation layers to reflect that while these are editable
users are not able to toggle edits on them (they are ALWAYS
editable!)

Note that we can't use the existing QgsMapLayer::LayerFlag enum here,
as that has a different meaning (flags which are set by users
at runtime)
2021-08-18 12:32:41 +10:00
Denis Rouzaud
eaa4b54e20
allow to save/read enum/flags as map layer properties (#44329) 2021-07-23 08:41:45 +00:00
Alessandro Pasotti
387c403c2f First nail in the coffin of DB Manager
Replace DB Manager legend custom menu action with
C++ implementation for SQL layer
2021-07-22 10:18:13 +10:00
Marco Hugentobler
f287872798 Use application image cache 2021-07-02 13:21:49 +02:00
Marco Hugentobler
b7b9470a68 Possibility to select an image as legend placeholder 2021-07-02 13:20:10 +02:00
Vincent Cloarec
db21851bbb
[mesh] mesh frame editing part-2 - start, commit, roll back and cancel (#43982)
[mesh] allows the user of mesh layers to start editing, save, roll back or cancel editing, in the same way as vector layers (editing part-2)
2021-07-01 08:18:18 +02:00
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