20 Commits

Author SHA1 Message Date
Nyall Dawson
5d29d49869 [api] Add virtual QgsRasterRenderer::setInputBand method
Attempts to set the input band for the renderer.
Returns TRUE if the band was successfully set, or FALSE if the
band could not be set.

This was implemented in various raster renderer subclasses,
but it was necessary to down cast and then call the individual
methods (which don't have consistent names!).

Instead, add a top level virtual method so that it's easy to
change the input band for the renderers.
2024-03-16 06:35:16 +10:00
Nyall Dawson
56af3498e8 Add method to convert raw pixel values to elevation values 2024-03-13 05:56:05 +10:00
Nyall Dawson
4284b8645b Use vector instead of list for better performance
This container is expected to have only a handful of items in it
in most cases and will rarely change => QVector is a better choice
2024-03-04 07:25:51 +10:00
Nyall Dawson
c40a1ef3bb Further cleanups to QgsRasterTransparency API
Avoid confusing mix of transparency vs opacity, multiple scaling
and round trips through integers.
2024-03-04 07:25:51 +10:00
Nyall Dawson
c162375965 [api] Add explicit setting for includeMinimum/Maximum
to QgsRasterTransparency.TransparentSingleValuePixel. Allows (via
API only) control over whether the extremities of the range
should be included in the transparency.

Also add equality operator, repr to these classes, and additional
tests
2024-03-04 07:25:51 +10:00
Nyall Dawson
65ba3ddfef Cleanup QgsRasterTransparency API
- Make classes less like to be created with uninitialized members
- Use opacity instead of transparency, to match API from elsewhere in
  QGIS
2024-03-04 07:25:51 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
0096246afe Sipify 2024-02-13 20:51:03 +10:00
Nyall Dawson
814e6db3b4 Don't map non-list of QVariantMaps to QMap<QString,QVariant>
The original workaround was only supposed to apply to QList/
QVector of QVariantMaps. By replacing them all in sip we
break mapping of signals defined in c++ which are emitted
by Python code.

Fixes exceptions after running processing algorithms in Qt6
builds.
2024-02-12 12:16:14 +10:00
Nyall Dawson
f9ad9e4e25 Documentation 2024-02-02 04:59:04 +10:00
Nyall Dawson
6aae7380cd Cleanup int arguments which should be Qgis::RasterBandStatistic values
And ensure python compatibility remains intact
2024-02-02 04:59:04 +10:00
Nyall Dawson
503a95a1a1 Move enums to Qgis namespace for consistency 2024-02-02 04:59:04 +10:00
Nyall Dawson
179e2ca59a Promote some more enums to enum class to fix PyQt6 support 2024-02-02 04:59:04 +10:00
Nyall Dawson
fae7c83437 Fix doxygen 2024-01-31 17:16:18 +10:00
Nyall Dawson
f2c74f377d Sipify 2024-01-31 17:16:18 +10:00
Nyall Dawson
f1e3ba9e2d Use correct sip method
And use INDENT-OFF annotations to avoid astyle messing up
formatting of enum with inline macros
2024-01-31 13:48:49 +10:00
Nyall Dawson
23f3af4290 Use enum classes for QgsProperty property keys
Should fix usage on Qt 6 builds
2024-01-31 13:48:49 +10:00
Nyall Dawson
4654ad3db5 Sipify 2024-01-23 08:32:38 +01:00
Julien Cabieces
bb3c36a69b Initialize sip bindings for PyQt6
use exactly the ones from PyQt5 so we can study the difference when
generating for PyQt6
2023-12-08 03:38:42 +10:00