672 Commits

Author SHA1 Message Date
Nyall Dawson
9181953df7 Add method to collect symbol layer clip geometries intersecting given bounds 2024-06-21 23:10:32 +10:00
uclaros
f82e803317 preserve MDAL mesh metadata when editing mesh layers 2024-06-21 12:29:11 +02:00
Nyall Dawson
5d81083c91 Add note about raster based exports 2024-06-20 05:41:37 +10:00
Nyall Dawson
f8172c48ed Add function to test whether clip geometries exist for a symbol layer 2024-06-20 05:41:37 +10:00
Nyall Dawson
32b62447f6 Add on-the-fly simplification support to QgsGeometryPaintDevice 2024-06-20 05:41:37 +10:00
Nyall Dawson
e931b9ade6 Add mask render settings to QgsMapSettings/QgsRenderContext
And API mechanism to propagate these from layout exports down
to the render context

Gives us a place to specify fine-tuned control over masking
settings for map renders
2024-06-20 05:41:37 +10:00
Nyall Dawson
102874e6d2 Port geos simplify linestring
Add QgsAbstractGeometry::simplifyByDistance, which is a direct
port of GEOS Douglas Peucker algorithm.

This is a trivial algorithm to implement, and we benefit from
avoiding the conversion to/from GEOS geometries.
2024-06-20 05:41:37 +10:00
Nyall Dawson
21935668ba Move logic for connection item deletion to new class
Adds a new "QgsDataItemGuiProviderUtils" class, with a generic
function for handling deletion of browser connection items.

Replace all the duplicate connection deletion logic from the
different browser connection providers with calls to the
generic function.

In addition to removing a lot of duplicate code, the new
generic function correctly handles deletion of multiple
selected connections (previously, only the first connection
would actually be removed).

Fixes #26276
2024-06-19 16:59:00 +10:00
Nyall Dawson
c214527a8e Add convenience function to filter a list of QgsDataItem to a subclass 2024-06-19 16:59:00 +10:00
Alessandro Pasotti
ecec4085d9
Merge pull request #57769 from elpaso/bugfix-gh57765-raster-identify-localization
[raster][UX] Raster identify: respect locale settings
2024-06-18 17:37:19 +02:00
Alessandro Pasotti
81357cba0b QgsRasterBlock::printValue add localized argument 2024-06-18 10:32:29 +02:00
Nyall Dawson
9946a1d739 Move console script editor external file watching logic to QgsCodeEditorWidget
Ensures a consistent behavior between console script editor and
eg processing script editor
2024-06-18 05:23:57 +10:00
Nyall Dawson
d345c68c5a Move responsibility for loading scripts to QgsCodeEditorWidget 2024-06-18 05:23:57 +10: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
Mathieu Pellerin
35784b2263 [advanced digitizing] Implement visual construction guides 2024-06-04 09:30:40 +07: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