MultiPointTouchArea: handles mouse too, unless mouseEnabled is false
authorShawn Rutledge <shawn.rutledge@digia.com>
Wed, 8 May 2013 13:21:59 +0000 (15:21 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 10 Mar 2014 14:01:14 +0000 (15:01 +0100)
commitfe2de633f9b9454ec8a9c2a5874ad85f49d8d54d
treed15cc7bb53673f8b9b6af8a0c4648f8b29bb80b4
parent2df6031b5935fafcada04bc15b281c63bdbfabf9
MultiPointTouchArea: handles mouse too, unless mouseEnabled is false

A new boolean property mouseEnabled is introduced (true by default).
If set to true, then it will handle any non-synthetic mouse event
as if it were a touch point.
If set to false, the area becomes transparent for real mouse events
so that a MultiPointTouchArea can be stacked on top of a MouseArea
in order to separate handling of touch and mouse.
In either case it continues to absorb and ignore synthesized mouse
events (including touch-to-mouse synthesis in QQuickWindow).

[ChangeLog][QtQuick][MultiPointTouchArea]handles mouse as a touchpoint;
added mouseEnabled property to permit transparent pass-through to
mouse-sensitive items

Change-Id: I4af94d838f0060154494589c0f15c6858ee89ddb
Task-number: QTBUG-31047
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
src/quick/items/qquickmultipointtoucharea.cpp
src/quick/items/qquickmultipointtoucharea_p.h
tests/auto/quick/qquickmultipointtoucharea/data/dualGestures.qml [new file with mode: 0644]
tests/auto/quick/qquickmultipointtoucharea/data/inMouseArea.qml [new file with mode: 0644]
tests/auto/quick/qquickmultipointtoucharea/data/mouse.qml [new file with mode: 0644]
tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp