summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qgesture.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-04 18:26:40 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-05 11:54:51 (GMT)
commit6777135b2cacd3a72a60ff372749837b67762fbe (patch)
tree5caf0678a75d45bc927cf284c543d06b28a32828 /src/gui/kernel/qgesture.cpp
parentf4450efb6fbc9fd0e592d5bc3bce37d5bf272984 (diff)
downloadQt-6777135b2cacd3a72a60ff372749837b67762fbe.zip
Qt-6777135b2cacd3a72a60ff372749837b67762fbe.tar.gz
Qt-6777135b2cacd3a72a60ff372749837b67762fbe.tar.bz2
Implemented Tap and TapAndHold gestures.
Added QGesture objects and gesture recognizers based on touch events. Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/gui/kernel/qgesture.cpp')
-rw-r--r--src/gui/kernel/qgesture.cpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index 4edf8a9..88c04e2 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -667,4 +667,70 @@ void QSwipeGesture::setSwipeAngle(qreal value)
d_func()->swipeAngle = value;
}
+/*!
+ \class QTapGesture
+ \since 4.6
+ \brief The QTapGesture class describes a tap gesture made by the user.
+ \ingroup gestures
+
+ \sa {Gestures Programming}, QPanGesture, QPinchGesture
+*/
+
+/*!
+ \property QTapGesture::position
+ \brief the position of the tap
+*/
+
+/*!
+ \internal
+*/
+QTapGesture::QTapGesture(QObject *parent)
+ : QGesture(*new QTapGesturePrivate, parent)
+{
+ d_func()->gestureType = Qt::TapGesture;
+}
+
+QPointF QTapGesture::position() const
+{
+ return d_func()->position;
+}
+
+void QTapGesture::setPosition(const QPointF &value)
+{
+ d_func()->position = value;
+}
+/*!
+ \class QTapAndHoldGesture
+ \since 4.6
+ \brief The QTapAndHoldGesture class describes a tap-and-hold (aka LongTap)
+ gesture made by the user.
+ \ingroup gestures
+
+ \sa {Gestures Programming}, QPanGesture, QPinchGesture
+*/
+
+/*!
+ \property QTapAndHoldGesture::position
+ \brief the position of the tap
+*/
+
+/*!
+ \internal
+*/
+QTapAndHoldGesture::QTapAndHoldGesture(QObject *parent)
+ : QGesture(*new QTapAndHoldGesturePrivate, parent)
+{
+ d_func()->gestureType = Qt::TapAndHoldGesture;
+}
+
+QPointF QTapAndHoldGesture::position() const
+{
+ return d_func()->position;
+}
+
+void QTapAndHoldGesture::setPosition(const QPointF &value)
+{
+ d_func()->position = value;
+}
+
QT_END_NAMESPACE