154 Commits

Author SHA1 Message Date
bdm-oslandia
576d810875 feat(QgsMapLayer): add 3D extent handling 2023-11-16 14:05:52 +01:00
Sandro Mani
9b095c5605 Revert "Revert "Allowing storing GPGK raster layer styles to DB""
This reverts commit 9d8a72256893bd31a51d85927e9abd9cdb5eed29.
2023-10-23 13:47:40 +10:00
Nyall Dawson
9d8a722568 Revert "Allowing storing GPGK raster layer styles to DB" 2023-10-06 12:15:46 +10:00
Sandro Mani
4bc4f48f50
Merge pull request #54558 from manisandro/rasterstyles
Allowing storing GPGK raster layer styles to DB
2023-10-05 16:16:44 +02:00
Etienne Trimaille
29b08c79b7
Hide password instead of removing it 2023-09-29 09:29:49 +02:00
Sandro Mani
0a1dd0a643 Move saveStyleToDatabase, listStylesInDatabase, getStyleFromDatabase, deleteStyleFromDatabase, loadNamedStyle to QgsMapLayer 2023-09-18 14:16:02 +02:00
Nyall Dawson
156e5db76f Add choice of two different modes for "Refresh Layer at Interval"
The old behaviour was always to just redraw the layer, without
refreshing data. This was by design, as the feature was originally
developed to allow animated layers which needed to be regular,
quickly redrawn.

But there's also a use case for automatically refetching layer
data on a regular interval too. So now we expose a choice
of mode for the automatic refresh for users to decided which
is appropriate for their requirements.

The options are:

- "Reload Data": The layer will be completely refreshed. Any cached
data will be discarded and refetched from the provider. This mode
may result in slower map refreshes.

- "Redraw Layer Only": This mode is useful for animation or when
the layer's style will be updated at regular intervals. Canvas
updates are deferred in order to avoid refreshing multiple times
if more than one layer has an auto update interval set.

The changes are all wrapped up in a new reusable widget, so that
we can easily expose this setting for non vector/raster layers
if we want to in future.

Fixes https://github.com/qgis/QGIS/issues/39830
2023-08-30 09:42:59 +10:00
Nyall Dawson
2863e4842f Expand documentation for QgsMapLayer.setDataSource
Fixes #54381
2023-08-29 09:18:58 +10:00
Nyall Dawson
9f57fb2ef0 Rename "tiled mesh" to "tiled scene"
Better reflects that these types can contain lines and point
data, not just meshes
2023-08-05 21:31:49 +10:00
Nyall Dawson
71a778e492 Introduce framework for QgsMapLayerSelectionProperties
QgsMapLayerSelectionProperties exposes settings for controlling
how an individual QgsMapLayer behaves with respect to feature selection.
2023-07-29 18:36:11 +10:00
Nyall Dawson
5cf8f2ceb5 Shell for QgsTiledMeshLayer/QgsTiledMeshDataProvider 2023-06-28 17:47:17 +10:00
Vincent Cloarec
e2fa27e4a6
Load layers in parallel threads when opening project (#53069)
* load layers in parallel threads when opening project

* parallel loading by default and settingsin advanced settings

* fix freezing when no layer supports parallel loading

* clean leftover

* fix unwanted remove and typo

* typo

* fix flake8

* load OGR metadata under global mutex

* Revert "load OGR metadata under global mutex"

This reverts commit adcaf9e66ca432ee35143c45af2b383108770a63.

* remove parallel loading capability for OGR

* start application in server test

* import start_app

* fix flake8
2023-05-18 16:11:43 +02:00
Yoann Quenach de Quivillic
4dcd0d4af0 Add a way to disable map tips for a specific layer (fix #23400) 2023-04-23 11:01:37 +07:00
Nyall Dawson
1142e8ffac
Move QgsMapLayerType enum to Qgis.LayerType (#51874)
For consistency with other enums
2023-02-16 13:02:57 +01:00
Nyall Dawson
6f71e3393e Fix map tips do not show for vector layers where the HTML map tip
option isn't used

In this case the layer's display expression should be used for
the map tip content

Followup https://github.com/qgis/QGIS/pull/50854
2023-02-06 08:41:45 +10:00
Alessandro Pasotti
694ebda27c
Merge pull request #51467 from elpaso/sld-export-options-png
SLD: export options png
2023-01-22 10:29:47 +01:00
Alessandro Pasotti
b137a9aedb sip out 2023-01-17 11:30:48 +01:00
Denis Rouzaud
236ccce7e9 [doxygen] remove \returns for returning void methods 2023-01-12 15:00:51 +01:00
Alessandro Pasotti
8282358e9f Adjust tile size 2023-01-09 12:18:43 +01:00
Harrissou Sant-anna
f1f7b7ab12 Fix see also blocks misformatting 2022-12-31 06:56:48 +10:00
Alessandro Pasotti
f84a0a8647 More doxy 2022-12-21 11:31:25 +01:00
Alessandro Pasotti
118c956cff Add SLD export context 2022-12-21 11:09:03 +01:00
Alessandro Pasotti
669fa47bc0 Doxy 2022-11-10 12:46:34 +01:00
Alessandro Pasotti
f040c260bd Raster maptips 2022-11-09 09:48:02 +01:00
rldhont
0fc64b101a feat: Open layers in a read only mode with Qgis::ProjectReadFlag::ForceLayerReadOnly
In most cases of use of QGIS Server, it is not necessary to access the layers in write mode.
The read-only mode is sufficient.

We would like to introduce a new flag Qgis::ProjectReadFlag::ForceLayerReadOnly to
open layers in a read-only mode.
2022-09-12 09:17:02 +10:00
Jacky Volpes
c31364f15a Enable category selection when saving style to database 2022-05-24 13:07:16 +10:00
Nyall Dawson
bab7a911b2 [API] Add new map layer class "QgsGroupLayer"
A group layer is a map layer which consists of a set of
child layers, where all component layers are rendered as a single
flattened object during map renders.

This commit sets up the base framework for QgsGroupLayer only
(i.e. no rendering changes).
2021-11-23 16:08:05 +11:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
Etienne Trimaille
8b6395de85
MetadataUrls - Add some tests and some fixes 2021-09-16 14:23:46 +02:00
Etienne Trimaille
235a285814
MetadataUrl API : Save and restore in XML 2021-09-16 14:10:07 +02:00
David Marteau
ee6acb0ca2
Refactorize server properties 2021-09-16 14:10:07 +02:00
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