51 Commits

Author SHA1 Message Date
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Nyall Dawson
afd2e4f42d Fix doxygen class briefs which aren't full sentences 2025-04-01 09:44:00 +10:00
Nyall Dawson
602ef6c691 Don't start class briefs with "This class contains settings..."
It's unncessarily verbose, use just "Contains settings..." instead.
2025-03-30 20:48:07 +10:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
8e95b2c0ed Add helper method to calculate transform to apply for a QgsFeatureRequest 2024-07-17 13:40:35 +10:00
Nyall Dawson
27294b1374 Add QgsCoordinateTransform setter for QgsFeatureRequest
Sets the coordinate transform which will be used to transform
the feature's geometries.

If this transform is valid then it will always be used to transform
features, regardless of the destinationCrs() setting or the underlying
feature source's actual CRS.

This method should be used with caution, and it is recommended
to use the high-level setDestinationCrs() method instead. Setting a specific
transform should only be done when there is a requirement to use a particular
transform, eg when a specific, non-default coordinate operation
MUST be used for the transformation.
2024-07-17 13:40:35 +10:00
Alessandro Pasotti
30a1e36fe5
sipify 2024-06-01 08:09:57 +02:00
Alessandro Pasotti
f681cd459e [api] Add compare methods to QgsFeatureRequest
This will allow to reduce unnecessary expensive calls
when the request has not really changed.
2024-05-31 11:38:05 +02:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
26798b84f4 Promote QgsFeatureRequest enums to enum class, move to Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Sandro Santilli
95be545b81 Add equality/inequality operators for QgsFeatureRequest::OrderBy
Equality useful for unit tests, inequality for completeness
2022-01-31 12:37:52 +10: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
Sandro Santilli
27ae2c9516 Avoid re-preparing geos geometry from QgsVectorLayerFeatureIterator
Does so by exposing a referenceGeometryEngine method to
QgsFeatureRequest and copying the engine rather than creating
a new one on each iteration.
2021-10-18 15:26:33 +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
Nyall Dawson
e6b39077a2
Promote QgsCoordinateTransform::TransformDirection to enum class, move to Qgis
This enum was forcing an include of qgscoordinatetransform.h within the
widely used qgsabstractgeometry.h header, causing an absolute explosion
of includes of a bunch of very heavy header classes all across QGIS. By
removing the forced include we can avoid a ton of unwanted includes
and make wider use of forward declarations...
2021-09-22 16:40:49 +10:00
Nyall Dawson
f3ffe7683d Add note to QgsFeatureRequest::setSubsetOfAttributes methods
to indicate that providers may ignore the subset in certain
circumstances

Refs #44621
2021-08-25 12:54:57 +10:00
Nyall Dawson
686a6e5968 [api] Add option to QgsFeatureRequest to request features
within a certain distance of a reference geometry

E.g. this request will retrieve all features within 50 map units of the
provided linestring:

    QgsFeatureRequest().setDistanceWithin(QgsGeometry.fromWkt('LineString(0 0, 10 0, 12 1)'), 50)

A new enum Qgis::SpatialFilterType has been added to reflect whether
a request uses no spatial filter, a BoundingBox filter (via
setFilterRect), or the new DistanceWithin filter.

Distance within filters are treated like bounding box filters, in
that they are independant of any attribute/id filters (such as
feature ids or expressions).
2021-08-05 14:24:07 +10:00
Nyall Dawson
e416d77270 Add an optional QgsFeedback object for QgsFeatureRequest, and use
this to abort the acquisition of a connection in the OGR
connection pool

Provide a mechanism to avoid a deadlock when multiple OGR iterators
are trying to obtain a connection to a resource at once.

