291 Commits

Author SHA1 Message Date
Nyall Dawson
90f180c07f Start on utils class 2024-02-15 12:39:11 +10:00
Nyall Dawson
62cd14189f Use proper enum flags type instead of int as return value
And promote enum to enum class. Notably fixes a bunch of startup
errors when loading the Processing plugin under Qt6
2024-02-13 08:13:43 +10:00
Nyall Dawson
ee53b9ae48 Port processing enums to enum class
A step towards a Qt6 compatible Processing framework
2024-02-10 17:25:22 +10:00
Nyall Dawson
503a95a1a1 Move enums to Qgis namespace for consistency 2024-02-02 04:59:04 +10:00
Nyall Dawson
078fd4f2ea Make IntFlag enum type opt-in, rather than opt-out
And make sipify handle this nicely. This means that all our non-flag
style enums correctly map across to IntFlag python enums on Qt 6,
fixing issues with negative enum values for these and providing
a better match for the original c++ enum.
2024-01-31 17:16:18 +10:00
Nyall Dawson
6116319806 Move a processing enum to enum class in Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
26798b84f4 Promote QgsFeatureRequest enums to enum class, move to Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
ef4f8efdcc Remove unused 2018 WKT variants, monkey patch for api compatibility 2024-01-17 10:16:32 +10:00
Nyall Dawson
20075f8809 Use consistent case 2024-01-17 10:16:32 +10:00
Nyall Dawson
f2903c7935 Move QgsCoordinateReferenceSystem enums to qgis, promote to enum class 2024-01-17 10:16:32 +10:00
Nyall Dawson
f6addcd0ca Promote 3d point symbol shape to enum class 2023-12-25 17:54:44 +10:00
Loïc Bartoletti
b5c5029e93 qgis.h: proposes a generic templated method from qgsDoubleNear and qgsNumberNear 2023-12-14 19:55:36 +01:00
Nyall Dawson
fe2df1441f Move playback controller buttons to reusable widget
Create QgsPlaybackControllerWidget as reusable
play/pause/rewind/next/... button bar
2023-11-30 13:54:02 +10:00
Nyall Dawson
e891ac8fec [feature] Add "movie" mode to temporal controller
This mode is purely for animated map movies -- the user can set
the total number of frames, and the animation will progress
frame by frame for that number of frames, advancing the current
map settings frame at each step (also the @frame_number expression
variable).

