990 Commits

Author SHA1 Message Date
Nyall Dawson
1f94f9bc4e Rework to use Qgs3DRenderContext instead 2024-08-28 12:38:16 +10:00
Nyall Dawson
5e33ee4a57 Add some thread safety to Qgs3DMapSettings usage
Create a small, cheap to copy (non-qobject) class
Qgs3DMapSettingsSnapshot which is designed to store
just cheap properties of Qgs3DMapSettings. Then use this
object wherever possible to avoid accessing the (non-thread
safe) Qgs3DMapSettings object for retrieval of simple
map properties (eg crs, extent, ...)

Refs https://github.com/qgis/QGIS-Enhancement-Proposals/issues/301
2024-08-28 12:38:16 +10:00
qgis-bot
a37fec4fc9 auto sipify 🍺 2024-08-28 02:01:25 +00:00
Nyall Dawson
519959154a Fix some overly verbose class "brief" descriptions 2024-08-28 11:58:21 +10:00
Nyall Dawson
a478545108 Fix bad docs 2024-08-28 11:58:21 +10:00
Nyall Dawson
bc52832b47 Lazily hack around markdown title underline not being long enough
Causes a bunch of warnings when building the PyQGIS docs
2024-08-28 11:58:21 +10:00
Nyall Dawson
6a936472d4 Remove incorrect 'not available in python' note 2024-08-28 11:58:21 +10:00
Nyall Dawson
088aea0d0d Fix incorrect use of inline returns 2024-08-28 11:58:21 +10:00
qgis-bot
8ab71756cf auto sipify 🍺 2024-08-26 20:57:49 +00:00
Julien Cabieces
becfe9111d fix(ColorWidget): Synchronize color model with color ramp one
Fixes #58324
2024-08-27 06:54:44 +10:00
qgis-bot
b553b04ae9 auto sipify 🍺 2024-08-25 02:37:44 +00:00
Nyall Dawson
79283e18b4 Use resize handles for corner nodes
Fixes #58427
2024-08-25 12:34:51 +10:00
Nyall Dawson
370f74803f Only upgrade annotations on desktop 2024-08-25 12:34:51 +10:00
Nyall Dawson
6127088395 Make common base class for annotation items which render in rect
And avoid a bunch of duplicate code
2024-08-25 12:34:51 +10:00
Nyall Dawson
e64bd80ff2 Add auto-upgrade for old text annotations 2024-08-25 12:34:51 +10:00
Nyall Dawson
1ce2940d2c Add framework to upgrade older annotations to annotation layer items on project load 2024-08-25 12:34:51 +10:00
Nyall Dawson
5c1427c807 Add QgsLineString::lineLocationPointByM
This method attempts to interpolate the point on a linestringM
where a specified m value falls. It does this by interpolating
M values along the line string segments, finding the first
segment at which the target M value falls. If the M value
corresponds to a part of the line with constant m values, then
the center point of this constant m value portion will be
returned.
2024-08-25 12:34:38 +10:00
Nyall Dawson
374f0a5fcc Fix bug with inverted polygon renderer vs OTF simplification
The simplification MUST be applied prior to transforming geometries,
or the precalculated simplification tolerance will no be correct
and may be excessive (eg when the simplification tolerance
was calculated for a map in meters, yet the rendered layer is
in degrees -- in this case we would simplify the inverted geometry
with a tolerance of ~1 degree!)

