270 Commits

Author SHA1 Message Date
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
Andrea Giudiceandrea
746345510c Fix Qgis.SettingsOrigin enum values description 2023-11-28 04:33:47 +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
a1f9039f12 Fix invalid escape sequences in docstrings for enums with since
annotation
2023-10-24 06:44:46 +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
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
8d52b54f33 address review 2023-09-25 14:14:41 +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
6dffd72d57 sipify 2023-08-23 08:40:09 +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
Nyall Dawson
95dc22f6b5 Fix handling of ' in enum docstrings in sipify 2023-07-09 22:48:59 +10:00
Nyall Dawson
71d6188e3d Add method to return CRS type, based on proj_get_type() values
And show in CRS details for layer properties
2023-07-09 22:48:59 +10:00
Nyall Dawson
4557632c46 Move enum 2023-06-28 17:47:17 +10:00
Nyall Dawson
8adb33cbcf Add TiledMesh to Qgis::MapLayerType enum and partially handle 2023-06-28 17:47:17 +10:00
Nyall Dawson
61a3f44e98 Provider registry tiled mesh file handling support 2023-06-28 17:39:09 +10:00
Nyall Dawson
391ab37539 Another 3.32 -> 3.34 update 2023-06-27 14:49:20 +10:00
Nyall Dawson
eca6b7a409 Add framework for handling non-keyboard/mouse map controllers
This is the base API interface classes for creation of custom
2d or 3d map controllers, and registering them in a common
QgsInputControllerManager singleton class.
2023-06-27 14:49:20 +10:00
Nyall Dawson
26493802dc Move some QgsRasterFileWriter enums to qgis 2023-06-15 08:28:44 +10:00
Nyall Dawson
7a784cdfd6 Flag OneDrive remote folders as remote, slow to open paths on Windows
Refs #51710
2023-06-08 14:06:01 +10:00
Denis Rouzaud
5bccd556e2
move QgsTolerance::UnitType to Qgis::MapUnitType (#53347)
* move QgsTolerance::UnitType to Qgis::MapUnitType

* missing forward declaration

* forward declaration

* use MapToolUnit

* forward declaration

* sipify

* fix tests

* Apply suggestions from code review

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* forward declaration

* forward declaration

* forward declaration

* sipify

* fix missing parenthesis

---------

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2023-06-06 18:33:50 +02:00
Nyall Dawson
a764e2da76 Expose setting for point text annotations to control how
the text annotation should handle map rotation

Previously, text annotations just ignore map rotation, which
matches how regular map labels are handled. But this is not
desirable for some point text annotations, where it can
be considered a bug that the item ignores the map rotation (eg
when a text annotation has been placed to align with a feature
on the map, such as a road)

There's no one "correct" behaviour here, so add a new
combo box widget in the annotation point text settings with
options for
"Ignore Map Rotation"
"Rotate With Map"
so that users can pick the desired behavior for their annotations
2023-06-02 17:26:07 +10:00