Skip to content

Commit

Permalink
sipify
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Nov 29, 2024
1 parent f68eb9d commit a8f97e5
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 52 deletions.
28 changes: 28 additions & 0 deletions python/PyQt6/core/auto_additions/qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10947,6 +10947,34 @@
"""
# --
Qgis.MouseHandlesAction.baseClass = Qgis
# monkey patching scoped based enum
Qgis.MeshRangeLimit.NotSet.__doc__ = "User defined"
Qgis.MeshRangeLimit.MinimumMaximum.__doc__ = "Real min-max values"
Qgis.MeshRangeLimit.__doc__ = """Describes the limits used to compute mesh ranges (min/max values).

.. versionadded:: 3.42

* ``NotSet``: User defined
* ``MinimumMaximum``: Real min-max values

"""
# --
Qgis.MeshRangeLimit.baseClass = Qgis
# monkey patching scoped based enum
Qgis.MeshRangeExtent.WholeMesh.__doc__ = "Whole mesh is used to compute statistics"
Qgis.MeshRangeExtent.FixedCanvas.__doc__ = "Current extent of the canvas (at the time of computation) is used to compute statistics"
Qgis.MeshRangeExtent.UpdatedCanvas.__doc__ = "Constantly updated extent of the canvas is used to compute statistics"
Qgis.MeshRangeExtent.__doc__ = """Describes the extent used to compute mesh ranges (min/max values).

.. versionadded:: 3.42

* ``WholeMesh``: Whole mesh is used to compute statistics
* ``FixedCanvas``: Current extent of the canvas (at the time of computation) is used to compute statistics
* ``UpdatedCanvas``: Constantly updated extent of the canvas is used to compute statistics

