23397 Commits

Author SHA1 Message Date
Julien Cabieces
48e2043505 fix new deprecated iconForField and typeToDisplayString methods 2024-05-31 08:46:33 +10:00
Julien Cabieces
ad13ae8b32 fix doc TODO 2024-05-31 08:46:33 +10:00
Julien Cabieces
848fb16785 Add \deprecated tag 2024-05-31 08:46:33 +10:00
Julien Cabieces
1170aa15ee fix since rebase 2024-05-31 08:46:33 +10:00
Julien Cabieces
255d46230a sipify 2024-05-31 08:46:33 +10:00
Julien Cabieces
71e0b7ffcd manual fix rasterattibutetable 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
Jean Felder
2682a2ee2d qgs3dmapsettings: Fix extent methods documention
The 3D scene's CRS is not necessarily the same as the project's
CRS. For example, it can be "EPSG:3857" if the project's CRS is
geographic.

The stored extent in the settings is always the 3D scene's extent.

See:
b0d1a4f8b1
2024-05-30 05:28:33 +10:00
lpofredc
0547b71180 fix #57590 2024-05-29 12:02:42 +10:00
Nyall Dawson
e2157cfe1f Promote FieldOrigin to enum class, move to Qgis 2024-05-27 08:50:16 +02:00
Nyall Dawson
fce4ed06b8 Split fragments on tab characters 2024-05-25 06:10:28 +10:00
Nyall Dawson
25f00e2560 Don't try to render empty text strings 2024-05-25 06:10:28 +10:00
Nyall Dawson
f5853a7212 Add tab stop distance to QgsTextFormat 2024-05-25 06:10:28 +10:00
Nyall Dawson
0c41c22343 Fix bad merge 2024-05-24 16:34:33 +10:00
Nyall Dawson
6185675c93 Additional shortcut to QgsAttributes creation from Python
Avoid constructing a bunch of default QVariant objects which
we will just replace immediately
2024-05-24 16:34:33 +10:00
Nyall Dawson
280cd84652 Add more HoldGIL annotations to cheap methods 2024-05-24 16:34:33 +10:00
Nyall Dawson
8941bbf599 Optimise QgsAttributes python constructor
Avoid multiple checks for detachment for each attribute
2024-05-24 16:34:33 +10:00
Germán Carrillo
2768e41f0a Adjust docstring in qgsgeometryutils_base.h 2024-05-24 07:30:09 +10:00
Julien Cabieces
eaa0261c5d
Merge pull request #57361 from troopa81/cmyk_colorwidget
[ColorWidget] Add CMYK support
2024-05-23 18:03:52 +02:00
Nyall Dawson
fe74b300be [feature] Add maximum distance setting for point labels
For the "Around point" and "Cartographic" placement modes, this
adds a new optional setting for the maximum distance of the labels from
the feature. It's used together with the existing distance setting
to define a range of distances at which labels may be placed
from their corresponding point features.

This adds more flexibility to the placement for these layers,
ultimately allowing for more labels to be placed in busy maps.

When the layer is set to the "around point" mode, then label
candidates which are closer to the point will always be prefered
over those which are further away.

When the layer is set to the "cartographic" mode, then the default
behavior is also to prioritize closer labels. A new combo box
allows users to control the priority, with an option for
prefering position ordering. If this option is set, then candidates
at the corresponding positions (eg top left) are preferred regardless
of how far they are from the point, with the labelling falling
back to alternate positions only when no labels can be placed
up to the maximum label distance.

Sponsored by Rubicon Concierge Real Estate Services
2024-05-23 17:20:30 +10:00
Nyall Dawson
587a80dcc2 Move label quadrant setting to QgsLabelPointSettings 2024-05-23 17:20:30 +10:00
Nyall Dawson
49cbe3bec3 Better documentation 2024-05-23 17:20:30 +10:00
Nyall Dawson
24cc226a64 Expose a useful method to python 2024-05-23 17:20:30 +10:00
Nyall Dawson
dda755d058 Move predefined position order member to QgsLabelPointSettings 2024-05-23 17:20:30 +10:00
Nyall Dawson
e81fcd0b09 Start on QgsLabelPointSettings class 2024-05-23 17:20:30 +10:00
Even Rouault
9c989ee84c Add a QgsTaskWithSerialSubTasks class 2024-05-23 11:49:49 +10:00
Mathieu Pellerin
8413982ad6 Let the signal carry whether a feature has been found, that might come in handy 2024-05-23 11:00:34 +10:00
Mathieu Pellerin
8c389cf613 [attribute form] Fix initial multi editing state of relation reference editor widgets 2024-05-23 11:00:34 +10:00
Jean Felder
f630efa59c qgsfeature: Optimize __set_item__ python call
This change is similar to the one done for `setAttribute`.
2024-05-23 05:15:16 +10:00
Jean Felder
27ebce6dad qgsfeature: Optimize setAttribute python call
This change is similar to the one introduced in the previous
commit for `QgsAttributes` . The python call of `setAttribute` expects
a `QVariant` as input. sip is able to directly handle `QVariant` but
this allocation can be slow.

