88359 Commits

Author SHA1 Message Date
Nyall Dawson
fbe47ef20c Hide Draw on Canvas option from QgsExtentWidget in modal dialogs
When widget is shown in a modal dialog, we can't offer the
option to draw the extent on the canvas

Refs #59063
2024-10-18 06:46:29 +10:00
Nyall Dawson
a09a33757a Prevent picking point on canvas when widget is shown in modal dialog
Fixes #59063
2024-10-18 06:46:29 +10:00
qgis-bot
94411b5fcd auto sipify 🍺 2024-10-17 08:34:52 +00:00
Jean Felder
444c41bc1b testqgspointcloud3drendering: Add a test for pointcloud clipping 2024-10-17 10:31:40 +02:00
Jean Felder
a1fa48d754 testqgsmesh3drendering: Add a test for mesh clipping 2024-10-17 10:31:40 +02:00
Jean Felder
62b3254a07 testqgs3drendering: Add a test for instanced rendering clipping 2024-10-17 10:31:40 +02:00
Jean Felder
fe21f79333 testqgs3drendering: Add a test for line clipping 2024-10-17 10:31:40 +02:00
Jean Felder
4d11601ac7 testqgs3drendering: Add a test for simple line clipping 2024-10-17 10:31:40 +02:00
Jean Felder
64c8a08b58 testqgs3drendering: Add a test for gooch datadefined with clipping 2024-10-17 10:31:40 +02:00
Jean Felder
cdb1171b4a testqgs3drendering: Add a test for phong datadefined with clipping 2024-10-17 10:31:40 +02:00
Jean Felder
64b32ff054 testqgs3drendering: Add a test for polygon clipping 2024-10-17 10:31:40 +02:00
Jean Felder
e38ac6c7b9 qgs3dmapscene: Add support to setup clipping
This adds two functions to setup clip planes on a 3d scene:
- enableClipping() to enable opengl clipping
- disableClipping() to disable opengl clipping

The `enableClipping()` function achieves 3 things:
- it stores the clipping plane equations
- it adds clip planes to the framegraph
- it enables the clipping on the material of the existing entities

`disableClipping()` does the opposite things.

The clip planes equations need to be stored to handle the dynamic
addition of new entities. Indeed, when a new entity is added, clipping
needs to be enabled on its material if necessary. This is achieved
in `finalizeNewEntity` which is called on all new entities.
However, this is not true for the terrain entity. That's why,
`mTerrain` now listens to the `newEntityCreated` signal to call
`handleClippingOnEntity()`.
2024-10-17 10:31:40 +02:00
Jean Felder
05910271cd shaders/mesh: Add support for gl_ClipDistance
This is achieved by calling `setClipDistance` in the geometry shader
if the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
c41313e023 shaders/pointcloud: Add support for gl_ClipDistance
This is achieved by calling `setClipDistance` in the vertex shader if
the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
2a1048ce86 shaders/instanced: Add support for gl_ClipDistance
This is achieved by calling `setClipDistance` in the vertex shader if
the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
0d5ebab912 shaders/lines: Add support for gl_ClipDistance
This is achieved by computing `worldPosition` and calling
`setClipDistance` in the geometry shader if the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
64d7ba98ac shaders/goochdatadefined: Add support for gl_ClipDistance
This is achieved by calling `setClipDistance` in the vertex shader if
the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
4e04041631 shaders/phongdatadefined: Add support for gl_ClipDistance
This is achieved by calling `setClipDistance` in the vertex shader if
the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
15e8af06ba shaders/texture: Add support for gl_ClipDistance
This is achieved by computing `worldPosition` and calling
`setClipDistance` in the vertex shader if the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
0684350e95 shaders/default: Add support for gl_ClipDistance
This is achieved by calling `setClipDistance` in the vertex shader if
the clipping is enabled.
2024-10-17 10:31:40 +02:00
Jean Felder
791274a090 shaders: Introduce clipplane.shaderinc
This adds the `setClipDistance` function which allows to compute
`gl_ClipDistance`. It will be added to the different shaders in the
following commits.
2024-10-17 10:31:40 +02:00
Jean Felder
eb3917515f qgsmaterial: Add methods to setup clipping
This changes allows to enable or disable clip planes on a
material. Indeed, to enable clipping, it is necessary to compute
`gl_ClipDistance` in the vertex or the geometry shader (where the
`gl_Position` is computed). `gl_ClipDistance` needs to have the clip
plane equations.

With this change, two `uniform` parameters are set in the shaders of a
`QgsMaterial` if clipping is enabled:
- the clip plane equations as an array
- the number of equations

Also, it is necessary to ensure that the clipping is not computed if
is not needed. This is achieved by adding a `#define CLIPPING` macro
to the shaders if the clipping is enabled.

There are two opposites functions:
- `enableClipping` which adds the `#define CLIPPING` macro
 to the relevant shaders and adds the two uniform parameters
- `disableClipping` which disables the `#define CLIPPING`
 macro from the relevant shaders and removes the two uniform parameters
 if necessary
2024-10-17 10:31:40 +02:00
Jean Felder
95d18a612d qgs3dutils: Add a function to remove define macros from shader code
This is the opposite of `addDefinesToShaderCode`.
2024-10-17 10:31:40 +02:00
Jean Felder
53a2df51fb testqgs3dutils: Add a unit test for addDefinesToShaderCode 2024-10-17 10:31:40 +02:00
Jean Felder
7de5706818 qgsframegraph: Add methods to define clip planes
`Qt3DRender::QClipPlane` enable OpenGL clipping plane that can be used
in shaders using gl_ClipDistance.

