459 Commits

Author SHA1 Message Date
Alessandro Pasotti
81357cba0b QgsRasterBlock::printValue add localized argument 2024-06-18 10:32:29 +02:00
Nyall Dawson
0931624dea Add (non-exposed) setting for the external Python editor
This isn't exposed in the GUI, but allows users to
set a specific editor command to use when opening
Python files in the external editor.

Use the token <file> to insert the filename, <line>
to insert line number, and <col> to insert the column number.

Eg:

  QgsSettings().setValue(
    'gui/code-editor/python/external-editor',
    'kate -l <line> -c <col> "<file>"')
2024-06-15 09:01:33 +10:00
Nyall Dawson
f23caeef50 Leave null QByteArray values as QByteArray() to maintain API
These should probably be returned as None or NULL for consistency,
but let's not break API right now...
2024-06-13 05:59:14 +10:00
Nyall Dawson
1a56be8cf8 Faster null conversions 2024-06-13 05:59:14 +10:00
Nyall Dawson
e85583fd7b Optimise QgsFeature __getitem__
Avoid calling expensive sipConvertFromNewType method when feature
attribute is a trivial type
Also avoid a copy of the feature attributes which we don't require
2024-06-13 05:59:14 +10:00
Nyall Dawson
f1c76432d5 Don't copy feature attributes just to get their length
Use attributeCount() directly instead
2024-06-13 05:59:14 +10:00
Nyall Dawson
d4ddd04efe Add missing HOLDGIL annotation for QgsGeometry::isEmpty 2024-06-12 13:50:13 +02:00
Nyall Dawson
e7bff1f50e Avoid API break 2024-06-11 07:45:09 +10:00
Nyall Dawson
0b41123cb9 Add SIP_OUT 2024-06-11 07:45:09 +10:00
Nyall Dawson
c7e3ff09a4 Partially address API limitations, and add a bunch of QGIS 4 TODOs
We can't fix the API without a significant break here.
2024-06-10 19:54:48 +10:00
Nyall Dawson
6a018f65f5 Move responsibility for opening files in external editor to QgsCodeEditorWidget
This allows the editor to be opened in a proper detached process,
avoiding the editor being closed when QGIS is exited.

Move to a blocklist for terminal text editors instead of the fragile
polling approach (which eg doesn't work if the editor is set to
pycharm)
2024-06-07 20:46:45 +10:00
Nyall Dawson
e42dc886aa Move file path handling for console editor to QgsCodeEditorWidget 2024-06-07 20:46:45 +10:00
Nyall Dawson
1c60403286 Add testOnly option to parameterAsOutputLayer
If true, then the evaluated result won't be treated as an actual layer to load
2024-06-07 18:44:29 +10:00
Nyall Dawson
a845d4956c Fix add feature dialog does not restore position when shown modally
The logic to restore the position was incorrectly placed in ::show(),
which is not called when the dialog is being displayed modally via
::exec()
2024-06-07 08:11:01 +10:00
Nyall Dawson
756cb0552e [sensorthings] Use reasonable entity-specific defaults for expansions 2024-06-06 16:54:37 +10:00
Nyall Dawson
501a6a23f0 [sensorthings] Filter should be configurable on each expansion level
Filters must be configurable for each individual expansion level,
as we can't achieve the same results by a single top-level filter.
For instance, this prevents filtering children from the expansion
to return just the most recent observation.
2024-06-06 16:54:37 +10:00
Nyall Dawson
848af75957 Add QGIS 4.0 TODO 2024-06-06 13:57:48 +10:00
Nyall Dawson
9e0e257504 Deprecated unused method 2024-06-06 13:57:48 +10:00
Nyall Dawson
ffd504e0d4 BuildPyramids should be a provider capability, not an interface capabilitiy 2024-06-06 13:57:48 +10:00
Nyall Dawson
79150d1d5c Add some notes for 4.0 cleanups 2024-06-06 13:57:48 +10:00
Nyall Dawson
859a0ece06 Deprecate RasterInterfaceCapabilities which are unused 2024-06-06 13:57:48 +10:00
Nyall Dawson
3da2f533d5 Make raster data provider capabilities an enum class 2024-06-06 13:57:48 +10:00
Nyall Dawson
a7a19a7fc0 Don't use raw int for QgsRasterInterface capabilities 2024-06-06 13:57:48 +10:00
Nyall Dawson
2220473b4a Fix accidental paste 2024-06-06 13:57:48 +10:00
Nyall Dawson
3aae3a9ee4 Remove redundant duplicate enum 2024-06-06 13:57:48 +10:00
Nyall Dawson
43e7d18cd8 Move simplification enums to Qgis, promote to enum class 2024-06-06 13:57:48 +10:00
Nyall Dawson
3ace4676fa Improve results when using path stroking
Use GEOS to do the path stroking
2024-06-05 11:06:10 +10:00
Nyall Dawson
4eb35e466d Add hidden QSettings switch to use a QgsGeometry/GEOS backend for label masking
If the 'map/maskBackend' QSettings key is set to 'geometry', then
QgsGeometryPaintEngine will be used for calculating clip paths
for label masking instead of QPainterPath

