128 Commits

Author SHA1 Message Date
Nyall Dawson
e5bddbab1a Don't discard custom color/symbol when changing layer selection
mode
2023-07-29 18:36:11 +10:00
Nyall Dawson
e5eb082a81 Add API to set specific symbol to render for selected features in
a vector layer

If set, then that symbol will be used for selected features. Allows
eg selected lines to be rendered in a thicker line style vs
non-selected lines for improved visibility.
2023-07-29 18:36:11 +10:00
Nyall Dawson
8931268c74 Add API to set selected feature color for vector layers 2023-07-29 18:36:11 +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
Mathieu Pellerin
859558a1a5 Add test + address review 2023-07-28 19:16:36 +07:00
Mathieu Pellerin
3734bee6a5 [map tool] When copy-moving a feature, use duplicate feature function to insure composition relationships are respected 2023-07-27 15:40:40 +07:00
Alessandro Pasotti
3db86bc236
Merge pull request #53168 from elpaso/attribute-table-defer-virtual-fields
Attribute table optimization: do not load hidden fields until required
2023-05-22 16:35:12 +02:00
Nyall Dawson
4c6018de92 Add option to limit the extent of "fill above" and "fill below"
elevation ranges for a layer in elevation profile plots

Fixes #51010
2023-05-22 14:48:57 +10:00
Alessandro Pasotti
d2c317a5d7 Attribute table optimization: do not store hidden fields
- defer hidden fields fetching
- allow caching of mixed full and subset attributes features
2023-05-19 19:15:10 +02:00
Nyall Dawson
b28bf20372 Add api to determine attribute capabilities for QgsVectorLayerExporter 2023-04-22 09:18:06 +10:00
Nyall Dawson
276ff97807 When creating new fields, only expose the 'Comment' option for
datasources which support editing comments

This support is currently limited to the postgres provider,
so exposing the comment field for all other vector layer types
is just misleading to users. The comment will be completed discarded
without any warning!
2023-04-14 14:14:41 +10:00
Nyall Dawson
2e7b0dd4a0 Deprecated unused, not-useful QgsVectorDataProvider::palAttributeIndexNames 2023-04-06 17:18:05 +10:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Nyall Dawson
edfb9764cb Add API to set field split policy for vector layers 2023-03-01 19:30:39 +10:00
Nyall Dawson
046883fa9c Promote QgsWkbTypes enums to enum class, move to Qgis 2023-02-22 12:39:21 +10:00
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10: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
Damiano Lombardi
e8f29c8bca Update doc 2023-02-01 13:35:06 +01:00
Damiano Lombardi
1bcc87a741 Explicitly set the target feature for merge operation 2023-01-31 17:37:09 +01:00
Damiano Lombardi
271e539402 Fix docstring 2023-01-31 09:18:59 +01:00
Damiano Lombardi
978574f1cc Move merge logic to QgsVectorLayerEditUtils 2023-01-31 09:18:59 +01:00
Damiano Lombardi
45fea05b07 Move merge selected features logic to QgsVectorLayer 2023-01-31 09:18:59 +01:00
Denis Rouzaud
c11125d4f7 migrate setting qgis/simplifyLocal to class (Bool, core) 2023-01-26 20:54:20 +01:00
Denis Rouzaud
e7ef4d08b0 migrate setting qgis/simplifyDrawingTol to class (Double, core) 2023-01-26 20:54:19 +01:00
Denis Rouzaud
073b60696d forward declaration 2023-01-26 20:54:19 +01:00
Mathieu Pellerin
1025006034 Address comment, optimize and hard-code conditional styling of constraints 2023-01-13 10:11:42 +07:00
Nyall Dawson
8921e696e7 Make iteration of features from vector layers with joins actually thread safe 2022-12-14 18:19:05 +10:00
Harrissou Sant-anna
d67e3c39c5 Fix oapif subsection title 2022-11-25 12:19:12 +10:00
Nyall Dawson
b1e63a2815 Don't emit layerModified for every atomic change made during a bulk
operation to the vector layer edit buffer

Eg Instead of emitting layerModified for every individual feature
in a call to QgsVectorLayer::addFeatures, we defer the signal
and emit it only once after adding all the features.

