diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-22 18:15:36 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-22 18:20:52 (GMT) |
commit | 7856c0397a42d26fa4fdd3ead3df7886b408b8ed (patch) | |
tree | a382c40e86b27d66ec152de2591f943be34592a7 /tests/manual/gestures/graphicsview | |
parent | 30b66e1b92b54b8f035da3c66ad086340befcf5b (diff) | |
download | Qt-7856c0397a42d26fa4fdd3ead3df7886b408b8ed.zip Qt-7856c0397a42d26fa4fdd3ead3df7886b408b8ed.tar.gz Qt-7856c0397a42d26fa4fdd3ead3df7886b408b8ed.tar.bz2 |
Compile fix.
QPanGesture was changed to use QPointF instead of QSizeF, also need to
change all usages of the pan gesture.
Reviewed-by: trustme
Diffstat (limited to 'tests/manual/gestures/graphicsview')
-rw-r--r-- | tests/manual/gestures/graphicsview/main.cpp | 6 | ||||
-rw-r--r-- | tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/manual/gestures/graphicsview/main.cpp b/tests/manual/gestures/graphicsview/main.cpp index b4d74e4..e9065eb 100644 --- a/tests/manual/gestures/graphicsview/main.cpp +++ b/tests/manual/gestures/graphicsview/main.cpp @@ -66,11 +66,11 @@ protected: default: qDebug("view: Pan: <unknown state>"); break; } - const QSizeF offset = pan->offset(); + const QPointF offset = pan->offset(); QScrollBar *vbar = verticalScrollBar(); QScrollBar *hbar = horizontalScrollBar(); - vbar->setValue(vbar->value() - offset.height()); - hbar->setValue(hbar->value() - offset.width()); + vbar->setValue(vbar->value() - offset.y()); + hbar->setValue(hbar->value() - offset.x()); ge->accept(pan); return true; } diff --git a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp index acd525f..6cdbe12 100644 --- a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp +++ b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp @@ -87,8 +87,8 @@ QGestureRecognizer::Result MousePanGestureRecognizer::filterEvent(QGesture *stat QPoint lastPos = g->property("lastPos").toPoint(); g->setLastOffset(g->offset()); lastPos = pos - lastPos; - g->setOffset(QSizeF(lastPos.x(), lastPos.y())); - g->setTotalOffset(g->totalOffset() + QSizeF(lastPos.x(), lastPos.y())); + g->setOffset(QPointF(lastPos.x(), lastPos.y())); + g->setTotalOffset(g->totalOffset() + QPointF(lastPos.x(), lastPos.y())); g->setProperty("lastPos", pos); return QGestureRecognizer::GestureTriggered | QGestureRecognizer::ConsumeEventHint; } @@ -102,9 +102,9 @@ QGestureRecognizer::Result MousePanGestureRecognizer::filterEvent(QGesture *stat void MousePanGestureRecognizer::reset(QGesture *state) { QPanGesture *g = static_cast<QPanGesture *>(state); - g->setTotalOffset(QSizeF()); - g->setLastOffset(QSizeF()); - g->setOffset(QSizeF()); + g->setTotalOffset(QPointF()); + g->setLastOffset(QPointF()); + g->setOffset(QPointF()); g->setAcceleration(0); g->setProperty("lastPos", QVariant()); g->setProperty("pressed", QVariant::fromValue<bool>(false)); |