No time based filtering of data is performed when in this mode.
2023-11-30 13:54:02 +10:00
Nyall Dawson
60057e508c Move temporal enums to Qgis, promote to enum class 2023-11-30 13:54:02 +10:00
Loïc Bartoletti
361fbded94 QgsGeometry: use NoOrientation enum and fix some possible nullptr uses 2023-11-24 09:18:02 +00:00
Nyall Dawson
3ed97c3c76 Move QgsProperty::Type to Qgis, promote to enum class 2023-11-07 20:45:49 +10:00
Nyall Dawson
1d223e692e Expose geos coverage methods to QgsGeos for geos 3.12+ based builds 2023-11-02 22:03:20 +10:00
Alessandro Pasotti
b63391f955
Merge pull request #54951 from elpaso/server-getlegendgraphics-json-rule
FEATURE: Server getlegendgraphics json rule
2023-10-31 09:34:53 +01:00
Nyall Dawson
1d1b7c99a7 Remove custom FALLTHROUGH define
We don't need this anymore since we require c++17 anyway, and
it raises build warnings due to macro redefinition with newer GRASS
2023-10-23 16:58:17 +10:00
Sandro Mani
9b095c5605 Revert "Revert "Allowing storing GPGK raster layer styles to DB""
This reverts commit 9d8a72256893bd31a51d85927e9abd9cdb5eed29.
2023-10-23 13:47:40 +10:00
Alessandro Pasotti
bd6c36ae40 sipify 2023-10-17 14:27:21 +02:00
Alessandro Pasotti
21145c9daa Rule support in server GetLegendGraphics JSON response 2023-10-17 09:29:02 +02:00
Denis Rouzaud
c76b86e26b
move enum QgsMapLayerProxyModel::Filter to Qgis (#54891) 2023-10-11 13:57:01 +02:00
Nyall Dawson
9d8a722568 Revert "Allowing storing GPGK raster layer styles to DB" 2023-10-06 12:15:46 +10:00
Sandro Mani
4bc4f48f50
Merge pull request #54558 from manisandro/rasterstyles
Allowing storing GPGK raster layer styles to DB
2023-10-05 16:16:44 +02:00
Nyall Dawson
7147f013ff Fix QgsField::ConfigurationFlag::None causes syntax error when
starting PyQGIS

We can't use `None` as a keyword exposed to python, it's reserved.
Also move the enum to Qgis before making it part of public stable
API.
2023-10-03 19:51:38 +10:00
Alexander Bruy
373d5f8654
Merge pull request #54035 from alexbruy/processing-port-raster-calculator
Port Raster Calculator algorithm to C++
2023-09-30 10:12:55 +03:00
Alexander Bruy
0f93479e1c support for raster calculator expressions in expression parameter 2023-09-25 14:14:41 +03:00
Julien Cabieces
5315ae6cc5 make avoidIntersections return an enum 2023-09-25 08:42:03 +02:00
Sandro Mani
e2169be02f Introduce Qgis::ProviderStyleStorageCapabilities 2023-09-18 14:16:02 +02:00
Alexander Bruy
81dbdd8bae
Merge pull request #53874 from alexbruy/processing-port-align-raster-tool
Port Align rasters tool to Processing
2023-09-14 16:29:49 +03:00
Alexander Bruy
623e459867 fix patching 2023-09-14 10:46:54 +03:00
Alexander Bruy
79ea6d9936 address review 2023-09-13 13:01:59 +03:00
Nyall Dawson
0a752b7d13 Add opt in setting for map renders to enable render time profiling,
and enable for main canvas renders only

And explicitly disable for main canvas preview jobs too
2023-09-12 19:30:24 +10:00
Nyall Dawson
5fe84b0a55 [cesium] Add support for deprecated gltfUpAxis asset setting
Adds support for Z up gltf content
2023-09-07 09:09:24 +02:00
Nyall Dawson
156e5db76f Add choice of two different modes for "Refresh Layer at Interval"
The old behaviour was always to just redraw the layer, without
refreshing data. This was by design, as the feature was originally
developed to allow animated layers which needed to be regular,
quickly redrawn.

But there's also a use case for automatically refetching layer
data on a regular interval too. So now we expose a choice
of mode for the automatic refresh for users to decided which
is appropriate for their requirements.

The options are:

- "Reload Data": The layer will be completely refreshed. Any cached
data will be discarded and refetched from the provider. This mode
may result in slower map refreshes.

- "Redraw Layer Only": This mode is useful for animation or when
the layer's style will be updated at regular intervals. Canvas
updates are deferred in order to avoid refreshing multiple times
if more than one layer has an auto update interval set.

The changes are all wrapped up in a new reusable widget, so that
we can easily expose this setting for non vector/raster layers
if we want to in future.

Fixes https://github.com/qgis/QGIS/issues/39830
2023-08-30 09:42:59 +10:00
Nyall Dawson
440cac298f Promote QgsProcessingModelChildParameterSource source to enum class and move to Qgis
This wasn't marked as stable API, so we don't need any of the usual monkey patching code
2023-08-25 15:44:05 +10:00
Nyall Dawson
e4770a18eb Don't try to render line primitives if the renderer won't do anything with them 2023-08-23 14:08:21 +02:00
Alexander Bruy
00a543f504 move enum to Qgis 2023-08-23 08:37:26 +03:00
Nyall Dawson
c7563cec70 Add generic API to allow map layer renderers to show temporary in
progress preview render results while drawing the layer, which
differ from the final layer render

The immediate use case here is for rendering tiled scene layers.
In order to generate the actual final render for these layers,
we need to first fetch ALL content for the render and then sort
the primitives by z value. But this means that the layer renders
can be extremely slow, with no visible changes on the map until
all the content fetching is complete. Not great user experience!

Instead, here we add the infrastructure so that a layer renderer
can get a temporary image to paint to for any partial renders.
This image gets used during map composition up until the layer
finally finishes rendering, at which time the layer's actual
destination image will be used for the composition.

This means that tiled scene renderers can now draw all tiles
(with unsorted primitives, and the artifacts which come with
that) as soon as we fetch each tile. This gives the user an
immediate visual reflection that the tiles are being fetched
and that how quickly (or slowly) that is happening. As soon
as we've got all tiles, the layer render will be immediately
switched to the version in which all content is rendered
in the correct z order.

As a bonus, we draw these temporary in progress renders
over any previously transformed cache version of the layer
available. So eg when you zoom in, you'll get a zoomed in pixelated
version of the last render which gets progressively drawn
over with each tile as it is fetched.

This same API could be used in future eg with point cloud
rendering when points are being sorted by z value to give
timely visual feedback.
2023-08-16 11:00:37 +10:00
Nyall Dawson
c8cf3d3509 When exporting layouts with a tiled scene layer set to texture renderer,
force the layer to be rasterised

There's no benefit in exporting these layers as a bunch of triangular
images which are pieced together, that adds a lot of extra content to
the exports and results in files which can be extremely slow to open
and render in other viewers.
2023-08-15 18:14:53 +10:00
Nyall Dawson
3c7f0730e5 Implement 2d renderer for tiled scenes
We currently offer three renderer choices:
- Textured (default). Loads the texture image and paints the mesh using
  these textures
- Texture color. Uses the center point color for rendering each mesh
  triangle. Gives a clear visual overview of the mesh structure while
  also providing some context via the texture color
- Mesh. Renders the scene's mesh using a fill symbol
2023-08-11 18:28:21 +10:00
Nyall Dawson
9f57fb2ef0 Rename "tiled mesh" to "tiled scene"
Better reflects that these types can contain lines and point
data, not just meshes
2023-08-05 21:31:49 +10:00
Nyall Dawson
5597a2a640 Add flags to QgsTiledMeshRequest 2023-08-05 05:05:46 +10:00
Nyall Dawson
12bf02cc89 Avoid ambiguity in 'refinement' naming, remove ambiguity about
whether a tile has children available, no children, or not-yet-
fetched children
2023-08-05 05:05:46 +10:00
Nyall Dawson
f3c987f5e5 Introduce QgsTiledMeshTile
Represents an individual tile from a tiled mesh scene
2023-08-05 05:05:46 +10:00
Nyall Dawson
37ec173868 Add Qgis::SymbolLayerUserFlags for user-controlled flags which
alter the handling of symbol layers

These differ from Qgis::SymbolLayerFlag in that
Qgis::SymbolLayerFlag flags are used to reflect the inbuilt properties
of a symbol layer type, whereas Qgis::SymbolLayerUserFlag are optional,
user controlled flags which can be toggled for a symbol layer.

Add a flag `DisableSelectionRecoloring` which can be set for
symbol layers which prevents the layer from being recolored to
the render context selection color even when the feature
being rendered is selected

This provides a mechanism for an individual symbol layer to
avoid the forced recolor of selected features.
2023-08-02 12:49:01 +10:00
Nyall Dawson
e5bddbab1a Don't discard custom color/symbol when changing layer selection
mode
2023-07-29 18:36:11 +10:00
Nyall Dawson
f658e5de7b Create class for representing tiled mesh node bounding volumes
And implement for sphere, region and oriented box bounding volume
types
2023-07-18 12:35:45 +02:00