aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-08-31 14:10:27 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-08-31 17:51:15 +0000
commit9e1166fd817f93f8819fdd55bed52e43c431434d (patch)
treeac4223db1abbddaf7079670e2be4e958d80951d8
parent6a1746f508fb994acf7d1d317cd34dad748e73df (diff)
Remove the PinchHandler.pinchOrigin property for now
We didn't get around to implementing the appropriate behaviors. We could add it back later if we figure out how. Task-number: QTBUG-70292 Change-Id: Idca62b249f555d5e44bb97430ae0222bf314a66b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
-rw-r--r--src/quick/handlers/qquickpinchhandler.cpp27
-rw-r--r--src/quick/handlers/qquickpinchhandler_p.h12
2 files changed, 1 insertions, 38 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp
index 24f9885534..00376944c7 100644
--- a/src/quick/handlers/qquickpinchhandler.cpp
+++ b/src/quick/handlers/qquickpinchhandler.cpp
@@ -152,29 +152,6 @@ void QQuickPinchHandler::setMaximumRotation(qreal maximumRotation)
}
/*!
- \qmlproperty real QtQuick::PinchHandler::pinchOrigin
-
- The point to be held in place, around which the \l target is scaled and
- rotated.
-
- \value FirstPoint
- the first touch point, wherever the first finger is pressed
- \value PinchCenter
- the centroid between all the touch points at the time when the
- PinchHandler becomes \l active
- \value TargetCenter
- the center of the \l target
-*/
-void QQuickPinchHandler::setPinchOrigin(QQuickPinchHandler::PinchOrigin pinchOrigin)
-{
- if (m_pinchOrigin == pinchOrigin)
- return;
-
- m_pinchOrigin = pinchOrigin;
- emit pinchOriginChanged();
-}
-
-/*!
\qmlproperty real QtQuick::PinchHandler::minimumX
The minimum acceptable x coordinate of the centroid
@@ -445,7 +422,6 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event)
if (!active())
return;
}
- // TODO check m_pinchOrigin: right now it acts like it's set to PinchCenter
// avoid mapping the minima and maxima, as they might have unmappable values
// such as -inf/+inf. Because of this we perform the bounding to min/max in local coords.
@@ -523,8 +499,7 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event)
\qmlproperty QQuickHandlerPoint QtQuick::PinchHandler::centroid
A point exactly in the middle of the currently-pressed touch points.
- If \l pinchOrigin is set to \c PinchCenter, the \l target will be rotated
- around this point.
+ The \l target will be rotated around this point.
*/
/*!
diff --git a/src/quick/handlers/qquickpinchhandler_p.h b/src/quick/handlers/qquickpinchhandler_p.h
index 6ec119ba72..2dde763080 100644
--- a/src/quick/handlers/qquickpinchhandler_p.h
+++ b/src/quick/handlers/qquickpinchhandler_p.h
@@ -66,7 +66,6 @@ class Q_AUTOTEST_EXPORT QQuickPinchHandler : public QQuickMultiPointHandler
Q_PROPERTY(qreal maximumScale READ maximumScale WRITE setMaximumScale NOTIFY maximumScaleChanged)
Q_PROPERTY(qreal minimumRotation READ minimumRotation WRITE setMinimumRotation NOTIFY minimumRotationChanged)
Q_PROPERTY(qreal maximumRotation READ maximumRotation WRITE setMaximumRotation NOTIFY maximumRotationChanged)
- Q_PROPERTY(PinchOrigin pinchOrigin READ pinchOrigin WRITE setPinchOrigin NOTIFY pinchOriginChanged)
Q_PROPERTY(qreal scale READ scale NOTIFY updated)
Q_PROPERTY(qreal activeScale READ activeScale NOTIFY updated)
Q_PROPERTY(qreal rotation READ rotation NOTIFY updated)
@@ -79,11 +78,6 @@ class Q_AUTOTEST_EXPORT QQuickPinchHandler : public QQuickMultiPointHandler
Q_PROPERTY(QQuickDragAxis * yAxis READ yAxis CONSTANT)
public:
- enum PinchOrigin {
- FirstPoint, PinchCenter, TargetCenter
- };
- Q_ENUM(PinchOrigin)
-
explicit QQuickPinchHandler(QQuickItem *parent = nullptr);
qreal minimumScale() const { return m_minimumScale; }
@@ -98,9 +92,6 @@ public:
qreal maximumRotation() const { return m_maximumRotation; }
void setMaximumRotation(qreal maximumRotation);
- PinchOrigin pinchOrigin() const { return m_pinchOrigin; }
- void setPinchOrigin(PinchOrigin pinchOrigin);
-
QVector2D translation() const { return m_activeTranslation; }
qreal scale() const { return m_accumulatedScale; }
qreal activeScale() const { return m_activeScale; }
@@ -126,7 +117,6 @@ signals:
void maximumXChanged();
void minimumYChanged();
void maximumYChanged();
- void pinchOriginChanged();
void updated();
protected:
@@ -154,8 +144,6 @@ private:
QQuickDragAxis m_xAxis;
QQuickDragAxis m_yAxis;
- PinchOrigin m_pinchOrigin = PinchOrigin::PinchCenter;
-
// internal
qreal m_startScale = 1;
qreal m_startRotation = 0;