summaryrefslogtreecommitdiffstats
path: root/tests/manual/gestures/graphicsview/gestures.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/gestures/graphicsview/gestures.h')
-rw-r--r--tests/manual/gestures/graphicsview/gestures.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/manual/gestures/graphicsview/gestures.h b/tests/manual/gestures/graphicsview/gestures.h
new file mode 100644
index 0000000..630a7ef
--- /dev/null
+++ b/tests/manual/gestures/graphicsview/gestures.h
@@ -0,0 +1,37 @@
+#ifndef GESTURE_H
+#define GESTURE_H
+
+#include <QGestureRecognizer>
+#include <QGesture>
+
+class ThreeFingerSlideGesture : public QGesture
+{
+ Q_OBJECT
+public:
+ static Qt::GestureType Type;
+
+ ThreeFingerSlideGesture(QObject *parent = 0) : QGesture(parent) { }
+
+ bool gestureFired;
+};
+
+class ThreeFingerSlideGestureRecognizer : public QGestureRecognizer
+{
+private:
+ QGesture* createGesture(QObject *target);
+ QGestureRecognizer::Result filterEvent(QGesture *state, QObject *watched, QEvent *event);
+ void reset(QGesture *state);
+};
+
+class RotateGestureRecognizer : public QGestureRecognizer
+{
+public:
+ RotateGestureRecognizer();
+
+private:
+ QGesture* createGesture(QObject *target);
+ QGestureRecognizer::Result filterEvent(QGesture *state, QObject *watched, QEvent *event);
+ void reset(QGesture *state);
+};
+
+#endif // GESTURE_H