diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-12-09 08:19:41 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-12-10 22:04:30 +0100 |
commit | 85fab4c5b46ba4faf50544fd6d4594077fce5d75 (patch) | |
tree | ef59dec3c7b639372f6b53d737b95b9b476d15b7 /src/quick/handlers | |
parent | a432970b258edb9ff041d221b2155df30cad4799 (diff) |
Deprecate PinchAxis minimum/maximum scale and rotation properties
...in favor of the minimum and maximum properties in the new scaleAxis
and rotationAxis.
[ChangeLog][QtQuick][Event Handlers] PinchHandler.minimumScale,
maximumScale, minimumRotation and maximumRotation are deprecated in
favor of the minimum and maximum properties in the new scaleAxis and
rotationAxis.
Change-Id: Iecaa4321d5ea7ebf7131b1e84fbc83ab29ad506e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r-- | src/quick/handlers/qquickpinchhandler.cpp | 8 | ||||
-rw-r--r-- | src/quick/handlers/qquickpinchhandler_p.h | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp index 8380ef28ae..7b80a93b08 100644 --- a/src/quick/handlers/qquickpinchhandler.cpp +++ b/src/quick/handlers/qquickpinchhandler.cpp @@ -66,8 +66,10 @@ QQuickPinchHandler::QQuickPinchHandler(QQuickItem *parent) d_func()->acceptedButtons = Qt::NoButton; } +#if QT_DEPRECATED_SINCE(6, 5) /*! \qmlproperty real QtQuick::PinchHandler::minimumScale + \deprecated [6.5] Use scaleAxis.minimum The minimum acceptable \l {Item::scale}{scale} to be applied to the \l target. @@ -83,6 +85,7 @@ void QQuickPinchHandler::setMinimumScale(qreal minimumScale) /*! \qmlproperty real QtQuick::PinchHandler::maximumScale + \deprecated [6.5] Use scaleAxis.maximum The maximum acceptable \l {Item::scale}{scale} to be applied to the \l target. @@ -95,6 +98,7 @@ void QQuickPinchHandler::setMaximumScale(qreal maximumScale) m_scaleAxis.setMaximum(maximumScale); emit maximumScaleChanged(); } +#endif /*! \readonly @@ -168,8 +172,10 @@ void QQuickPinchHandler::setPersistentScale(qreal rot) emit scaleChanged(1); } +#if QT_DEPRECATED_SINCE(6, 5) /*! \qmlproperty real QtQuick::PinchHandler::minimumRotation + \deprecated [6.5] Use rotationAxis.minimum The minimum acceptable \l {Item::rotation}{rotation} to be applied to the \l target. @@ -185,6 +191,7 @@ void QQuickPinchHandler::setMinimumRotation(qreal minimumRotation) /*! \qmlproperty real QtQuick::PinchHandler::maximumRotation + \deprecated [6.5] Use rotationAxis.maximum The maximum acceptable \l {Item::rotation}{rotation} to be applied to the \l target. @@ -197,6 +204,7 @@ void QQuickPinchHandler::setMaximumRotation(qreal maximumRotation) m_rotationAxis.setMaximum(maximumRotation); emit maximumRotationChanged(); } +#endif /*! \qmlsignal QtQuick::PinchHandler::rotationChanged(qreal delta) diff --git a/src/quick/handlers/qquickpinchhandler_p.h b/src/quick/handlers/qquickpinchhandler_p.h index c8fa6988b4..036b18ec7a 100644 --- a/src/quick/handlers/qquickpinchhandler_p.h +++ b/src/quick/handlers/qquickpinchhandler_p.h @@ -30,18 +30,18 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPinchHandler : public QQuickMultiPointHandler Q_OBJECT Q_PROPERTY(QQuickDragAxis *scaleAxis READ scaleAxis CONSTANT) +#if QT_DEPRECATED_SINCE(6, 5) Q_PROPERTY(qreal minimumScale READ minimumScale WRITE setMinimumScale NOTIFY minimumScaleChanged) Q_PROPERTY(qreal maximumScale READ maximumScale WRITE setMaximumScale NOTIFY maximumScaleChanged) -#if QT_DEPRECATED_SINCE(6, 5) Q_PROPERTY(qreal scale READ scale NOTIFY updated) #endif Q_PROPERTY(qreal activeScale READ activeScale NOTIFY scaleChanged) Q_PROPERTY(qreal persistentScale READ persistentScale WRITE setPersistentScale NOTIFY scaleChanged) Q_PROPERTY(QQuickDragAxis *rotationAxis READ rotationAxis CONSTANT) +#if QT_DEPRECATED_SINCE(6, 5) Q_PROPERTY(qreal minimumRotation READ minimumRotation WRITE setMinimumRotation NOTIFY minimumRotationChanged) Q_PROPERTY(qreal maximumRotation READ maximumRotation WRITE setMaximumRotation NOTIFY maximumRotationChanged) -#if QT_DEPRECATED_SINCE(6, 5) Q_PROPERTY(qreal rotation READ rotation NOTIFY updated) #endif Q_PROPERTY(qreal activeRotation READ activeRotation NOTIFY rotationChanged) @@ -71,11 +71,11 @@ public: void setPersistentTranslation(const QPointF &trans); QQuickDragAxis *scaleAxis() { return &m_scaleAxis; } +#if QT_DEPRECATED_SINCE(6, 5) qreal minimumScale() const { return m_scaleAxis.minimum(); } void setMinimumScale(qreal minimumScale); qreal maximumScale() const { return m_scaleAxis.maximum(); } void setMaximumScale(qreal maximumScale); -#if QT_DEPRECATED_SINCE(6, 5) qreal scale() const { return persistentScale(); } #endif qreal activeScale() const { return m_scaleAxis.activeValue(); } @@ -84,11 +84,11 @@ public: void setPersistentScale(qreal scale); QQuickDragAxis *rotationAxis() { return &m_rotationAxis; } +#if QT_DEPRECATED_SINCE(6, 5) qreal minimumRotation() const { return m_rotationAxis.minimum(); } void setMinimumRotation(qreal minimumRotation); qreal maximumRotation() const { return m_rotationAxis.maximum(); } void setMaximumRotation(qreal maximumRotation); -#if QT_DEPRECATED_SINCE(6, 5) qreal rotation() const { return activeRotation(); } #endif qreal activeRotation() const { return m_rotationAxis.activeValue(); } |