summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qgesture.h
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-04 19:26:40 +0100
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-05 12:54:51 +0100
commit6777135b2cacd3a72a60ff372749837b67762fbe (patch)
tree5caf0678a75d45bc927cf284c543d06b28a32828 /src/gui/kernel/qgesture.h
parentf4450efb6fbc9fd0e592d5bc3bce37d5bf272984 (diff)
downloadqt4-tools-6777135b2cacd3a72a60ff372749837b67762fbe.tar.gz
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.h')
-rw-r--r--src/gui/kernel/qgesture.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h
index dd322adac9..f995d7b616 100644
--- a/src/gui/kernel/qgesture.h
+++ b/src/gui/kernel/qgesture.h
@@ -219,6 +219,40 @@ public:
friend class QSwipeGestureRecognizer;
};
+class QTapGesturePrivate;
+class Q_GUI_EXPORT QTapGesture : public QGesture
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QTapGesture)
+
+ Q_PROPERTY(QPointF position READ position WRITE setPosition)
+
+public:
+ QTapGesture(QObject *parent = 0);
+
+ QPointF position() const;
+ void setPosition(const QPointF &pos);
+
+ friend class QTapGestureRecognizer;
+};
+
+class QTapAndHoldGesturePrivate;
+class Q_GUI_EXPORT QTapAndHoldGesture : public QGesture
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QTapAndHoldGesture)
+
+ Q_PROPERTY(QPointF position READ position WRITE setPosition)
+
+public:
+ QTapAndHoldGesture(QObject *parent = 0);
+
+ QPointF position() const;
+ void setPosition(const QPointF &pos);
+
+ friend class QTapAndHoldGestureRecognizer;
+};
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QGesture::GestureCancelPolicy)