MultiPointTouchArea: make nested.qml autotest easier to debug
authorShawn Rutledge <shawn.rutledge@digia.com>
Fri, 7 Mar 2014 14:44:37 +0000 (15:44 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 10 Mar 2014 16:00:19 +0000 (17:00 +0100)
Visual feedback

Change-Id: I8f670d5f4729149e5ee02c2e9a36b5570ac3c5a7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
tests/auto/quick/qquickmultipointtoucharea/data/nested.qml

index 37b8820aa09cf6b74a33bc51673dc868ada7ea0e..8ab10a6926684ebfe308f3fcd1cc9af1c3a875da 100644 (file)
@@ -6,11 +6,60 @@ MultiPointTouchArea {
 
     property bool grabInnerArea: true
 
+    Rectangle {
+        color: "red"
+        width: 30
+        height: width
+        radius: width / 2
+        x: point11.x
+        y: point11.y
+        border.color: point11.pressed ? "white" : "transparent"
+    }
+    Rectangle {
+        objectName: "touch2rect"
+        color: "yellow"
+        width: 30
+        height: width
+        radius: width / 2
+        x: point12.x
+        y: point12.y
+        border.color: point12.pressed ? "white" : "transparent"
+    }
+
+    Rectangle {
+        color: "orange"
+        width: 30
+        height: width
+        radius: width / 2
+        x: point21.x
+        y: point21.y
+        border.color: point21.pressed ? "white" : "transparent"
+    }
+    Rectangle {
+        objectName: "touch2rect"
+        color: "green"
+        width: 30
+        height: width
+        radius: width / 2
+        x: point22.x
+        y: point22.y
+        border.color: point22.pressed ? "white" : "transparent"
+    }
+    Rectangle {
+        color: "blue"
+        width: 30
+        height: width
+        radius: width / 2
+        x: point23.x
+        y: point23.y
+        border.color: point23.pressed ? "white" : "transparent"
+    }
+
     minimumTouchPoints: 2
     maximumTouchPoints: 3
     touchPoints: [
-        TouchPoint { objectName: "point11" },
-        TouchPoint { objectName: "point12" }
+        TouchPoint { id: point11; objectName: "point11" },
+        TouchPoint { id: point12; objectName: "point12" }
     ]
 
     MultiPointTouchArea {
@@ -19,9 +68,9 @@ MultiPointTouchArea {
         maximumTouchPoints: 3
         onGestureStarted: if (grabInnerArea) gesture.grab()
         touchPoints: [
-            TouchPoint { objectName: "point21" },
-            TouchPoint { objectName: "point22" },
-            TouchPoint { objectName: "point23" }
+            TouchPoint { id: point21; objectName: "point21" },
+            TouchPoint { id: point22; objectName: "point22" },
+            TouchPoint { id: point23; objectName: "point23" }
         ]
     }
 }