Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into symbex2
Browse files Browse the repository at this point in the history
  • Loading branch information
roya0045 committed Mar 20, 2024
2 parents 97685a3 + ec30cab commit 36cafc3
Show file tree
Hide file tree
Showing 57 changed files with 2,288 additions and 351 deletions.
17 changes: 16 additions & 1 deletion python/PyQt6/core/auto_additions/qgis.py
Expand Up @@ -1279,6 +1279,14 @@
Qgis.RasterRendererFlags.baseClass = Qgis
RasterRendererFlags = Qgis # dirty hack since SIP seems to introduce the flags in module
# monkey patching scoped based enum
Qgis.RasterRendererCapability.UsesMultipleBands.__doc__ = "The renderer utilizes multiple raster bands for color data (note that alpha bands are not considered for this capability)"
Qgis.RasterRendererCapability.__doc__ = "Raster renderer capabilities.\n\n.. versionadded:: 3.48\n\n" + '* ``UsesMultipleBands``: ' + Qgis.RasterRendererCapability.UsesMultipleBands.__doc__
# --
Qgis.RasterRendererCapability.baseClass = Qgis
Qgis.RasterRendererCapabilities = lambda flags=0: Qgis.RasterRendererCapability(flags)
Qgis.RasterRendererCapabilities.baseClass = Qgis
RasterRendererCapabilities = Qgis # dirty hack since SIP seems to introduce the flags in module
# monkey patching scoped based enum
Qgis.RasterAttributeTableFieldUsage.Generic.__doc__ = "Field usage Generic"
Qgis.RasterAttributeTableFieldUsage.PixelCount.__doc__ = "Field usage PixelCount"
Qgis.RasterAttributeTableFieldUsage.Name.__doc__ = "Field usage Name"
Expand Down Expand Up @@ -3230,10 +3238,17 @@
# monkey patching scoped based enum
Qgis.RasterElevationMode.FixedElevationRange.__doc__ = "Layer has a fixed elevation range"
Qgis.RasterElevationMode.RepresentsElevationSurface.__doc__ = "Pixel values represent an elevation surface"
Qgis.RasterElevationMode.__doc__ = "Raster layer elevation modes.\n\n.. versionadded:: 3.38\n\n" + '* ``FixedElevationRange``: ' + Qgis.RasterElevationMode.FixedElevationRange.__doc__ + '\n' + '* ``RepresentsElevationSurface``: ' + Qgis.RasterElevationMode.RepresentsElevationSurface.__doc__
Qgis.RasterElevationMode.FixedRangePerBand.__doc__ = "Layer has a fixed elevation range per band"
Qgis.RasterElevationMode.__doc__ = "Raster layer elevation modes.\n\n.. versionadded:: 3.38\n\n" + '* ``FixedElevationRange``: ' + Qgis.RasterElevationMode.FixedElevationRange.__doc__ + '\n' + '* ``RepresentsElevationSurface``: ' + Qgis.RasterElevationMode.RepresentsElevationSurface.__doc__ + '\n' + '* ``FixedRangePerBand``: ' + Qgis.RasterElevationMode.FixedRangePerBand.__doc__
# --
Qgis.RasterElevationMode.baseClass = Qgis
# monkey patching scoped based enum
Qgis.MeshElevationMode.FixedElevationRange.__doc__ = "Layer has a fixed elevation range"
Qgis.MeshElevationMode.FromVertices.__doc__ = "Elevation should be taken from mesh vertices"
Qgis.MeshElevationMode.__doc__ = "Mesh layer elevation modes.\n\n.. versionadded:: 3.38\n\n" + '* ``FixedElevationRange``: ' + Qgis.MeshElevationMode.FixedElevationRange.__doc__ + '\n' + '* ``FromVertices``: ' + Qgis.MeshElevationMode.FromVertices.__doc__
# --
Qgis.MeshElevationMode.baseClass = Qgis
# monkey patching scoped based enum
Qgis.NoConstraint = Qgis.BetweenLineConstraint.NoConstraint
Qgis.NoConstraint.is_monkey_patched = True
Qgis.BetweenLineConstraint.NoConstraint.__doc__ = "No additional constraint"
Expand Down
Expand Up @@ -46,6 +46,62 @@ Constructor for QgsMeshLayerElevationProperties, with the specified ``parent`` o

