Nyall Dawson
2f4e5f0269
Mark QgsOptional bool operator as explicit
...
And reimplement for Python
2024-10-16 10:51:47 +10:00
Nyall Dawson
b5fa8d51fb
Mark QgsProperty bool operator as explicit
...
And reimplement in Python, as sip can't handle explicit bool
operator from c++
2024-10-16 10:51:47 +10:00
Nyall Dawson
8a61127bd0
Fix exception with older shapely versions
2024-10-08 14:33:57 +10:00
merydian
a7621a2e54
Use QByteArray.data() for as_shapely
2024-09-30 13:22:21 +10:00
merydian
bb6ec91291
Improve performance of as_shapely
...
By utilizing QgsGeometry.asWkb() this is ~8.45 times faster than the previous implementation.
2024-09-30 13:22:21 +10:00
merydian
82772b7865
Place shapely related things in separate try statement
2024-09-30 13:22:21 +10:00
merydian
bbf6bc5e11
Implement QgsGeometry.as_numpy and .as_shapely
2024-09-30 13:22:21 +10:00
Denis Rouzaud
eafa4b48b2
fix Python API compatibility ( #58860 )
...
* fix Python API compatibility
* Update qgis.h
2024-09-25 07:06:11 +02:00
Nyall Dawson
a6f5c50b36
Move some style related enums out of global namespace
2024-08-31 06:20:02 +10:00
merydian
1b892d683f
Add suggestions
2024-08-21 09:05:41 +10:00
merydian
21a276fff2
Implement QgsRasterLayer.as_numpy
2024-08-21 09:05:41 +10:00
Nyall Dawson
41f8db6503
Don't leak typing into qgis.core
2024-08-20 16:40:32 +02:00
Nyall Dawson
262ade625e
Don't leak LinePlacementFlags
2024-08-19 11:16:01 +02:00
Nyall Dawson
98f3ca0650
Don't leak mapping functions into core
2024-08-19 11:16:01 +02:00
Nyall Dawson
1c119bde15
Avoid leaking processing repr into core
2024-08-19 11:16:01 +02:00
Nyall Dawson
fa518f6795
Don't leak fromFunction into core
2024-08-19 11:16:01 +02:00
Nyall Dawson
3dbbb16aa6
Don't leak range repr functions into qgis.core
2024-08-19 11:16:01 +02:00
Nyall Dawson
85df8609c5
Don't leak dummy DirectionSymbols class into core
2024-08-19 11:16:01 +02:00
Nyall Dawson
deeada9a54
Avoid leaking more helper functions into qgis.core
2024-08-16 07:28:46 +10:00
Nyall Dawson
0bca48ddca
Add docs for exception classes
2024-08-16 07:28:29 +10:00
Nyall Dawson
faa4670f4c
Add docs for as_numpy
2024-08-15 13:38:54 +10:00
Nyall Dawson
83c58995b3
Don't leak numpy import into qgis.core
2024-08-15 13:38:54 +10:00
Till Frankenbach
93770eca37
Add Method to Convert QgsRasterBlock to NumPy Array ( #58232 )
2024-08-14 10:16:40 +02:00
Nyall Dawson
3aae3a9ee4
Remove redundant duplicate enum
2024-06-06 13:57:48 +10:00
Nyall Dawson
587a80dcc2
Move label quadrant setting to QgsLabelPointSettings
2024-05-23 17:20:30 +10:00
Nyall Dawson
65ba3ddfef
Cleanup QgsRasterTransparency API
...
- Make classes less like to be created with uninitialized members
- Use opacity instead of transparency, to match API from elsewhere in
QGIS
2024-03-04 07:25:51 +10:00
Even Rouault
f36caa7274
[Qt6] Fix crash with Python on QgsLocatorResult::userData ( fixes #56456 )
2024-02-28 06:04:20 +10:00
Nyall Dawson
2357d80d25
Avoid sip property code for old api compatibility
...
This causes crashes on Qt6. Use Python monkey patching instead.
2024-02-17 05:38:14 +10:00
Nyall Dawson
e95ec5bae9
Fix compatibility
2024-02-04 05:54:31 +10:00
Nyall Dawson
6df159f2a2
Add missing compatibility code
2024-02-04 05:54:31 +10:00
Nyall Dawson
3e07b06d87
Fix broken old API compatibility code on Qt 6 builds
...
The old sip based approach to handling property -> getter/setter
conversion is broken on sip6, so move the patching into Python.
Also fix incorrect checks in tests, and add additional test
for compatiblity code.
2024-02-04 05:54:31 +10:00
Nyall Dawson
ef4f8efdcc
Remove unused 2018 WKT variants, monkey patch for api compatibility
2024-01-17 10:16:32 +10:00
Julien Cabieces
3e27ac5985
[PyQt6] Build PyQt6
2024-01-16 12:18:11 +10:00
Nyall Dawson
a39b5df615
Rename mesh "3d" classes to "3D" and monkey patch compatibility
2023-07-20 15:31:00 +10:00
Nyall Dawson
5967344117
Rename QgsBox3d to QgsBox3D for consistency, monkey patch in old
...
name for PyQGIS compatibility
2023-07-20 15:31:00 +10:00
Nyall Dawson
888dc334f5
Remove duplicate enum
2023-05-15 16:38:52 +10:00
Nyall Dawson
1142e8ffac
Move QgsMapLayerType enum to Qgis.LayerType ( #51874 )
...
For consistency with other enums
2023-02-16 13:02:57 +01:00
Nyall Dawson
6453d5f35a
Condense duplicate enums
2021-10-23 05:16:41 +10:00
Nyall Dawson
9752abe10b
Fix python startup
2021-10-23 05:16:41 +10:00
Nyall Dawson
75c787a4e6
Fix API break
2021-08-04 09:54:32 +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
Damiano
1def5e7b94
Python QgsSettingsEnum and Flag unified in QgsSettingsEnumFlag
2021-04-26 15:10:53 +02:00
Damiano
3c5f9b1e91
Python implementation for QgsSettingsEntryEnum/Flag and fixed docstrings
2021-04-07 14:02:08 +02:00
Nyall Dawson
4fe99d8d6c
Add better __repr__ methods for QgsDateTimeRange, QgsDateRange
2021-03-25 08:01:51 +10:00
Nyall Dawson
a913a6aa5a
Create RAII QgsScopedRuntimeProfile class and Python context manager
...
to ease logging of runtime profiles.
Now it's possible to do:
with QgsRuntimeProfiler.profile('My operation'):
# do something
to automatically handle everything required to log the operation runtime
2020-05-19 04:35:34 +10:00
nirvn
60ee76bc69
Followup 1f3b039: fix wrong monkey patched var name
2019-11-05 16:03:25 +07:00
Matthias Kuhn
f9804eb6ce
Python fixes
2019-11-02 15:02:00 +01:00
Matthias Kuhn
abf9880182
Cleanup python code
2019-11-02 15:01:59 +01:00
Matthias Kuhn
a50287514b
Q_GLOBAL_STATIC for QgsDataProvider
2019-11-02 15:01:59 +01:00
Martin Dobias
90910b0447
Patch QgsProviderMetadata in Python to avoid API break
...
In C++ we do not support QgsProviderMetadata(key, description, createFunc) anymore,
but for python code we can have a patched class that still supports createFunc.
Why not keep the variant with createFunc in C++ as well? Because... SIP!
With newly added virtual methods in QgsProviderMetadata, SIP started to generate
a sip-specific subclass to handle derived classes in Python, however due to the variant
with PyObject* and custom MethodCode it was getting confused about what constructors
are available in C++ and failing to compile.
2019-06-21 18:27:36 +02:00