mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Rename rotation enum keys
This commit is contained in:
parent
ce2c8ac21f
commit
8c7edbeec2
@ -11505,10 +11505,10 @@ Qgis.MouseHandlesAction.ResizeLeftUp.__doc__ = "Resize left up (Top left handle)
|
||||
Qgis.MouseHandlesAction.ResizeRightUp.__doc__ = "Resize right up (Top right handle)"
|
||||
Qgis.MouseHandlesAction.ResizeLeftDown.__doc__ = "Resize left down (Bottom left handle)"
|
||||
Qgis.MouseHandlesAction.ResizeRightDown.__doc__ = "Resize right down (Bottom right handle)"
|
||||
Qgis.MouseHandlesAction.RotateLeftUp.__doc__ = "Rotate from top left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateRightUp.__doc__ = "Rotate from top right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateLeftDown.__doc__ = "Rotate from bottom left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateRightDown.__doc__ = "Rotate right bottom right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateTopLeft.__doc__ = "Rotate from top left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateTopRight.__doc__ = "Rotate from top right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateBottomLeft.__doc__ = "Rotate from bottom left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateBottomRight.__doc__ = "Rotate right bottom right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.SelectItem.__doc__ = "Select item"
|
||||
Qgis.MouseHandlesAction.NoAction.__doc__ = "No action"
|
||||
Qgis.MouseHandlesAction.__doc__ = """Action to be performed by the mouse handles
|
||||
@ -11524,19 +11524,19 @@ Qgis.MouseHandlesAction.__doc__ = """Action to be performed by the mouse handles
|
||||
* ``ResizeRightUp``: Resize right up (Top right handle)
|
||||
* ``ResizeLeftDown``: Resize left down (Bottom left handle)
|
||||
* ``ResizeRightDown``: Resize right down (Bottom right handle)
|
||||
* ``RotateLeftUp``: Rotate from top left handle.
|
||||
* ``RotateTopLeft``: Rotate from top left handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
* ``RotateRightUp``: Rotate from top right handle.
|
||||
* ``RotateTopRight``: Rotate from top right handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
* ``RotateLeftDown``: Rotate from bottom left handle.
|
||||
* ``RotateBottomLeft``: Rotate from bottom left handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
* ``RotateRightDown``: Rotate right bottom right handle.
|
||||
* ``RotateBottomRight``: Rotate right bottom right handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
|
@ -3347,10 +3347,10 @@ The development version
|
||||
ResizeRightUp,
|
||||
ResizeLeftDown,
|
||||
ResizeRightDown,
|
||||
RotateLeftUp,
|
||||
RotateRightUp,
|
||||
RotateLeftDown,
|
||||
RotateRightDown,
|
||||
RotateTopLeft,
|
||||
RotateTopRight,
|
||||
RotateBottomLeft,
|
||||
RotateBottomRight,
|
||||
SelectItem,
|
||||
NoAction
|
||||
};
|
||||
|
@ -11411,10 +11411,10 @@ Qgis.MouseHandlesAction.ResizeLeftUp.__doc__ = "Resize left up (Top left handle)
|
||||
Qgis.MouseHandlesAction.ResizeRightUp.__doc__ = "Resize right up (Top right handle)"
|
||||
Qgis.MouseHandlesAction.ResizeLeftDown.__doc__ = "Resize left down (Bottom left handle)"
|
||||
Qgis.MouseHandlesAction.ResizeRightDown.__doc__ = "Resize right down (Bottom right handle)"
|
||||
Qgis.MouseHandlesAction.RotateLeftUp.__doc__ = "Rotate from top left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateRightUp.__doc__ = "Rotate from top right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateLeftDown.__doc__ = "Rotate from bottom left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateRightDown.__doc__ = "Rotate right bottom right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateTopLeft.__doc__ = "Rotate from top left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateTopRight.__doc__ = "Rotate from top right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateBottomLeft.__doc__ = "Rotate from bottom left handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.RotateBottomRight.__doc__ = "Rotate right bottom right handle. \n.. versionadded:: 4.0"
|
||||
Qgis.MouseHandlesAction.SelectItem.__doc__ = "Select item"
|
||||
Qgis.MouseHandlesAction.NoAction.__doc__ = "No action"
|
||||
Qgis.MouseHandlesAction.__doc__ = """Action to be performed by the mouse handles
|
||||
@ -11430,19 +11430,19 @@ Qgis.MouseHandlesAction.__doc__ = """Action to be performed by the mouse handles
|
||||
* ``ResizeRightUp``: Resize right up (Top right handle)
|
||||
* ``ResizeLeftDown``: Resize left down (Bottom left handle)
|
||||
* ``ResizeRightDown``: Resize right down (Bottom right handle)
|
||||
* ``RotateLeftUp``: Rotate from top left handle.
|
||||
* ``RotateTopLeft``: Rotate from top left handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
* ``RotateRightUp``: Rotate from top right handle.
|
||||
* ``RotateTopRight``: Rotate from top right handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
* ``RotateLeftDown``: Rotate from bottom left handle.
|
||||
* ``RotateBottomLeft``: Rotate from bottom left handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
* ``RotateRightDown``: Rotate right bottom right handle.
|
||||
* ``RotateBottomRight``: Rotate right bottom right handle.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
|
@ -3347,10 +3347,10 @@ The development version
|
||||
ResizeRightUp,
|
||||
ResizeLeftDown,
|
||||
ResizeRightDown,
|
||||
RotateLeftUp,
|
||||
RotateRightUp,
|
||||
RotateLeftDown,
|
||||
RotateRightDown,
|
||||
RotateTopLeft,
|
||||
RotateTopRight,
|
||||
RotateBottomLeft,
|
||||
RotateBottomRight,
|
||||
SelectItem,
|
||||
NoAction
|
||||
};
|
||||
|
@ -5897,10 +5897,10 @@ class CORE_EXPORT Qgis
|
||||
ResizeRightUp, //!< Resize right up (Top right handle)
|
||||
ResizeLeftDown, //!< Resize left down (Bottom left handle)
|
||||
ResizeRightDown, //!< Resize right down (Bottom right handle)
|
||||
RotateLeftUp, //!< Rotate from top left handle. \since QGIS 4.0
|
||||
RotateRightUp, //!< Rotate from top right handle. \since QGIS 4.0
|
||||
RotateLeftDown, //!< Rotate from bottom left handle. \since QGIS 4.0
|
||||
RotateRightDown, //!< Rotate right bottom right handle. \since QGIS 4.0
|
||||
RotateTopLeft, //!< Rotate from top left handle. \since QGIS 4.0
|
||||
RotateTopRight, //!< Rotate from top right handle. \since QGIS 4.0
|
||||
RotateBottomLeft, //!< Rotate from bottom left handle. \since QGIS 4.0
|
||||
RotateBottomRight, //!< Rotate right bottom right handle. \since QGIS 4.0
|
||||
SelectItem, //!< Select item
|
||||
NoAction //!< No action
|
||||
};
|
||||
|
@ -196,10 +196,10 @@ void QgsLayoutGuiUtils::registerGuiForKnownItemTypes( QgsMapCanvas *mapCanvas )
|
||||
case Qgis::MouseHandlesAction::MoveItem:
|
||||
case Qgis::MouseHandlesAction::NoAction:
|
||||
case Qgis::MouseHandlesAction::SelectItem:
|
||||
case Qgis::MouseHandlesAction::RotateLeftUp:
|
||||
case Qgis::MouseHandlesAction::RotateRightUp:
|
||||
case Qgis::MouseHandlesAction::RotateLeftDown:
|
||||
case Qgis::MouseHandlesAction::RotateRightDown:
|
||||
case Qgis::MouseHandlesAction::RotateTopLeft:
|
||||
case Qgis::MouseHandlesAction::RotateTopRight:
|
||||
case Qgis::MouseHandlesAction::RotateBottomLeft:
|
||||
case Qgis::MouseHandlesAction::RotateBottomRight:
|
||||
return;
|
||||
|
||||
case Qgis::MouseHandlesAction::ResizeUp:
|
||||
|
@ -411,10 +411,10 @@ Qt::CursorShape QgsGraphicsViewMouseHandles::cursorForPosition( QPointF itemCoor
|
||||
case Qgis::MouseHandlesAction::SelectItem:
|
||||
return Qt::ArrowCursor;
|
||||
|
||||
case Qgis::MouseHandlesAction::RotateLeftUp:
|
||||
case Qgis::MouseHandlesAction::RotateRightUp:
|
||||
case Qgis::MouseHandlesAction::RotateLeftDown:
|
||||
case Qgis::MouseHandlesAction::RotateRightDown:
|
||||
case Qgis::MouseHandlesAction::RotateTopLeft:
|
||||
case Qgis::MouseHandlesAction::RotateTopRight:
|
||||
case Qgis::MouseHandlesAction::RotateBottomLeft:
|
||||
case Qgis::MouseHandlesAction::RotateBottomRight:
|
||||
return Qt::PointingHandCursor;
|
||||
}
|
||||
|
||||
@ -515,19 +515,19 @@ Qgis::MouseHandlesAction QgsGraphicsViewMouseHandles::mouseActionForPosition( QP
|
||||
}
|
||||
else if ( nearLeftInner && nearUpperInner )
|
||||
{
|
||||
return Qgis::MouseHandlesAction::RotateLeftUp;
|
||||
return Qgis::MouseHandlesAction::RotateTopLeft;
|
||||
}
|
||||
else if ( nearRightInner && nearUpperInner )
|
||||
{
|
||||
return Qgis::MouseHandlesAction::RotateRightUp;
|
||||
return Qgis::MouseHandlesAction::RotateTopRight;
|
||||
}
|
||||
else if ( nearLeftInner && nearLowerInner )
|
||||
{
|
||||
return Qgis::MouseHandlesAction::RotateLeftDown;
|
||||
return Qgis::MouseHandlesAction::RotateBottomLeft;
|
||||
}
|
||||
else if ( nearRightInner && nearLowerInner )
|
||||
{
|
||||
return Qgis::MouseHandlesAction::RotateRightDown;
|
||||
return Qgis::MouseHandlesAction::RotateBottomRight;
|
||||
}
|
||||
|
||||
//find out if cursor position is over a selected item
|
||||
@ -655,10 +655,10 @@ void QgsGraphicsViewMouseHandles::mousePressEvent( QGraphicsSceneMouseEvent *eve
|
||||
mCursorOffset = calcCursorEdgeOffset( mMouseMoveStartPos );
|
||||
break;
|
||||
|
||||
case Qgis::MouseHandlesAction::RotateLeftUp:
|
||||
case Qgis::MouseHandlesAction::RotateRightUp:
|
||||
case Qgis::MouseHandlesAction::RotateLeftDown:
|
||||
case Qgis::MouseHandlesAction::RotateRightDown:
|
||||
case Qgis::MouseHandlesAction::RotateTopLeft:
|
||||
case Qgis::MouseHandlesAction::RotateTopRight:
|
||||
case Qgis::MouseHandlesAction::RotateBottomLeft:
|
||||
case Qgis::MouseHandlesAction::RotateBottomRight:
|
||||
mIsRotating = true;
|
||||
mRotationCenter = sceneTransform().map( rect().center() );
|
||||
mRotationBegin = std::atan2( mMouseMoveStartPos.y() - mRotationCenter.y(), mMouseMoveStartPos.x() - mRotationCenter.x() ) * 180 / M_PI;
|
||||
@ -1217,10 +1217,10 @@ void QgsGraphicsViewMouseHandles::resizeMouseMove( QPointF currentPosition, bool
|
||||
break;
|
||||
}
|
||||
|
||||
case Qgis::MouseHandlesAction::RotateLeftUp:
|
||||
case Qgis::MouseHandlesAction::RotateRightUp:
|
||||
case Qgis::MouseHandlesAction::RotateLeftDown:
|
||||
case Qgis::MouseHandlesAction::RotateRightDown:
|
||||
case Qgis::MouseHandlesAction::RotateTopLeft:
|
||||
case Qgis::MouseHandlesAction::RotateTopRight:
|
||||
case Qgis::MouseHandlesAction::RotateBottomLeft:
|
||||
case Qgis::MouseHandlesAction::RotateBottomRight:
|
||||
case Qgis::MouseHandlesAction::MoveItem:
|
||||
case Qgis::MouseHandlesAction::SelectItem:
|
||||
case Qgis::MouseHandlesAction::NoAction:
|
||||
@ -1335,10 +1335,10 @@ QSizeF QgsGraphicsViewMouseHandles::calcCursorEdgeOffset( QPointF cursorPos )
|
||||
case Qgis::MouseHandlesAction::ResizeLeftDown:
|
||||
return QSizeF( sceneMousePos.x(), sceneMousePos.y() - rect().height() );
|
||||
|
||||
case Qgis::MouseHandlesAction::RotateLeftUp:
|
||||
case Qgis::MouseHandlesAction::RotateRightUp:
|
||||
case Qgis::MouseHandlesAction::RotateLeftDown:
|
||||
case Qgis::MouseHandlesAction::RotateRightDown:
|
||||
case Qgis::MouseHandlesAction::RotateTopLeft:
|
||||
case Qgis::MouseHandlesAction::RotateTopRight:
|
||||
case Qgis::MouseHandlesAction::RotateBottomLeft:
|
||||
case Qgis::MouseHandlesAction::RotateBottomRight:
|
||||
case Qgis::MouseHandlesAction::MoveItem:
|
||||
case Qgis::MouseHandlesAction::SelectItem:
|
||||
case Qgis::MouseHandlesAction::NoAction:
|
||||
|
Loading…
x
Reference in New Issue
Block a user