This change allows to enable `N` clipPlanes. This change has no effect
at the moment because `gl_ClipDistance` needs to be computed in each
vertex or geometry shader file. This will be achieved in the following
commits.
2024-10-17 10:31:40 +02:00
Jean Felder
a1c4863c34 3d: Introduce QgsMaterial
With this change, the materials used by the renderers now inherit from
`QgsMaterial`. `QgsMaterial` is just a child of
`Qt3DRender::QMaterial` and does nothing at the moment. In the
following commits, `QgsMaterial` will be extend to allow to enable or
disable clip planes on the material.
2024-10-17 10:31:40 +02:00
Jean Felder
4b4675e75f qgsgltf3dutils: Use qgstexturematerial instead of Qt3D TextureMaterial
`QgsTextureMaterial` does exactly the same things as
`Qt3DExtras::QTextureMaterial`. However it has 2 advantages:
- it allows to easily customize the shader code if necessary
- it will inherit from `QgsMaterial` in the next commit which will
allow to add support gl_clipDistance
2024-10-17 10:31:40 +02:00
Jean Felder
ffba878f81 qgspointcloud3dsymbol: Remove empty line at the end of file 2024-10-17 10:31:40 +02:00
Jean Felder
e134c16857 3d: Remove useless QMaterial include 2024-10-17 10:31:40 +02:00
Nyall Dawson
f284cc933f Properly disable test_core_tiledownloadmanager 2024-10-17 17:58:49 +10:00
Nyall Dawson
0495cdd134 Add a bit more test tolerance so test passes on qt 6 2024-10-17 17:58:49 +10:00
Nyall Dawson
43a735f574 Enable selective masking test on qt6 2024-10-17 17:58:49 +10:00
Nyall Dawson
b6592d1a2d Test mask updates for qt6 2024-10-17 17:58:49 +10:00
Nyall Dawson
2c34056199 pyqt5_to_pyqt6.py run 2024-10-17 17:58:49 +10:00
Nyall Dawson
cd1dcbf8ca When excluding tests, only exclude exact matches
Otherwise eg an entry in the blocklist for PyQgsAnnotation will
prevent the PyQgsAnnotationRectTextItem test from running
2024-10-17 17:58:49 +10:00
Even Rouault
0c9320c8ad QgsRasterLayer: readXml(): read layer notes even when opening with FlagDontResolveLayers
Fixes #58818
2024-10-17 14:33:17 +10:00
Germán Carrillo
cc6feb11f6 Add missing \since and \see in method docs, replace @param by \param 2024-10-17 13:37:13 +10:00
Germán Carrillo
d9f340f018 Address review: rename method to be more API compliant 2024-10-17 13:37:13 +10:00
Germán Carrillo
601dae8854 [gui] Fix enabled/disabled diagram handling by adding a checkbox to QgsDiagramProperties, so that's explicit whether the diagram is enabled or not as well as to toggle its enabled status 2024-10-17 13:37:13 +10:00
Even Rouault
a4e9b2430a Make OAuth2 HTML brower page translatable
Currently the HTML page returned after logging in to the authentication
server is hardcoded in English. Let's make it translatable.

Funded by Régie de Gestion des Données Savoie Mont Blanc (rgd.fr)
2024-10-17 08:02:05 +10:00
qgis-bot
047cab15a8 auto sipify 🍺 2024-10-16 14:31:08 +00:00
uclaros
da412089cd Make the QgsTracer not add unnecessary points on intersections 2024-10-16 16:27:40 +02:00
qgis-bot
0ed0b3627e auto sipify 🍺 2024-10-16 12:47:44 +00:00
Alessandro Pasotti
8e106b8c10
Merge pull request #59105 from elpaso/bugfix-wms-max-tile-size
[wms] Fix unreported issue max tile size from capabilities ignored
2024-10-16 14:44:17 +02:00
Alessandro Pasotti
d60e987829
Update src/core/raster/qgsrasterlayerrenderer.cpp 2024-10-16 10:17:33 +02:00
Alessandro Pasotti
85e63f99bc
Update src/core/raster/qgsrasterlayerrenderer.cpp
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2024-10-16 10:07:42 +02:00
Alessandro Pasotti
2078ef5c03 [wms] Fix unreported issue max tile size from capabilities ignored
Fix an unreported issue with WMS client ignoring the advertised tile
size from GetCapabilities (because the raster iterator always used
its own hardcoded default).

A new method was added to retrieve this information from data providers
only implemented for WMS at the moment.

The test has been reformatted for consistency with other core tests
by moving the implementation outside of the class. The actual change is
the addition of TestQgsWmsProvider::testMaxTileSize().

Funded by: M.O.S.S. Computer Grafik Systeme GmbH https://www.moss.de/
2024-10-16 09:29:36 +02:00
qgis-bot
9e12573fac auto sipify 🍺 2024-10-16 03:04:51 +00:00
Nyall Dawson
d39d77d505 Simplify method 2024-10-16 13:01:39 +10:00
Nyall Dawson
274734362c Add banned keyword test for @annotation doxygen format
\annotation must be used for sipify to work correctly
2024-10-16 13:01:39 +10:00