73 Commits

Author SHA1 Message Date
Damiano Lombardi
03f4740e65 More detailed error feedback for rollback 2022-03-04 08:41:10 +01:00
Damiano Lombardi
22de7e8a69 Fix docstrings since QGIS 3.24 to 3.26 2022-03-04 08:41:10 +01:00
Damiano Lombardi
6b4bba8224 Buffered transactions startEdit/commit/rollback from layer 2022-03-04 08:41:10 +01:00
Damiano Lombardi
cabf50d831 Buffered transactions rollback 2022-03-04 08:41:10 +01:00
Damiano Lombardi
ba1002d163 Show commit errors + docstrings 2022-03-04 08:41:09 +01:00
Damiano Lombardi
219d450075 Initial implementation of buffered transactions 2022-03-04 08:41:09 +01:00
Nyall Dawson
ddf5cd57cc Allow extrusion to be disabled 2022-03-03 06:15:10 +10:00
Nyall Dawson
36dd3745f8 Add documentation note about binding vs point layers 2022-03-03 06:15:10 +10:00
Nyall Dawson
cc24106d01 Add QgsMapLayerElevationProperties subclass for vector layers
Allows elevation properties to be set for vector layers, including:

- altitude binding
- altitude clamping
- extrusion
- scale
- offset

These properties can be set through the new "Elevation" tab in
the vector layer properties dialog
2022-03-03 06:15:10 +10:00
Julien Cabieces
2d2cd13c58
Merge pull request #47392 from signedav/fix_relref_nomodal
Avoid modal dialogs in relation reference /  relation editor
2022-02-21 09:10:49 +01:00
Nyall Dawson
a7b6b41fad Add docs 2022-02-20 06:48:03 +10:00
Nyall Dawson
8cd9b80149 Add browser properties widget for showing the properties of an existing
field domain
2022-02-20 06:48:03 +10:00
Nyall Dawson
3d9a74176e More repr 2022-02-20 06:48:03 +10:00
Nyall Dawson
2be52d9df9 Create QgsFieldDomain and subclasses which directly represent
the GDAL field domain coded value/range/glob domains
2022-02-20 06:48:03 +10:00
signedav
7dac040b47 reenter lost override keyword and some docs 2022-02-16 12:05:47 +01:00
signedav
f971a47b67 Do dialogs not open modal since otherwise the canvas are blocked and we are not able to collect geometries.
Pass widget as parent to the dialog to avoid "orphaned" child dialogs. The widget is passed as parent to QgsFeatureAction. When creating a dialog the widget is passed as parent to the dialog and the dialog is set as parent to the QgsFeatureAction (last like before).
To avoid confusion with opened dialogs the parent's visibility is set to hidden, when child dialog is opened.

This fixes #47193
2022-02-16 09:24:11 +01:00
Nyall Dawson
6bd1a7eb7d Document new behaviour 2022-01-24 17:26:05 +10:00
Matthias Kuhn
fab5d8a84e
Merge pull request #46493 from suricactus/fix_misleading_docs
Fix misleading docs that is only valid if edit buffer is used (so does not work in transaction mode)
2021-12-15 11:49:02 +01:00
Ivan Ivanov
527359bc7c Fix misleading docs that is only valid if edit buffer is used (so does not work in transaction mode)
Long story short, the `layer.committedFeaturesAdded` signal is not fired after `layer.commitChanges()` when in transaction mode.

If the layer is using the `QgsVectorLayerEditBuffer` the `commitedFeaturesAdded` signal is fired.
But if transaction is used and the `layer.editBuffer()` returns `QgsVectorLayerEditPasstrough`, then there is no signal.

