91 Commits

Author SHA1 Message Date
Nyall Dawson
4a6fef278e Cleanup docs, don't mention QString in python docs 2025-04-19 18:17:34 +10:00
Nyall Dawson
161ef62ca0 Fix inconsistent heading warnings when building PyQGIS docs
Fixes missing subclass/base class sections in some class docs (
eg QgsVectorLayer)
2025-04-19 18:17:34 +10:00
Nyall Dawson
9435a84ff7 sipify 2025-04-03 01:05:31 +10:00
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Nyall Dawson
4a10066b69 Fix grammar errors in class docstrings 2025-04-01 09:44:00 +10:00
Nyall Dawson
6d122f0038 Sipify 2025-03-30 20:48:07 +10:00
Nyall Dawson
29050007d7 Fix class documentation which starts with "this is..."/"a class..." etc 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
b39f760cbc
Correctly handle multiline SIP_OUT param documentation 2024-09-10 11:11:25 +10: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
765cbb32db Standardise some deprecated annotations 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
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Julien Cabieces
848fb16785 Add \deprecated tag 2024-05-31 08:46:33 +10:00
Julien Cabieces
97f1c8df97 make python API backward compatible 2024-05-31 08:46:33 +10:00
Julien Cabieces
0ccaf2d299 sipify 2024-05-31 08:46:33 +10: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
77f8b83ac0 Minor optimisations to QgsExpressionNodeFunction construction 2023-08-04 11:59:37 +10:00
Nyall Dawson
08b8c6d7be Improve cost of QgsExpression::functionIndex
This is called a LOT! Optimise the function by avoiding multiple
list copies and by caching previous found function indexes
2023-08-04 11:59:37 +10:00
Denis Rouzaud
5bccd556e2
move QgsTolerance::UnitType to Qgis::MapUnitType (#53347)
* move QgsTolerance::UnitType to Qgis::MapUnitType

* missing forward declaration

* forward declaration

* use MapToolUnit

* forward declaration

* sipify

* fix tests

* Apply suggestions from code review

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* forward declaration

* forward declaration

* forward declaration

* sipify

* fix missing parenthesis

---------

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2023-06-06 18:33:50 +02:00
Nyall Dawson
2ef0734913 Add test to ensure help examples are valid expressions 2023-04-12 09:51:36 +10:00
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10:00
Nyall Dawson
f88c0c3a4c Sipify 2023-01-09 14:35:50 +10:00
Nyall Dawson
b23eb1d250 [feature] New function "load_layer"
This function (available only in Processing expressions for now),
allows loading a map layer via a source string and provider name.

It is designed to allow use of the expression functions which
directly reference map layers (such as the aggregate functions)
with a hardcoded layer path, eg. then permitting these functions
to be used outside of a project (such as via the qgis_process tool)
2023-01-09 14:35:50 +10: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
Alessandro Pasotti
34f0e59735 Address PR review comments and handle NULLS
Refactor the evaluation code, handle NULLs to
return a boolean when it is possible.
2022-03-15 12:13:42 +01:00
Alessandro Pasotti
ba28631d33 NULL between tests 2022-03-14 14:19:53 +01:00
Alessandro Pasotti
7601250a54 SQL expression compiler and more tests for BETWEEN 2022-03-14 14:19:52 +01:00
Alessandro Pasotti
c8d55607ea BETWEEN expression
TODO: type casting, SQL compiler, help text
2022-03-14 14:19:52 +01:00
Nyall Dawson
2f74a24eeb Fix typo 2022-02-01 08:23:29 +10:00
Alex
73e036ebdb Correctly handle sort field as field in atlas sorting
Fixes #40332
2022-02-01 08:23:29 +10:00
Denis Rouzaud
4b3c50d59e add optional type parameter to QgsExpression::createFieldEqualityExpression 2021-11-08 09:18:19 +01: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
Etienne Trimaille
4284beb004 Add API in expression to set help string on a variable 2021-10-16 06:36:15 +10: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
Vincent Cloarec
45e07dd72f
Select mesh elements by expression UI (#44835)
[mesh] [feature] Select mesh elements by expression
2021-09-09 08:29:45 +02:00
Vincent Cloarec
bc192a60b2
Mesh expressions: add $vertex_as_point and $vertex_z functions (#44786)
* mesh expression $vertex_as_point $vertex_Z_value

* functions help

* SIP, doc and indentation

* fix SIP

* fix help file

* change function name and add Meshes group description

* fix typo

* fix strings and docs

* typo
2021-08-24 20:56:16 +02:00
Nyall Dawson
4d5014deae Add QgsExpression utility function to match an expression or field name string to a layer's field index 2021-08-12 03:26:46 +10:00
Nyall Dawson
76c7d11ba9 More dox fixes 2021-06-10 05:57:26 +10:00
Nyall Dawson
e262f1456c Fix layout checks 2021-06-10 05:57:26 +10:00
Nyall Dawson
0a4b9a62cf [optimization][expressions] Simplify "CASE WHEN..." expressions
during preparation wherever possible

In many situations we are able to optimize a case when expression
and replace it with a simpler expression node during the preparation
stage. Specifically, if the WHEN conditions are known to be
static values (such as those coming from certain expression context
variables) then we can often replace the whole condition node
with the THEN node of the first static true condition.

E.g.

    CASE
        WHEN @variable=1 THEN "first_field"
        WHEN @variable=2 THEN "second_field"
        ELSE "third_field"
    END

If @variable is static and '1', then the whole expression node will ALWAYS
be identical to "first_field". Similiarly if @variable='2', then the
whole expression will ALWAYS be "second_field".

If we're able to apply this optimization, then we use the simplified
effective node which represents the whole node during evaluation
time and save a bunch of unnecessary work.

TODO: If we use the effective node during expression compilation
for providers we would be able to handoff more expressions involving
QGIS-side variables and other components to the backend, resulting
in increased use of backend provider indices, etc....
2021-06-10 05:57:26 +10:00
Nyall Dawson
1bcb09abe6 __repr__ for some QgsExpressionNode subclasses 2021-06-10 05:57:26 +10:00
Denis Rouzaud
35c557a234 run sipify 2021-05-26 14:30:54 +02:00
Nyall Dawson
ffa99b7b64 Fix doxygen blocks which don't use the * prefix on all lines, which
prevents the auto format and sipify scripts from doing their full
formatting magic
2021-04-19 12:54:13 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00