"""
# --
Qgis.MeshRangeExtent.baseClass = Qgis
try:
Qgis.__attribute_docs__ = {'QGIS_DEV_VERSION': 'The development version', 'DEFAULT_SEARCH_RADIUS_MM': 'Identify search radius in mm', 'DEFAULT_MAPTOPIXEL_THRESHOLD': 'Default threshold between map coordinates and device coordinates for map2pixel simplification', 'DEFAULT_HIGHLIGHT_COLOR': 'Default highlight color. The transparency is expected to only be applied to polygon\nfill. Lines and outlines are rendered opaque.', 'DEFAULT_HIGHLIGHT_BUFFER_MM': 'Default highlight buffer in mm.', 'DEFAULT_HIGHLIGHT_MIN_WIDTH_MM': 'Default highlight line/stroke minimum width in mm.', 'SCALE_PRECISION': 'Fudge factor used to compare two scales. The code is often going from scale to scale\ndenominator. So it looses precision and, when a limit is inclusive, can lead to errors.\nTo avoid that, use this factor instead of using <= or >=.\n\n.. deprecated:: 3.40\n\n No longer used by QGIS and will be removed in QGIS 4.0.', 'DEFAULT_Z_COORDINATE': 'Default Z coordinate value.\nThis value have to be assigned to the Z coordinate for the vertex.', 'DEFAULT_M_COORDINATE': 'Default M coordinate value.\nThis value have to be assigned to the M coordinate for the vertex.\n\n.. versionadded:: 3.20', 'UI_SCALE_FACTOR': 'UI scaling factor. This should be applied to all widget sizes obtained from font metrics,\nto account for differences in the default font sizes across different platforms.', 'DEFAULT_SNAP_TOLERANCE': 'Default snapping distance tolerance.', 'DEFAULT_SNAP_UNITS': 'Default snapping distance units.'}
Qgis.version = staticmethod(Qgis.version)
Expand Down
14 changes: 0 additions & 14 deletions python/PyQt6/core/auto_additions/qgsmeshrenderersettings.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
# The following has been generated automatically from src/core/mesh/qgsmeshrenderersettings.h
QgsMeshRendererScalarSettings.NoResampling = QgsMeshRendererScalarSettings.DataResamplingMethod.NoResampling
QgsMeshRendererScalarSettings.NeighbourAverage = QgsMeshRendererScalarSettings.DataResamplingMethod.NeighbourAverage
# monkey patching scoped based enum
QgsMeshRendererScalarSettings.MinMaxValueType.UserDefined.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.WholeMesh.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.FixedCanvas.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.InteractiveFromCanvas.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.__doc__ = """This enumerator describes the extent used to compute min/max values
* ``UserDefined``:
* ``WholeMesh``:
* ``FixedCanvas``:
* ``InteractiveFromCanvas``:
"""
# --
QgsMeshRendererVectorArrowSettings.MinMax = QgsMeshRendererVectorArrowSettings.ArrowScalingMethod.MinMax
QgsMeshRendererVectorArrowSettings.Scaled = QgsMeshRendererVectorArrowSettings.ArrowScalingMethod.Scaled
QgsMeshRendererVectorArrowSettings.Fixed = QgsMeshRendererVectorArrowSettings.ArrowScalingMethod.Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@ Represents a mesh renderer settings for scalar datasets
NeighbourAverage,
};

enum class MinMaxValueType
{
UserDefined,
WholeMesh,
FixedCanvas,
InteractiveFromCanvas,
};

QgsColorRampShader colorRampShader() const;
%Docstring
Returns color ramp shader function
Expand Down Expand Up @@ -188,16 +180,30 @@ Sets the stroke width unit used to render edges scalar dataset
.. versionadded:: 3.14
%End

QgsMeshRendererScalarSettings::MinMaxValueType minMaxValueType() const;
void setLimits( Qgis::MeshRangeLimit limits );
%Docstring
Sets the range limits type for minimum maximum calculation

.. versionadded:: 3.42
%End

Qgis::MeshRangeLimit limits() const;
%Docstring
Returns the range limits type for minimum maximum calculation

.. versionadded:: 3.42
%End

void setExtent( Qgis::MeshRangeExtent extent );
%Docstring
Gets the extent type for minimum maximum calculation
Sets the mesh extent for minimum maximum calculation

.. versionadded:: 3.42
%End

void setMinMaxValueType( QgsMeshRendererScalarSettings::MinMaxValueType minMaxValueType );
Qgis::MeshRangeExtent extent() const;
%Docstring
Sets the extent type for minimum maximum calculation
Returns the mesh extent for minimum maximum calculation

.. versionadded:: 3.42
%End
Expand Down
13 changes: 13 additions & 0 deletions python/PyQt6/core/auto_generated/qgis.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -3205,6 +3205,19 @@ The development version
NoAction
};

enum class MeshRangeLimit /BaseType=IntEnum/
{
NotSet,
MinimumMaximum,
};

enum class MeshRangeExtent /BaseType=IntEnum/
{
WholeMesh,
FixedCanvas,
UpdatedCanvas,
};

static const double DEFAULT_SEARCH_RADIUS_MM;

static const float DEFAULT_MAPTOPIXEL_THRESHOLD;
Expand Down
28 changes: 28 additions & 0 deletions python/core/auto_additions/qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10857,6 +10857,34 @@
"""
# --
Qgis.MouseHandlesAction.baseClass = Qgis
# monkey patching scoped based enum
Qgis.MeshRangeLimit.NotSet.__doc__ = "User defined"
Qgis.MeshRangeLimit.MinimumMaximum.__doc__ = "Real min-max values"
Qgis.MeshRangeLimit.__doc__ = """Describes the limits used to compute mesh ranges (min/max values).

.. versionadded:: 3.42

* ``NotSet``: User defined
* ``MinimumMaximum``: Real min-max values

"""
# --
Qgis.MeshRangeLimit.baseClass = Qgis
# monkey patching scoped based enum
Qgis.MeshRangeExtent.WholeMesh.__doc__ = "Whole mesh is used to compute statistics"
Qgis.MeshRangeExtent.FixedCanvas.__doc__ = "Current extent of the canvas (at the time of computation) is used to compute statistics"
Qgis.MeshRangeExtent.UpdatedCanvas.__doc__ = "Constantly updated extent of the canvas is used to compute statistics"
Qgis.MeshRangeExtent.__doc__ = """Describes the extent used to compute mesh ranges (min/max values).

.. versionadded:: 3.42

* ``WholeMesh``: Whole mesh is used to compute statistics
* ``FixedCanvas``: Current extent of the canvas (at the time of computation) is used to compute statistics
* ``UpdatedCanvas``: Constantly updated extent of the canvas is used to compute statistics

"""
# --
Qgis.MeshRangeExtent.baseClass = Qgis
from enum import Enum