virtual bool showByDefaultInElevationProfilePlots() const;

virtual QgsMapLayerElevationProperties::Flags flags() const;


Qgis::MeshElevationMode mode() const;
%Docstring
Returns the elevation mode.

.. seealso:: :py:func:`setMode`

.. versionadded:: 3.38
%End

void setMode( Qgis::MeshElevationMode mode );
%Docstring
Sets the elevation ``mode``.

.. seealso:: :py:func:`mode`

.. versionadded:: 3.38
%End

QgsDoubleRange fixedRange() const;
%Docstring
Returns the fixed elevation range for the mesh.

.. note::

This is only considered when :py:func:`~QgsMeshLayerElevationProperties.mode` is :py:class:`Qgis`.MeshElevationMode.FixedElevationRange.

.. note::

When a fixed range is set any :py:func:`~QgsMeshLayerElevationProperties.zOffset` and :py:func:`~QgsMeshLayerElevationProperties.zScale` is ignored.


.. seealso:: :py:func:`setFixedRange`

.. versionadded:: 3.38
%End

void setFixedRange( const QgsDoubleRange &range );
%Docstring
Sets the fixed elevation ``range`` for the mesh.

.. note::

This is only considered when :py:func:`~QgsMeshLayerElevationProperties.mode` is :py:class:`Qgis`.MeshElevationMode.FixedElevationRange.

.. note::

When a fixed range is set any :py:func:`~QgsMeshLayerElevationProperties.zOffset` and :py:func:`~QgsMeshLayerElevationProperties.zScale` is ignored.


.. seealso:: :py:func:`fixedRange`

.. versionadded:: 3.38
%End

QgsLineSymbol *profileLineSymbol() const;
%Docstring
Expand Down
19 changes: 18 additions & 1 deletion python/PyQt6/core/auto_generated/qgis.sip.in
Expand Up @@ -691,6 +691,14 @@ The development version



enum class RasterRendererCapability /BaseType=IntFlag/
{
UsesMultipleBands,
};

typedef QFlags<Qgis::RasterRendererCapability> RasterRendererCapabilities;