The intention here is that we gain improved flexibility to optimise
the creation and logic behind clipping path generation, vs the
limited API we get from QPainterPath.
2024-06-05 11:06:10 +10:00
Nyall Dawson
9626644c7c Add option to remove redundant vertices in QgsAbstractGeometry::snappedToGrid
If opted in, then vertices which form a midpoint of a straight line segment will be removed in the output
2024-06-04 21:33:29 +10:00
Jacky Volpes
ab663b485b Use WkbType instead of GeometryType enum for addPart
Deprecating QgsGeometry::addPart in favor of QgsGeometry::addPartV2
to use Qgis::WkbType instead of Qgis::GeometryType because the latter
can't handle curved geometries (not specific enough).

Fixes #57255
2024-06-03 19:40:48 +02:00
Mathieu Pellerin
2c38dc8cbd
Merge pull request #57271 from nirvn/current_parent
[attribute form] Add parent feature scope when adding/editing a child feature through the relation editor widget
2024-06-03 13:39:10 +07:00
Nyall Dawson
b43537680c Add API to add list of geometries to collections
More efficient then adding one by one, and allows for efficient
transferral of geometries when pared with the new takeGeometries
method.
2024-06-03 14:38:57 +10:00
Nyall Dawson
27a2bcf064 Add API to take geometries from a collection
Removes the geometries from the collection and returns ownership
to the caller.

Can be used to avoid clones in some scenarios.
2024-06-03 14:38:57 +10:00
Mathieu Pellerin
96a711a2ae Address review: add vector layer tools context class, implement addFeatureV2 2024-06-03 11:05:58 +07:00
Mathieu Pellerin
83d61b5458 [atribute form] Add parent context when editing a child feature through the relation editor widget 2024-06-02 16:03:13 +07:00
Mathieu Pellerin
54e3668edd [attribute form] Add parent feature scope when adding a child feature through the relation editor widget 2024-06-02 16:03:13 +07:00
Mathieu Pellerin
f9d3ca3afe [qml] Add missing QgsProject's transactionMode property 2024-06-02 07:32:36 +07:00
Nyall Dawson
94b6003e3c Add list constructor for QgsMultiLineString too 2024-06-01 19:28:50 +10:00
Nyall Dawson
2871f5b8af Add constructor to directly create QgsMultiPolygon from list of polygons 2024-06-01 19:28:50 +10:00
Alessandro Pasotti
058601dcd5
Merge pull request #57630 from elpaso/qgsfeaturerequest-compare-method
[api] Add compare methods to QgsFeatureRequest
2024-06-01 11:04:36 +02: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
Nyall Dawson
b89abdb64b Create optimised paint device to QgsGeometry converter 2024-05-31 15:02:35 +10:00
Nyall Dawson
0a493a0443 Move core painting related files to src/core/painting 2024-05-31 15:02:35 +10:00
Julien Cabieces
48bd417ded update qgsfield after rebase 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