diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-29 10:11:24 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-29 10:11:25 +0200 |
commit | 5f2249f4dcce7523d8dc88b425b43834c4c3cab9 (patch) | |
tree | 5ddbd03806a0f940cca2d4de966c2a00d761717b /tests/auto/quick/qquickmultipointtoucharea/data/cancel.qml | |
parent | d5cb1bf4a9e19a0a4471ba5c935f441463a73414 (diff) | |
parent | 1b897195a14b63a553b139983736d8dfdd419ffd (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I70c0c672708522f7157849365cc53ee271d8e460
Diffstat (limited to 'tests/auto/quick/qquickmultipointtoucharea/data/cancel.qml')
-rw-r--r-- | tests/auto/quick/qquickmultipointtoucharea/data/cancel.qml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/cancel.qml b/tests/auto/quick/qquickmultipointtoucharea/data/cancel.qml new file mode 100644 index 0000000000..e108003bca --- /dev/null +++ b/tests/auto/quick/qquickmultipointtoucharea/data/cancel.qml @@ -0,0 +1,41 @@ +import QtQuick 2.0 + +MultiPointTouchArea { + width: 240 + height: 320 + + minimumTouchPoints: 1 + maximumTouchPoints: 5 + touchPoints: [ + TouchPoint { objectName: "point1" }, + TouchPoint { objectName: "point2" }, + TouchPoint { objectName: "point3" }, + TouchPoint { objectName: "point4" }, + TouchPoint { objectName: "point5" } + ] + + function clearCounts() { + touchPointPressCount = 0; + touchPointUpdateCount = 0; + touchPointReleaseCount = 0; + touchPointCancelCount = 0; + touchCount = 0; + touchUpdatedHandled = false; + } + + property int touchPointPressCount: 0 + property int touchPointUpdateCount: 0 + property int touchPointReleaseCount: 0 + property int touchPointCancelCount: 0 + property int touchCount: 0 + property bool touchUpdatedHandled: false + + onPressed: { touchPointPressCount = touchPoints.length } + onUpdated: { touchPointUpdateCount = touchPoints.length } + onReleased: { touchPointReleaseCount = touchPoints.length } + onCanceled: { touchPointCancelCount = touchPoints.length } + onTouchUpdated: { + touchCount = touchPoints.length + touchUpdatedHandled = true + } +} |