diff options
author | Jan Arve Saether <jan-arve.saether@qt.io> | 2016-09-02 12:58:43 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-09-16 14:46:06 +0000 |
commit | b8106804c87f70c3be034dc3e191966293a8b877 (patch) | |
tree | e07f7e11a28aa0eb028e0755431b84ec74ee6440 /tests | |
parent | 071d45469cb2674d7ac6dd4ac50551dc97878526 (diff) |
Move device id to be in bits 24-31 of the point id
This allows us for lossless conversion between QTouchEvent::TouchPoint id
and QQuickEventPoint::pointId (both ways).
Change-Id: I2087847a579dd8bc5b526515ad07b55c9ae8aa42
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual/touch/mpta-crosshairs.qml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/manual/touch/mpta-crosshairs.qml b/tests/manual/touch/mpta-crosshairs.qml index 8b71e4fdc3..901b3e8bac 100644 --- a/tests/manual/touch/mpta-crosshairs.qml +++ b/tests/manual/touch/mpta-crosshairs.qml @@ -85,11 +85,22 @@ Rectangle { } Rectangle { color: touchPoint.color - width: 50 * touchPoint.pressure + width: Math.max(2, 50 * touchPoint.pressure) height: width radius: width / 2 x: touchPoint.x - width / 2 y: touchPoint.y - width / 2 + Rectangle { + y: -40 + anchors.horizontalCenter: parent.horizontalCenter + color: "#c0c0c0" + implicitWidth: label.implicitWidth + implicitHeight: label.implicitHeight + Text { + id: label + text: 'id: ' + touchPoint.pointId.toString(16) + '\npos: (' + touchPoint.x.toFixed(2) + ', ' + touchPoint.y.toFixed(2) + ')' + } + } } Rectangle { id: velocityVector |