The `QgsVectorLayerEditPasstrough` class is quite empty and lacking implementation of these events, so they don't work on layers in a transaction group.
2021-12-14 22:19:34 +02:00
Alessandro Pasotti
630f3f69f6 Return a NULL variant in case of multi/not allow NULL
Because an invalid variant would have not been set
in the feature form.
2021-12-13 13:55:11 +01:00
Alessandro Pasotti
d93bab9dac Use widget value when validating attrs in form
Also, make sure that non enforced constraints
do not block commits and do not report as violated
constraints (Fix #46364).

Followup #46439 because the constraints were
not checked agains the widget value but against
the attribute value.
2021-12-13 10:48:37 +01:00
Nyall Dawson
dcf0cfe5a3 Fix API issues causing malformed python stub files
Fixes #46240
2021-11-29 11:54:06 +10:00
Alessandro Pasotti
d4876f3842 Add operator for flgs and update docs 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
c5f956dbef Introduce VectorLayerType flags 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
a04112d740 Add isQuery() to vector layer and data provider
The method returns TRUE if the layer is a query/sql layer.

This allows to selectively show the "Update SQL Layer..." menu
entry in the legend.

Partial fix for #45796
2021-11-05 07:29:18 +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
7cc5533f7d [api] Provide a mean to know whether QgsVectorLayerUtils' guessFriendlyIdentifierField function picked a friendly identifier 2021-10-18 22:07:37 -07: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
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
Nyall Dawson
b8f65cbf01 Promote temporal related enums to enum classes, move to Qgis 2021-09-09 14:56:47 +10:00
Richard Duivenvoorde
b5952c1638 Sipify all 2021-09-09 08:07:48 +10:00
Richard Duivenvoorde
9b1894cf46 Sipify and indentation 2021-09-09 08:07:48 +10:00
Nyall Dawson
bf6af35382 Copy error message from aggregate calculator to expression when
aggregate function fails, so that we give more helpful error messages
for debugging aggregate based expressions
2021-08-09 13:00:33 +10:00
Nyall Dawson
f69ff2706a Implement distance within search for vector layer iterator 2021-08-05 14:24:07 +10:00
Nyall Dawson
01e3e1dddc [api] Move QgsGeometry enums to Qgis, promote to enum classes 2021-08-04 09:54:32 +10:00
Nyall Dawson
4bb7f82f2e [sipify] Add check that doxygen //!< command is only used for enum
documentation

sipify can't handle it in other contexts
2021-07-19 16:05:53 +10:00
Nyall Dawson
2724315a99 Move enums from QgsVectorLayer to Qgis, promote to enum classes,
and fix redundant QgsVectorLayer.VertexMarkerType enum
2021-07-19 14:02:39 +10:00
nirvn
2006c975f4 Migrate remaining uses of QRegExp in src/core 2021-07-16 11:01:42 +10:00
Germán Carrillo
92231d74c8 Complete addTopologicalPoints result values for QgsVectorLayer; add tests for error result codes (-1 and 1) 2021-07-05 21:22:16 -05: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
Nyall Dawson
11e88f7e92 Responsive cancelation of aggregate expression functions 2021-06-19 06:21:51 +10:00
Nyall Dawson
b16465bc31 Support early abortion of vector layer feature counter
Refs https://github.com/qgis/QGIS/issues/43572
2021-06-19 06:21:51 +10:00
Even Rouault
92fc43505d Update featureCount() methods to return long long for Win64 compatibility 2021-06-15 12:40:04 +10:00
Nyall Dawson
544708f4aa [temporal] Fix filter generation for vector temporal layers
When features have a temporal "range", we should never treat
that range as inclusive of the end (or we end up with features
appearing in multiple date ranges)

Completes fixes begun by @rduivenvoorde in https://github.com/qgis/QGIS/pull/40989

Fixes #38468
2021-06-10 09:56:25 +10:00
Nyall Dawson
5bac4c2c70 [api] Add method to retrieve feature ids of all new and changed
features directly from QgsVectorLayerEditBuffer
2021-06-08 21:27:21 +10:00
Nyall Dawson
5fdb88bae3 Fix massive performance regression in attribute table
Follow up 56f7812ca1e

This commit fixed the ordering of features coming from the
vector layer cache for the attribute table, but came with a massive
speed impact due to the repeated calls QList::contains for
every feature fetched. For any moderately sized table or above
these calls stacked up into multiple minute delays in opening
the table.

Avoid this by tracking the added feature ids in a separate
unordered set, so that we don't need to check through the
ordered list for existing features at all.

Eg a 500k feature gpkg was taking 10 minutes to open the table.
With this optimization that's back down to 20 seconds.
2021-06-08 21:16:33 +10:00
Nyall Dawson
c57d7ad6aa Completely remove QgsVectorLayerFeatureIterator::FetchJoinInfo::joinLayer and note in api_break.dox
There's no point in keeping such a dangerous member in the api
2021-06-03 14:26:23 +10:00
Nyall Dawson
cebb1f8ef9 Fix sip 2021-06-03 14:26:23 +10:00