aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmultipointtoucharea/data
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-02-16 14:43:03 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-24 04:51:31 +0100
commitb855240b782395f94315f43ea3e7e182299fac48 (patch)
treebc594c04449be8cd14cd0ab0bb72dafc2be0ffb2 /tests/auto/quick/qquickmultipointtoucharea/data
parent6a42a6e0a9a1abdda0d07a5a20b4ac7e45348684 (diff)
Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickmultipointtoucharea/data')
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/data/basic.qml15
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/data/inFlickable.qml31
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/data/nested.qml27
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/data/nonOverlapping.qml32
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/data/properties.qml15
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/data/signalTest.qml30
6 files changed, 150 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/basic.qml b/tests/auto/quick/qquickmultipointtoucharea/data/basic.qml
new file mode 100644
index 0000000000..cd6ce8146f
--- /dev/null
+++ b/tests/auto/quick/qquickmultipointtoucharea/data/basic.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+
+MultiPointTouchArea {
+ width: 240
+ height: 320
+
+ minimumTouchPoints: 1
+ maximumTouchPoints: 4
+ touchPoints: [
+ TouchPoint { objectName: "point1" },
+ TouchPoint { objectName: "point2" },
+ TouchPoint { objectName: "point3" },
+ TouchPoint { objectName: "point4" }
+ ]
+}
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/inFlickable.qml b/tests/auto/quick/qquickmultipointtoucharea/data/inFlickable.qml
new file mode 100644
index 0000000000..9c9132d0b0
--- /dev/null
+++ b/tests/auto/quick/qquickmultipointtoucharea/data/inFlickable.qml
@@ -0,0 +1,31 @@
+import QtQuick 2.0
+
+Flickable {
+ width: 240
+ height: 320
+
+ contentWidth: width
+ contentHeight: height * 2
+
+ property int cancelCount: 0
+ property int touchCount: 0
+
+ MultiPointTouchArea {
+ anchors.fill: parent
+ minimumTouchPoints: 2
+ maximumTouchPoints: 2
+ onGestureStarted: {
+ if ((Math.abs(point2.x - point2.startX) > gesture.dragThreshold/2) && (Math.abs(point1.x - point1.startX) > gesture.dragThreshold/2)) {
+ gesture.grab()
+ }
+ }
+ touchPoints: [
+ TouchPoint { id: point1; objectName: "point1" },
+ TouchPoint { id: point2; objectName: "point2" }
+ ]
+
+ onCanceled: cancelCount = touchPoints.length
+ onTouchUpdated: touchCount = touchPoints.length
+ }
+}
+
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/nested.qml b/tests/auto/quick/qquickmultipointtoucharea/data/nested.qml
new file mode 100644
index 0000000000..37b8820aa0
--- /dev/null
+++ b/tests/auto/quick/qquickmultipointtoucharea/data/nested.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.0
+
+MultiPointTouchArea {
+ width: 240
+ height: 320
+
+ property bool grabInnerArea: true
+
+ minimumTouchPoints: 2
+ maximumTouchPoints: 3
+ touchPoints: [
+ TouchPoint { objectName: "point11" },
+ TouchPoint { objectName: "point12" }
+ ]
+
+ MultiPointTouchArea {
+ anchors.fill: parent
+ minimumTouchPoints: 3
+ maximumTouchPoints: 3
+ onGestureStarted: if (grabInnerArea) gesture.grab()
+ touchPoints: [
+ TouchPoint { objectName: "point21" },
+ TouchPoint { objectName: "point22" },
+ TouchPoint { objectName: "point23" }
+ ]
+ }
+}
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/nonOverlapping.qml b/tests/auto/quick/qquickmultipointtoucharea/data/nonOverlapping.qml
new file mode 100644
index 0000000000..039607e26c
--- /dev/null
+++ b/tests/auto/quick/qquickmultipointtoucharea/data/nonOverlapping.qml
@@ -0,0 +1,32 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 240
+ height: 320
+
+ MultiPointTouchArea {
+ width: parent.width
+ height: 160
+ minimumTouchPoints: 2
+ maximumTouchPoints: 2
+ onGestureStarted: gesture.grab()
+ touchPoints: [
+ TouchPoint { objectName: "point11" },
+ TouchPoint { objectName: "point12" }
+ ]
+ }
+
+ MultiPointTouchArea {
+ width: parent.width
+ height: 160
+ y: 160
+ minimumTouchPoints: 3
+ maximumTouchPoints: 3
+ onGestureStarted: gesture.grab()
+ touchPoints: [
+ TouchPoint { objectName: "point21" },
+ TouchPoint { objectName: "point22" },
+ TouchPoint { objectName: "point23" }
+ ]
+ }
+}
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/properties.qml b/tests/auto/quick/qquickmultipointtoucharea/data/properties.qml
new file mode 100644
index 0000000000..98ef1a9cbe
--- /dev/null
+++ b/tests/auto/quick/qquickmultipointtoucharea/data/properties.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+
+MultiPointTouchArea {
+ width: 240
+ height: 320
+
+ minimumTouchPoints: 2
+ maximumTouchPoints: 4
+ touchPoints: [
+ TouchPoint {},
+ TouchPoint {},
+ TouchPoint {},
+ TouchPoint {}
+ ]
+}
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/signalTest.qml b/tests/auto/quick/qquickmultipointtoucharea/data/signalTest.qml
new file mode 100644
index 0000000000..54b160c182
--- /dev/null
+++ b/tests/auto/quick/qquickmultipointtoucharea/data/signalTest.qml
@@ -0,0 +1,30 @@
+import QtQuick 2.0
+
+MultiPointTouchArea {
+ width: 240
+ height: 320
+
+ function clearCounts() {
+ touchPointPressCount = 0;
+ touchPointUpdateCount = 0;
+ touchPointReleaseCount = 0;
+ touchCount = 0;
+ touchUpdatedHandled = false;
+ }
+
+ property int touchPointPressCount: 0
+ property int touchPointUpdateCount: 0
+ property int touchPointReleaseCount: 0
+ property int touchCount: 0
+ property bool touchUpdatedHandled: false
+
+ maximumTouchPoints: 5
+
+ onPressed: { touchPointPressCount = touchPoints.length }
+ onUpdated: { touchPointUpdateCount = touchPoints.length }
+ onReleased: { touchPointReleaseCount = touchPoints.length }
+ onTouchUpdated: {
+ touchCount = touchPoints.length
+ touchUpdatedHandled = true
+ }
+}