Skip to content
Permalink
Browse files
Rebase to master
  • Loading branch information
domi4484 committed Jan 10, 2022
1 parent 4b8485f commit 028eaf839d67d93d0f80a00cc51a247f57c6fe50
@@ -773,12 +773,12 @@
Qgis.TemporalIntervalMatchMethod.__doc__ = 'Method to use when resolving a temporal range to a data provider layer or band.\n\n.. versionadded:: 3.22\n\n' + '* ``MatchUsingWholeRange``: ' + Qgis.TemporalIntervalMatchMethod.MatchUsingWholeRange.__doc__ + '\n' + '* ``MatchExactUsingStartOfRange``: ' + Qgis.TemporalIntervalMatchMethod.MatchExactUsingStartOfRange.__doc__ + '\n' + '* ``MatchExactUsingEndOfRange``: ' + Qgis.TemporalIntervalMatchMethod.MatchExactUsingEndOfRange.__doc__ + '\n' + '* ``FindClosestMatchToStartOfRange``: ' + Qgis.TemporalIntervalMatchMethod.FindClosestMatchToStartOfRange.__doc__ + '\n' + '* ``FindClosestMatchToEndOfRange``: ' + Qgis.TemporalIntervalMatchMethod.FindClosestMatchToEndOfRange.__doc__
# --
Qgis.TemporalIntervalMatchMethod.baseClass = Qgis
QgsCoordinateTransform.TransformDirection = Qgis.TransformDirection
# monkey patching scoped based enum
Qgis.CoordinateType.XY.__doc__ = "Coordinate defined by X and Y values"
Qgis.CoordinateType.Point.__doc__ = "Coordinate defined by a point"
Qgis.CoordinateType.__doc__ = 'Types of coordinate definitions\n\n.. versionadded:: 3.22\n\n' + '* ``XY``: ' + Qgis.CoordinateType.XY.__doc__ + '\n' + '* ``Point``: ' + Qgis.CoordinateType.Point.__doc__
# --
Qgis.CoordinateType.baseClass = Qgis
QgsCoordinateTransform.ForwardTransform = Qgis.TransformDirection.Forward
QgsCoordinateTransform.ForwardTransform.is_monkey_patched = True
QgsCoordinateTransform.ForwardTransform.__doc__ = "Forward transform (from source to destination)"
QgsCoordinateTransform.ReverseTransform = Qgis.TransformDirection.Reverse
QgsCoordinateTransform.ReverseTransform.is_monkey_patched = True
QgsCoordinateTransform.ReverseTransform.__doc__ = "Reverse/inverse transform (from destination to source)"
Qgis.TransformDirection.__doc__ = 'Indicates the direction (forward or inverse) of a transform.\n\n.. versionadded:: 3.22\n\n' + '* ``ForwardTransform``: ' + Qgis.TransformDirection.Forward.__doc__ + '\n' + '* ``ReverseTransform``: ' + Qgis.TransformDirection.Reverse.__doc__
@@ -554,10 +554,10 @@ The development version
FindClosestMatchToEndOfRange
};

enum class CoordinateType
{
XY,
Point
enum class TransformDirection
{
Forward,
Reverse
};

enum class MapSettingsFlag
@@ -219,13 +219,6 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapToolAdvancedDigitizing
bool createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes );
bool createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes );

bool createAuxiliaryFields( QgsPalIndexes &palIndexes );
bool createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &palIndexes ) const;
bool createAuxiliaryFields( QgsDiagramIndexes &diagIndexes );
bool createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &diagIndexes );
bool createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes );
bool createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes );

void updateHoveredLabel( QgsMapMouseEvent *e );
void clearHoveredLabel();
virtual bool canModifyLabel( const LabelDetails &label );
@@ -243,18 +243,18 @@ void QgsMapToolMoveLabel::cadCanvasPressEvent( QgsMapMouseEvent *e )
return;
}
}
}

mStartPointMapCoords = e->mapPoint();
QgsPointXY referencePoint;
if ( !currentLabelRotationPoint( referencePoint, !currentLabelPreserveRotation() ) )
{
referencePoint.setX( mCurrentLabel.pos.labelRect.xMinimum() );
referencePoint.setY( mCurrentLabel.pos.labelRect.yMinimum() );
mStartPointMapCoords = e->mapPoint();
QgsPointXY referencePoint;
if ( !currentLabelRotationPoint( referencePoint, !currentLabelPreserveRotation() ) )
{
referencePoint.setX( mCurrentLabel.pos.labelRect.xMinimum() );
referencePoint.setY( mCurrentLabel.pos.labelRect.yMinimum() );
}
mClickOffsetX = mStartPointMapCoords.x() - referencePoint.x();
mClickOffsetY = mStartPointMapCoords.y() - referencePoint.y();
createRubberBands();
}
mClickOffsetX = mStartPointMapCoords.x() - referencePoint.x();
mClickOffsetY = mStartPointMapCoords.y() - referencePoint.y();
createRubberBands();
}
}
else
@@ -902,6 +902,17 @@ class CORE_EXPORT Qgis
Q_ENUM( TemporalIntervalMatchMethod )

/**
* Indicates the direction (forward or inverse) of a transform.
*
* \since QGIS 3.22
*/
enum class TransformDirection SIP_MONKEYPATCH_SCOPEENUM_UNNEST( QgsCoordinateTransform, TransformDirection ) : int
{
Forward SIP_MONKEYPATCH_COMPAT_NAME( ForwardTransform ), //!< Forward transform (from source to destination)
Reverse SIP_MONKEYPATCH_COMPAT_NAME( ReverseTransform ) //!< Reverse/inverse transform (from destination to source)
};
Q_ENUM( TransformDirection )

/**
* Flags which adjust the way maps are rendered.
*
@@ -3934,8 +3934,8 @@ font-style: italic;</string>
<rect>
<x>0</x>
<y>0</y>
<width>488</width>
<height>404</height>
<width>159</width>
<height>211</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_46">
@@ -6950,6 +6950,9 @@ font-style: italic;</string>
<tabstop>mGeometryGeneratorGroupBox</tabstop>
<tabstop>mGeometryGeneratorExpressionButton</tabstop>
<tabstop>mGeometryGeneratorType</tabstop>
<tabstop>mCoordXDDBtn</tabstop>
<tabstop>mCoordYDDBtn</tabstop>
<tabstop>mCoordPointDDBtn</tabstop>
<tabstop>mCoordAlignmentHDDBtn</tabstop>
<tabstop>mCoordAlignmentVDDBtn</tabstop>
<tabstop>mCoordRotationDDBtn</tabstop>

0 comments on commit 028eaf8

Please sign in to comment.