Ensure that we apply the simplification FIRST, then transform,
and disable further simplification when rendering the calculated
inverted feature. This is also a performance boost, because we
are simplifying geometries prior to transforming + calculating
the inversion, so usually end up with a lot less vertices
to handle in those operations...
2024-08-25 12:34:18 +10:00
qgis-bot
ecfd18cea6 auto sipify 🍺 2024-08-23 09:37:22 +00:00
signedav
02c36d9fd6
Merge pull request #58448 from signedav/releditorfilter
Filter in Linking Dialogue of Relation Editor Widget
2024-08-23 11:34:13 +02:00
Nyall Dawson
f90a7c04b1 Raw code block should use 'text', not 'raw'
'raw' gives an error when building the PyQGIS docs
2024-08-23 09:26:18 +10:00
qgis-bot
14604a8e7a auto sipify 🍺 2024-08-22 12:16:11 +00:00
Julien Cabieces
08806145fc
Merge pull request #58376 from troopa81/ui_cmyk_percent
[ColorWidget] Edit CMYK as percent
2024-08-22 14:13:02 +02:00
Julien Cabieces
3b7a3c0060 style(ColorWidgets): Rename Raw enum to Scaled0to255 2024-08-22 09:58:55 +02:00
qgis-bot
04dac197d1 auto sipify 🍺 2024-08-21 22:54:12 +00:00
signedav
5c9890ce69 fix typos 2024-08-21 14:59:34 +02:00
Julien Cabieces
a24779fdeb fix(ColorWidget): Run sipify since new static wrapper 2024-08-21 13:46:45 +02:00
Julien Cabieces
bdb835d164 fix(ColorWidget): Add missing Q_ENUM 2024-08-21 10:06:30 +02:00
Julien Cabieces
5deb18f91c ui(ColorWidget): Display CMYK components as percent 2024-08-21 10:06:30 +02:00
signedav
66fac268c8 Integrate expression builder in configuration 2024-08-21 08:08:38 +02:00
merydian
1b892d683f Add suggestions 2024-08-21 09:05:41 +10:00
merydian
21a276fff2 Implement QgsRasterLayer.as_numpy 2024-08-21 09:05:41 +10:00
qgis-bot
f12421d8f0 auto sipify 🍺 2024-08-20 19:24:20 +00:00
Julien Cabieces
6cd3e14d5a fix(ColorWidget): update sip files since new sipify 2024-08-21 05:20:48 +10:00
Julien Cabieces
35dad9a7fe fix(ColorWidget): fix sip and missing deprecated 2024-08-21 05:20:48 +10:00
Julien Cabieces
439078651e fix(ColorWidget): Add missing SIP_DEPRECATED 2024-08-21 05:20:48 +10:00
Julien Cabieces
b3dd3a0e32 feat(ColorWidget): Set color component as float 2024-08-21 05:20:48 +10:00
qgis-bot
eac7f1a211 auto sipify 🍺 2024-08-20 14:43:42 +00:00
Nyall Dawson
41f8db6503 Don't leak typing into qgis.core 2024-08-20 16:40:32 +02:00
Nyall Dawson
1128c909ee Move all gui map tools files into maptools/ subfolder
Previously only a few were in this subfolder, which made it
confusing to find the others...
2024-08-20 16:38:45 +02:00
signedav
0184eb1c77 Implement filterExpression in RelationEditorWidget and Config
Make QgsAbstractRelationEditorWidget accept filterExpression on linkFeature function
2024-08-20 15:47:31 +02:00
qgis-bot
38c4637547 auto sipify 🍺 2024-08-20 06:34:37 +00:00
Jean Felder
8dab246707
[3D] Use QGIS material for the terrain (#58134)
* terrain: Use PhongMaterialSettings material for the non texture case

There is no functional change. With this change, the terrain uses a
material defined by QGIS instead of a default Qt3D. This will make it
easier to customize the shader in the future.

* qgsphongmaterialsettings: Fix setShininess signature

`mShininess` is a double.

* qgsphongtexturedmaterialsettings: Use a double to store shininess

This is already waht QgsPhongTexturedMaterialSettings does. The reason
for this change is to avoid the user-set values changing for them when
saving/restoring projects.

* qgsphongtexturedmaterialsettings: Use a double to store opacity

This is already waht QgsPhongTexturedMaterialSettings does. The reason
for this change is to avoid the user-set values changing for them when
saving/restoring projects.

* qgsphongtexturedmaterialsettings: Do proper opacity cast in toMaterial

* qgsphongtexturedmaterialsettings: Factor out material creation

This introduces a new class `QgsPhongTexturedMaterial` which is
similar to Qt3D `QDiffuseSpecularMaterial`.
`QgsPhongTexturedMaterial::toMaterial()` now calls
`QgsPhongTexturedMaterial` to create the material. This has no
functional change.

This will make it possible to directly use `QgsPhongTexturedMaterial`
for the terrain in the next commit. Indeed, the texture case needs to
use a `QTexture2D` which cannot be stored in a settings class. This
issue is avoided by directly creating the material instead of using
`QgsPhongTexturedMaterial::toMaterial()`.

* qgsterraintileloader: Fix typo

* terrain: Use QgsPhongTexturedMaterial for shading texture

There is no functional change. With this change, the terrain uses a
material defined by QGIS instead of a default Qt3D. This will make it
easier to customize the shader in the future.

* 3d/material: Introduce QgsTextureMaterial

This is the same material as the qt3d one:
`Qt3DExtras::QTextureMaterial`. It will also be used in the following
commit by the terrain.

* terrain: Use QgsTextureMaterial for non shading texture

There is no functional change. With this change, the terrain uses a
material defined by QGIS instead of a default Qt3D. This will make it
easier to customize the shader in the future.
2024-08-19 23:01:06 +02:00
signedav
72c596c7ea make setFilterExpression public to make possible to set filters by e.g. widgets 2024-08-19 17:38:33 +02:00
qgis-bot
6222445858 auto sipify 🍺 2024-08-19 09:19:05 +00:00
Nyall Dawson
262ade625e Don't leak LinePlacementFlags 2024-08-19 11:16:01 +02:00
Nyall Dawson
98f3ca0650 Don't leak mapping functions into core 2024-08-19 11:16:01 +02:00
Nyall Dawson
1c119bde15 Avoid leaking processing repr into core 2024-08-19 11:16:01 +02:00
Nyall Dawson
fa518f6795 Don't leak fromFunction into core 2024-08-19 11:16:01 +02:00
Nyall Dawson
3dbbb16aa6 Don't leak range repr functions into qgis.core 2024-08-19 11:16:01 +02:00