summaryrefslogtreecommitdiffstats
path: root/examples/gestures/imageviewer/imagewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gestures/imageviewer/imagewidget.cpp')
-rw-r--r--examples/gestures/imageviewer/imagewidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp
index 1a341a5..0a279ca 100644
--- a/examples/gestures/imageviewer/imagewidget.cpp
+++ b/examples/gestures/imageviewer/imagewidget.cpp
@@ -161,17 +161,17 @@ void ImageWidget::gestureEvent(QGestureEvent *event)
update();
} else {
// only slide gesture should be accepted
- const QPannableGesture *pg = static_cast<const QPannableGesture*>(g);
+ const QPanningGesture *pg = static_cast<const QPanningGesture*>(g);
if (pg->direction() != pg->lastDirection()) {
// ###: event->cancel();
}
if (g->state() == Qt::GestureFinished) {
touchFeedback.sliding = false;
zoomed = rotated = false;
- if (pg->direction() == QPannableGesture::Right) {
+ if (pg->direction() == Qt::RightDirection) {
qDebug() << "slide right";
goNextImage();
- } else if (pg->direction() == QPannableGesture::Left) {
+ } else if (pg->direction() == Qt::LeftDirection) {
qDebug() << "slide left";
goPrevImage();
}