In some cases, it is possible to speed-up the `setAttribute` call by
checking the type of the attribute. If the attribute is a boolean, an
integer, a float or a string, it is possible to avoid the intermediate
sip QVariant allocation done by `sipConvertToType`.

Based on some testing, this allows to speed-up a python `setAttribute`
call up to 80%. If the python attribute is already a `QVariant`, then
one get the same time.
2024-05-23 05:15:16 +10:00
Jean Felder
0446f85409 qgsattributes: Optimize QgsAttributes python allocation
The python `QgsFeature.setAttributes()` calls is relatively slow
because of the call to `sipConvertToType` which needs to make in
intermediate allocation for each attribute QVariant creation.

This change aims to speed up this call by avoiding the call to
`sipConvertToType` for the most common types.
The change itself is quite simple. If the input attribute is a
boolean, an integer, a string or a floating, a QVariant is directly
created by using the python C API instead of calling
`sipConvertToType`.

Based on some testing on lists which can contain between 5 and 10
elements, I have measured an acceleration up up to 70%.
2024-05-23 05:15:16 +10:00
Julien Cabieces
a6dd92abd8 Update and test cmyk radio buttons 2024-05-22 19:40:29 +02:00
Julien Cabieces
3bcfa9568b replace isCmyk with colorSpec 2024-05-22 19:40:29 +02:00
Julien Cabieces
4bd56fa0f8 feat(ColorWidget) : Add CMYK support
A new setting activeCmykComponent has been introduced, while the old
one activeComponent refers now only to the Rgb/Hsv part
2024-05-22 19:39:55 +02:00
Nyall Dawson
90fbb5383b [qt6] Add compatibility imports for QActionGroup
This moved from widgets -> gui in qt6
2024-05-22 09:32:52 +02:00
Nyall Dawson
80b61d3d52 Add constBits methods to QgsRasterBlock
These can avoid an unwanted QImage detach when we are just
reading block data and don't need to modify it
2024-05-22 14:28:12 +10:00
Nyall Dawson
fb1eabbf0b const correct method 2024-05-22 14:28:12 +10:00
Nyall Dawson
7a3bf17bf1 Provide detailed error message when creating GeoPDF from layout fails
Instead of a generic message (which is not very helpful), show the
full error message we receive from GDAL to the user
2024-05-22 14:28:03 +10:00
Germán Carrillo
127ec157e9 [profile] Address review 2024-05-22 13:44:52 +10:00
Germán Carrillo
c20fec2aca Update SIP file for PyQt6 2024-05-22 13:44:52 +10:00
Germán Carrillo
65ad23a769 [core] Introduce QgsProfileSourceRegistry to store sources other than map layers, e.g., based on web services 2024-05-22 13:44:52 +10:00
Even Rouault
07067d37b5 python/plugins: turn on GDAL exceptions to avoid deprecation warning
Fixes #57344
2024-05-22 13:34:35 +10:00
Nyall Dawson
cbd25c1fdd Promote QgsColorRampShader enums to enum class, move to Qgis 2024-05-22 12:37:44 +10:00
Nyall Dawson
04665953ed Also add variant which takes a list of layers 2024-05-20 11:52:10 +02:00
Nyall Dawson
c79168a6bc Add elevation utils method to collect significant elevation values for a project 2024-05-20 11:52:10 +02:00
Nyall Dawson
c8d66e1e8d Add method to retrieve significant elevation values from a layer 2024-05-20 11:52:10 +02:00
Nyall Dawson
027cd208f2 Add API to show additional elevation labels in elevation filter widget 2024-05-20 11:52:10 +02:00
Nyall Dawson
91c17de4d5 Correct handle many-to-one and one-to-one relationships in expansions 2024-05-16 15:14:49 +10:00
Nyall Dawson
08451d7dc6 Fix build on older sip 2024-05-16 15:14:49 +10:00