Expand Down
14 changes: 0 additions & 14 deletions python/core/auto_additions/qgsmeshrenderersettings.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# The following has been generated automatically from src/core/mesh/qgsmeshrenderersettings.h
# monkey patching scoped based enum
QgsMeshRendererScalarSettings.MinMaxValueType.UserDefined.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.WholeMesh.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.FixedCanvas.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.InteractiveFromCanvas.__doc__ = ""
QgsMeshRendererScalarSettings.MinMaxValueType.__doc__ = """This enumerator describes the extent used to compute min/max values
* ``UserDefined``:
* ``WholeMesh``:
* ``FixedCanvas``:
* ``InteractiveFromCanvas``:
"""
# --
# monkey patching scoped based enum
QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit.MetersPerSecond.__doc__ = "Meters per second"
QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit.KilometersPerHour.__doc__ = "Kilometers per hour"
QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit.Knots.__doc__ = "Knots (Nautical miles per hour)"
Expand Down
30 changes: 18 additions & 12 deletions python/core/auto_generated/mesh/qgsmeshrenderersettings.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@ Represents a mesh renderer settings for scalar datasets
NeighbourAverage,
};

enum class MinMaxValueType
{
UserDefined,
WholeMesh,
FixedCanvas,
InteractiveFromCanvas,
};

QgsColorRampShader colorRampShader() const;
%Docstring
Returns color ramp shader function
Expand Down Expand Up @@ -188,16 +180,30 @@ Sets the stroke width unit used to render edges scalar dataset
.. versionadded:: 3.14
%End

QgsMeshRendererScalarSettings::MinMaxValueType minMaxValueType() const;
void setLimits( Qgis::MeshRangeLimit limits );
%Docstring
Sets the range limits type for minimum maximum calculation

.. versionadded:: 3.42
%End

Qgis::MeshRangeLimit limits() const;
%Docstring
Returns the range limits type for minimum maximum calculation

.. versionadded:: 3.42
%End

void setExtent( Qgis::MeshRangeExtent extent );
%Docstring
Gets the extent type for minimum maximum calculation
Sets the mesh extent for minimum maximum calculation

.. versionadded:: 3.42
%End

void setMinMaxValueType( QgsMeshRendererScalarSettings::MinMaxValueType minMaxValueType );
Qgis::MeshRangeExtent extent() const;
%Docstring
Sets the extent type for minimum maximum calculation
Returns the mesh extent for minimum maximum calculation

.. versionadded:: 3.42
%End
Expand Down
13 changes: 13 additions & 0 deletions python/core/auto_generated/qgis.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -3205,6 +3205,19 @@ The development version
NoAction
};

enum class MeshRangeLimit
{
NotSet,
MinimumMaximum,
};

enum class MeshRangeExtent
{
WholeMesh,
FixedCanvas,
UpdatedCanvas,
};

static const double DEFAULT_SEARCH_RADIUS_MM;

static const float DEFAULT_MAPTOPIXEL_THRESHOLD;
Expand Down

0 comments on commit a8f97e5

Please sign in to comment.