summaryrefslogtreecommitdiffstats
path: root/tests/manual/qtouchevent/touchwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qtouchevent/touchwidget.h')
-rw-r--r--tests/manual/qtouchevent/touchwidget.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/manual/qtouchevent/touchwidget.h b/tests/manual/qtouchevent/touchwidget.h
new file mode 100644
index 0000000..2726deb
--- /dev/null
+++ b/tests/manual/qtouchevent/touchwidget.h
@@ -0,0 +1,31 @@
+#ifndef TOUCHWIDGET_H
+#define TOUCHWIDGET_H
+
+#include <QWidget>
+
+class TouchWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ bool acceptTouchBegin, acceptTouchUpdate, acceptTouchEnd;
+ bool seenTouchBegin, seenTouchUpdate, seenTouchEnd;
+ bool closeWindowOnTouchEnd;
+ int touchPointCount;
+
+ bool acceptMousePress, acceptMouseMove, acceptMouseRelease;
+ bool seenMousePress, seenMouseMove, seenMouseRelease;
+ bool closeWindowOnMouseRelease;
+
+ inline TouchWidget(QWidget *parent = 0)
+ : QWidget(parent)
+ {
+ reset();
+ }
+
+ void reset();
+
+ bool event(QEvent *event);
+};
+
+#endif // TOUCHWIDGET_H