enum class RasterAttributeTableFieldUsage /BaseType=IntEnum/
{
Generic,
Expand Down Expand Up @@ -1846,7 +1854,14 @@ The development version
enum class RasterElevationMode /BaseType=IntEnum/
{
FixedElevationRange,
RepresentsElevationSurface
RepresentsElevationSurface,
FixedRangePerBand,
};

enum class MeshElevationMode /BaseType=IntEnum/
{
FixedElevationRange,
FromVertices
};

enum class BetweenLineConstraint /BaseType=IntEnum/
Expand Down Expand Up @@ -2858,6 +2873,8 @@ QFlags<Qgis::ProjectReadFlag> operator|(Qgis::ProjectReadFlag f1, QFlags<Qgis::P

QFlags<Qgis::RasterRendererFlag> operator|(Qgis::RasterRendererFlag f1, QFlags<Qgis::RasterRendererFlag> f2);

QFlags<Qgis::RasterRendererCapability> operator|(Qgis::RasterRendererCapability f1, QFlags<Qgis::RasterRendererCapability> f2);

QFlags<Qgis::RasterTemporalCapabilityFlag> operator|(Qgis::RasterTemporalCapabilityFlag f1, QFlags<Qgis::RasterTemporalCapabilityFlag> f2);

QFlags<Qgis::RelationshipCapability> operator|(Qgis::RelationshipCapability f1, QFlags<Qgis::RelationshipCapability> f2);
Expand Down
Expand Up @@ -46,6 +46,8 @@ Constructor for QgsRasterLayerElevationProperties, with the specified ``parent``

virtual bool showByDefaultInElevationProfilePlots() const;

virtual QgsMapLayerElevationProperties::Flags flags() const;


bool isEnabled() const;
%Docstring
Expand Down Expand Up @@ -134,6 +136,42 @@ Sets the fixed elevation ``range`` for the raster.

.. seealso:: :py:func:`fixedRange`

.. versionadded:: 3.38
%End

QMap<int, QgsDoubleRange> fixedRangePerBand() const;
%Docstring
Returns the fixed elevation range for each band.

.. note::

This is only considered when :py:func:`~QgsRasterLayerElevationProperties.mode` is :py:class:`Qgis`.RasterElevationMode.FixedRangePerBand.

.. note::

When a fixed range is set any :py:func:`~QgsRasterLayerElevationProperties.zOffset` and :py:func:`~QgsRasterLayerElevationProperties.zScale` is ignored.


.. seealso:: :py:func:`setFixedRangePerBand`

.. versionadded:: 3.38
%End

void setFixedRangePerBand( const QMap<int, QgsDoubleRange> &ranges );
%Docstring
Sets the fixed elevation range for each band.

.. note::

This is only considered when :py:func:`~QgsRasterLayerElevationProperties.mode` is :py:class:`Qgis`.RasterElevationMode.FixedRangePerBand.

.. note::

When a fixed range is set any :py:func:`~QgsRasterLayerElevationProperties.zOffset` and :py:func:`~QgsRasterLayerElevationProperties.zScale` is ignored.


.. seealso:: :py:func:`fixedRangePerBand`

.. versionadded:: 3.38
%End

Expand Down
@@ -0,0 +1,72 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrasterrendererregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/






class QgsRasterRendererRegistry
{
%Docstring(signature="appended")
Registry for raster renderers.

:py:class:`QgsRasterRendererRegistry` is not usually directly created, but rather accessed through
:py:func:`QgsApplication.rasterRendererRegistry()`.

.. note::

Exposed to Python bindings in QGIS 3.38
%End

%TypeHeaderCode
#include "qgsrasterrendererregistry.h"
%End
public:

QgsRasterRendererRegistry();
%Docstring
Constructor for QgsRasterRendererRegistry.

QgsRasterRendererRegistry is not usually directly created, but rather accessed through
:py:func:`QgsApplication.rasterRendererRegistry()`.

The registry is pre-populated with standard raster renderers.
%End




QStringList renderersList() const;
%Docstring
Returns a list of the names of registered renderers.
%End


Qgis::RasterRendererCapabilities rendererCapabilities( const QString &rendererName ) const;
%Docstring
Returns the capabilities for the renderer with the specified name.

.. versionadded:: 3.38
%End

QgsRasterRenderer *defaultRendererForDrawingStyle( Qgis::RasterDrawingStyle drawingStyle, QgsRasterDataProvider *provider ) const /Factory/;
%Docstring
Creates a default renderer for a raster drawing style (considering user options such as default contrast enhancement).
Caller takes ownership.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrasterrendererregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
1 change: 1 addition & 0 deletions python/PyQt6/core/core_auto.sip
Expand Up @@ -642,6 +642,7 @@
%Include auto_generated/raster/qgsrasterpyramid.sip
%Include auto_generated/raster/qgsrasterrange.sip
%Include auto_generated/raster/qgsrasterrenderer.sip
%Include auto_generated/raster/qgsrasterrendererregistry.sip
%Include auto_generated/raster/qgsrasterrendererutils.sip
%Include auto_generated/raster/qgsrasterresamplefilter.sip
%Include auto_generated/raster/qgsrasterresampler.sip
Expand Down
16 changes: 15 additions & 1 deletion python/core/auto_additions/qgis.py
Expand Up @@ -1253,6 +1253,13 @@
Qgis.RasterRendererFlags.baseClass = Qgis
RasterRendererFlags = Qgis # dirty hack since SIP seems to introduce the flags in module
# monkey patching scoped based enum
Qgis.RasterRendererCapability.UsesMultipleBands.__doc__ = "The renderer utilizes multiple raster bands for color data (note that alpha bands are not considered for this capability)"
Qgis.RasterRendererCapability.__doc__ = "Raster renderer capabilities.\n\n.. versionadded:: 3.48\n\n" + '* ``UsesMultipleBands``: ' + Qgis.RasterRendererCapability.UsesMultipleBands.__doc__
# --
Qgis.RasterRendererCapability.baseClass = Qgis
Qgis.RasterRendererCapabilities.baseClass = Qgis
RasterRendererCapabilities = Qgis # dirty hack since SIP seems to introduce the flags in module
# monkey patching scoped based enum
Qgis.RasterAttributeTableFieldUsage.Generic.__doc__ = "Field usage Generic"
Qgis.RasterAttributeTableFieldUsage.PixelCount.__doc__ = "Field usage PixelCount"
Qgis.RasterAttributeTableFieldUsage.Name.__doc__ = "Field usage Name"
Expand Down Expand Up @@ -3176,10 +3183,17 @@
# monkey patching scoped based enum
Qgis.RasterElevationMode.FixedElevationRange.__doc__ = "Layer has a fixed elevation range"
Qgis.RasterElevationMode.RepresentsElevationSurface.__doc__ = "Pixel values represent an elevation surface"
Qgis.RasterElevationMode.__doc__ = "Raster layer elevation modes.\n\n.. versionadded:: 3.38\n\n" + '* ``FixedElevationRange``: ' + Qgis.RasterElevationMode.FixedElevationRange.__doc__ + '\n' + '* ``RepresentsElevationSurface``: ' + Qgis.RasterElevationMode.RepresentsElevationSurface.__doc__
Qgis.RasterElevationMode.FixedRangePerBand.__doc__ = "Layer has a fixed elevation range per band"
Qgis.RasterElevationMode.__doc__ = "Raster layer elevation modes.\n\n.. versionadded:: 3.38\n\n" + '* ``FixedElevationRange``: ' + Qgis.RasterElevationMode.FixedElevationRange.__doc__ + '\n' + '* ``RepresentsElevationSurface``: ' + Qgis.RasterElevationMode.RepresentsElevationSurface.__doc__ + '\n' + '* ``FixedRangePerBand``: ' + Qgis.RasterElevationMode.FixedRangePerBand.__doc__
# --
Qgis.RasterElevationMode.baseClass = Qgis
# monkey patching scoped based enum
Qgis.MeshElevationMode.FixedElevationRange.__doc__ = "Layer has a fixed elevation range"
Qgis.MeshElevationMode.FromVertices.__doc__ = "Elevation should be taken from mesh vertices"
Qgis.MeshElevationMode.__doc__ = "Mesh layer elevation modes.\n\n.. versionadded:: 3.38\n\n" + '* ``FixedElevationRange``: ' + Qgis.MeshElevationMode.FixedElevationRange.__doc__ + '\n' + '* ``FromVertices``: ' + Qgis.MeshElevationMode.FromVertices.__doc__
# --
Qgis.MeshElevationMode.baseClass = Qgis
# monkey patching scoped based enum
Qgis.NoConstraint = Qgis.BetweenLineConstraint.NoConstraint
Qgis.NoConstraint.is_monkey_patched = True
Qgis.BetweenLineConstraint.NoConstraint.__doc__ = "No additional constraint"
Expand Down
Expand Up @@ -46,6 +46,62 @@ Constructor for QgsMeshLayerElevationProperties, with the specified ``parent`` o

virtual bool showByDefaultInElevationProfilePlots() const;

virtual QgsMapLayerElevationProperties::Flags flags() const;


Qgis::MeshElevationMode mode() const;
%Docstring
Returns the elevation mode.

.. seealso:: :py:func:`setMode`

.. versionadded:: 3.38
%End

void setMode( Qgis::MeshElevationMode mode );
%Docstring
Sets the elevation ``mode``.

.. seealso:: :py:func:`mode`

.. versionadded:: 3.38
%End

QgsDoubleRange fixedRange() const;
%Docstring
Returns the fixed elevation range for the mesh.

.. note::

This is only considered when :py:func:`~QgsMeshLayerElevationProperties.mode` is :py:class:`Qgis`.MeshElevationMode.FixedElevationRange.

.. note::

When a fixed range is set any :py:func:`~QgsMeshLayerElevationProperties.zOffset` and :py:func:`~QgsMeshLayerElevationProperties.zScale` is ignored.


.. seealso:: :py:func:`setFixedRange`

.. versionadded:: 3.38
%End

void setFixedRange( const QgsDoubleRange &range );
%Docstring
Sets the fixed elevation ``range`` for the mesh.

.. note::

This is only considered when :py:func:`~QgsMeshLayerElevationProperties.mode` is :py:class:`Qgis`.MeshElevationMode.FixedElevationRange.

.. note::

When a fixed range is set any :py:func:`~QgsMeshLayerElevationProperties.zOffset` and :py:func:`~QgsMeshLayerElevationProperties.zScale` is ignored.


.. seealso:: :py:func:`fixedRange`

.. versionadded:: 3.38
%End

QgsLineSymbol *profileLineSymbol() const;
%Docstring
Expand Down

0 comments on commit 36cafc3

Please sign in to comment.