This avoids a lot of expensive, unnecessary work which is triggered
by the signal
2022-11-18 11:51:24 +10:00
Julien Cabieces
91e5130080
Merge pull request #50854 from elpaso/raster-maptips-2
Raster maptips
2022-11-14 08:42:22 +01:00
Alessandro Pasotti
f040c260bd Raster maptips 2022-11-09 09:48:02 +01:00
Alessandro Pasotti
9c2923aa1d Optionally load all stored styles from DB with correct names.
Fixes #37434

Funded by: Ministère des Forêts, de la Faune et des Parcs - Québec
2022-11-07 10:16:04 +01:00
Loïc Bartoletti
e3bf816f55 rename addMultiRing to addRingV2 2022-10-18 12:28:22 +02:00
Loïc Bartoletti
6a1222f187 apply nyall's review: use unique_ptr and sip things 2022-10-18 10:31:02 +02:00
Loïc Bartoletti
5d7a025304 qgsvectorlayereditutils.h: add \since tag 2022-10-18 10:31:02 +02:00
Loïc Bartoletti
992e2bf1df Remove addMultiRing method in QgsVectorLayer.
QgsMapToolAddRing can use the one from QgsVectorLayerEditUtils.
All checks are made inside QgsVectorLayerEditUtils.
2022-10-18 10:31:02 +02:00
Loïc Bartoletti
b09c2d1132 QgsVectorLayer: add addMultiRing and use it in QgsMapToolAddRing
The `QgsMapToolAddRing` adds a ring through the `addRing` method of
`QgsVectorLayerEditUtils` called by this of `QgsVectorLayer`.

The bug described in #23113 indicates that only one of the entities receives the
ring addition when using the map tool.

This is consistent with the documentation of the `addRing` methods.
So, it is by design that the tool works like this.

However, as stated in the ticket, it is best to add the ring to all entities.

In order to avoid an api break, I added a new addMultiRing method that adds the ring on all entities.

Fixes #23113
2022-10-18 10:31:01 +02:00
rldhont
c26d58ece8 feat: New force read only option for vector layer
To be able to open vector layer in a read-only mode, a new vector layer option has been defined to do it.

This option is used to open world_map.gpkg and fixes #35383
2022-09-12 09:17:02 +10: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
Damiano Lombardi
67bdadfead
Fix rollback not leaving a consistent state for buffered transaction 2022-08-23 10:04:17 +10:00
Jacky Volpes
c31364f15a Enable category selection when saving style to database 2022-05-24 13:07:16 +10:00
Even Rouault
d81b66d611 QgsVectorLayer(): make it clear that WFS URI parameter keys ar case sensitive (refs #46485) 2022-05-24 08:30:40 +10:00
Alessandro Pasotti
4a4e9f27d9 Pass context by const ref 2022-05-18 16:56:40 +02:00
Julien Cabieces
a57281c836 Vectorization of selective masking 2022-05-12 11:45:39 +10:00
Julien Cabieces
d937a59067 Fixes fully-qualified-moc-types 2022-05-10 08:27:47 +10:00
Nyall Dawson
e163361da9 Add option to show markers over continuous surface plot 2022-05-03 12:15:02 +10:00
Nyall Dawson
826cbe37d6 [feature] Add an "interpretation" option for vector elevation profiles
Choices are "individual features" (the default behavior) or "continuous
surface". The new Continuous Surface option is designed for vector
layers which represent a continuous elevation surface, e.g contour
lines or surveyed elevation points. When selected, the elevation
chart will be rendered as a surface instead of separate features
by joining the sampled elevation results into a continuous line.

There's also the same option exposed as for raster and mesh layers
where the appearance can be toggled from a single line to a "fill
below" symbol.

Fixes #48341
2022-05-03 12:15:02 +10:00
Nyall Dawson
9a99ed8800 Don't show vector layers with no interesting elevation properties
set by default in newly created elevation profiles

Fixes #48286
2022-04-22 13:07:16 +10:00
Nyall Dawson
1fc20cb026 Show elevation specific tooltips 2022-04-22 13:07:16 +10:00
Nyall Dawson
71c1c24d56 A vector layer with z values present should default to "relative"
clamping mode, not "clamped to terrain"
2022-04-22 11:40:29 +10:00