Refs https://github.com/qgis/QGIS/issues/43572
2021-06-19 06:21:51 +10:00
Even Rouault
53ca5b2a31 Extra fixes related to truncation of feature count 2021-06-15 12:40:04 +10:00
Denis Rouzaud
35c557a234 run sipify 2021-05-26 14:30:54 +02:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
c371bc3fe9 Add a QgsFeatureRequest::EmbeddedSymbols flag to indicate that feature level symbology should be fetched 2021-03-06 16:37:46 +10:00
Nyall Dawson
7dfef3a0b1 Newer doxygen versions don't auto convert the first line in a class'
documentation to a brief note, so we have to do it explicitly...
2021-02-19 08:15:29 +10:00
Nyall Dawson
8fa29ac6d2 When we are compiling expressions to handoff to backend providers,
check if a node has already been determined to evaluate to a static,
precalculated value, and if so, use this value for the node instead
of attempting to compile the actual contents of the node itself

If we are certain that a node is static and will never change,
the this potentially allows us to short-cut a large part of the
filter expressions content. We already use this short-cut when
evaluating expressions on the QGIS side since years, and its
proven to be stable and reliable. By respecting this during
expression compilation we can offer a huge speed up to certain
filter expressions, especially those which utilise QGIS variables
which are known to be static (such as atlas variables, map scales,
etc). Previously ANY use of a qgis variable would always cause
expression compilation to fail and require a full set of feature
fetching from the provider.

(Resulted in orders of magnitude faster atlas export for a complex
atlas.)
2021-02-12 06:05:56 +10:00
Nyall Dawson
0aab3073d8 Fix Python based data providers on newer SIP versions 2021-02-08 13:23:37 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Harrissou Sant-anna
ea4f2bbfb9 Making lists in PyQGIS doc look better
and fix some wording
2020-05-20 16:39:42 +10:00
Denis Rouzaud
758d7cff4a run sipify to update deprecation annotations 2019-10-15 13:17:38 +02:00
Sandro Mani
0996c93d09 [Bugfix] Ensure order by attribute indices are valid 2019-03-19 16:22:18 +01:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Denis Rouzaud
699d8487dc
add QgsFeatureRequest::setNoAttributes (#8326)
since it's more convenient than setSubsetOfAttributes( QgsAttributesList() )
2018-10-25 07:35:05 -08:00
Alessandro Pasotti
99f3419446 Extend documentation of QgsFeatureRequest::setSubsetOfAttributes
Like suggested by Nyall
2018-10-19 22:44:31 +02:00
Alessandro Pasotti
5393df88ac Fixed documentation: FetchAttributes does not exist 2018-10-18 17:39:26 +02:00
Nyall Dawson
aa512636f0 Deprecate QgsFeatureRequest::(set)connectionTimeout, replace with
more generic QgsFeatureRequest::timeout
2018-08-18 16:53:32 +10:00
Nyall Dawson
70277635a2 Refine QgsFeatureRequest timeout api, dox 2018-08-06 13:45:33 +10:00
Matthias Kuhn
8dd4b3b270
Rename freeConnectionsRequirement to requestMayBeNested 2018-08-03 09:52:42 +02:00
Matthias Kuhn
14643ad98d
Allow specifying the number of required connections
for a request. Most requests should reserve more
than a single connection (default: 3) and only
requests that are executed as nested expressions
should specify 1.
2018-08-02 13:34:45 +02:00
Denis Rouzaud
65bb60e96c run sipify 2018-05-28 10:39:34 -08:00
Nyall Dawson
9f650fead9 Fix incorrect param docstring when doxygen \param has extra
trailing spaces or uses tabs
2018-05-27 18:54:09 +10:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00
Nyall Dawson
c864d22d1f Add "get ..." to doxygen compliance blacklist
Should be "gets ..." for consistent tense, or better yet
"returns ..." for consistency.
2018-05-27 14:05:06 +10:00
Nyall Dawson
1c615c15cc More documentation compliance
Use Qt style "returns .." tense instead of "return ..", and lock
this in with a documentation compliance unit test
2018-05-25 15:09:00 +10:00