142 Commits

Author SHA1 Message Date
Nyall Dawson
fdcda15365 [api] Create elevation profile manager, attached to QgsProject
This mimics QgsLayoutManager, but for storage of elevation profiles
attached to a project
2025-08-17 04:26:36 +10:00
Nyall Dawson
f7022ab92e Add missing docs 2025-08-03 08:56:23 +10:00
Nyall Dawson
c61aa54ea3 Documentation fixes 2025-08-03 08:56:23 +10:00
Nyall Dawson
c686bb1f88 Generalise proxy model to support generic attached objects 2025-08-03 08:56:23 +10:00
Nyall Dawson
231b95bc45 Generalise QgsLayoutManagerModel to template class for project stored objects
Allows us to re-use the model for other attached object types
2025-08-03 08:56:23 +10:00
Nyall Dawson
cacdea42fd Create abstract base class for managers for objects attached to QgsProject
This generalizes the logic from QgsLayoutManager, so that additional
manager classes handling other object types can be added without
incurring a lot of near-duplicate code.

This is a step toward allowing storage of elevation profiles
within projects.
2025-08-03 08:56:23 +10:00
pathmapper
7181b40dea Add check for empty maptips to the project validator 2025-06-09 10:15:16 +02:00
Jean Felder
a00f47c773 qgsproject: Add a sip removeMapLayers code to fix qt6 version
With this new method code, it is now possible to use
`QgsProject::removeMapLayers` with a list of layers or a list of
layers IDs in qt5 and qt6.

Co-authored-by: bdm-oslandia <benoit.de.mezzo@oslandia.com>
2025-05-01 10:33:58 +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
afd2e4f42d Fix doxygen class briefs which aren't full sentences 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
Nyall Dawson
a2db8cf453 Add QgsProject setting for scale calculation method
Exposes the same methods as are available for layout scale bars,
and can be set for a particular project in the project properties
dialog
2025-03-30 18:03:30 +10:00
Nyall Dawson
632d196e62 Don't show useless "available in python as" notes in PyQGIS docs
Since the method name used in the docs is ALREADY the python version!
2025-02-28 18:32:09 +10:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Nyall Dawson
37478db0c1 Fix more function links 2024-12-03 12:57:44 +10:00
Juho Ervasti
47b812bb9b
Don't allow non-polygon avoid intersection layers (#59331) 2024-11-05 06:41:56 +01:00
Nyall Dawson
6b3eefd115 Add test blocking any new introduction of QgsProject::instance() in core 2024-10-19 06:22:04 +10:00
Nyall Dawson
f61e33da4e Doxygen comments should use "NULLPTR", not "NULL"
NULLPTR will get correctly formatted in both c++ and Python docs
2024-09-19 09:55:44 +10:00
Denis Rouzaud
281726250f
Merge pull request #58354 from gacarrillor/save_functions_in_project
[feature] Allow users to save expression functions in QGIS project file
2024-09-13 17:39:40 +02:00
Nyall Dawson
b39f760cbc
Correctly handle multiline SIP_OUT param documentation 2024-09-10 11:11:25 +10:00
Nyall Dawson
cfd251e7f7 Capture signal arguments 2024-09-08 16:06:22 +10:00
Germán Carrillo
c5286e4dcc [core] Address review: Move loadFunctionsFromProject and cleanFunctionsFromProject to QgsProject::read and ::clear, respectively. Introduce function pythonEmbeddedInProjectAllowed to ask for permissions to load both macros and expression functions, with a parameter enum and rename existing enum for macros. Sort includes. Drop not needed file. Add python/expressions/ to gitignore, to get rid of files produced by the introduced Python test. 2024-09-05 23:07:37 -05: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
49d31fa527 Fix some malformed docs 2024-08-30 05:47:07 +10:00
Nyall Dawson
a478545108 Fix bad docs 2024-08-28 11:58:21 +10:00
Nyall Dawson
088aea0d0d Fix incorrect use of inline returns 2024-08-28 11:58:21 +10:00
Nyall Dawson
8b04562ba7 Avoid fragile reg for argument removal 2024-08-14 13:05:46 +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
6d829ff7b4 Drop some more no value documentation 2024-07-25 04:02: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
43062c8833 fix(CMYK): treat review comments 2024-07-11 21:13:42 +10:00
Julien Cabieces
7e527d182b feat(CMYK): add API color model and profile methods to project
API allows to define a color model without a color space. If both are
set, consistency between defined color model and color space one is
checked (only in Qt version 6.8.0 or greater because it's not possible
to retrieve color model from color space before that)
2024-07-11 21:13:42 +10:00
Mathieu Pellerin
f9d3ca3afe [qml] Add missing QgsProject's transactionMode property 2024-06-02 07:32:36 +07:00
Nyall Dawson
6ee262f401 Add option to invert the elevation filter widget
If checked, this option reverse the slider in the elevation filter
so that the widget goes from high values at the bottom to low values at the top.

See justification in https://github.com/qgis/QGIS/issues/56995

Fixes #56995
2024-05-01 13:48:19 +10:00
Nyall Dawson
1698bd3391 Store elevation filter fixed range size in project
Remember this setting between sessions for a project
2024-05-01 13:48:19 +10:00
Nyall Dawson
264f426ba9 Expand documentation 2024-04-26 20:26:41 +10:00
Nyall Dawson
9f2b519d7e [api] Add QgsProject::crs3D
Returns the CRS to use for the project when transforming 3D data,
or when z/elevation value handling is important.

The returned CRS will take into account verticalCrs(), e.g. by
returning a compound CRS consisting of crs() + verticalCrs().

This method may still return a 2D CRS, e.g in the case that crs()
is a 2D CRS and no verticalCrs() has been set for the project.
I.E. It is NOT guaranteed that the returned CRS will actually
be a 3D CRS, but rather it is guaranteed that the returned CRS
is **ALWAYS** the most appropriate CRS to use when handling 3D data.
2024-04-26 20:26:41 +10:00
Nyall Dawson
b5a8722446 Improve documentation 2024-04-10 09:05:23 +10:00
Nyall Dawson
37c69d1b60 Add validation to calls to QgsProject.setVerticalCrs 2024-04-10 09:05:23 +10:00
Nyall Dawson
e2a3edc76d [api] Add vertical crs option to QgsProject
If the project crs() is a compound CRS, then the CRS returned
by QgsProject::verticalCrs()  be the vertical component of
QgsProject::crs(). Otherwise it will be the value explicitly
set by a call to setVerticalCrs().

The vertical crs is a persistent property of a project, which
is saved/restored to xml.
2024-04-10 09:05:23 +10:00
Nyall Dawson
07294f7252 Add elevation range to QgsProjectElevationProperties
And expose through Project Properties elevation settings widget

This setting allows users to specify the upper and lower
elevation limits associated with the project. (I.e. its an
equivalent to QgsProjectTimeSettings::temporalRange)
2024-03-09 06:57:53 +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
Even Rouault
a5c8f01003
Header files: remove all mentions of '\since QGIS 1.' 2024-02-18 20:46:00 +01:00
Nyall Dawson
de532a62aa Fix doxygen warning 2024-02-06 21:04:43 +10:00
Nyall Dawson
ac2f1179c8 More item data role enum to enum class conversions 2024-02-06 21:04:43 +10:00