From d5268eabfbad3743c47cf7a6aaf98ef7029d2ef1 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 9 Feb 2012 12:25:46 +0200 Subject: Add event type for TouchCancel. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id8b68e5cb19a2a325139e3241647cc36581cf6f8 Reviewed-by: Lars Knoll Reviewed-by: Samuel Rødal --- src/gui/kernel/qevent.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 543f5453ff..c3a6be692b 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3305,15 +3305,21 @@ QWindowStateChangeEvent::~QWindowStateChangeEvent() \section1 Event Handling - All touch events are of type QEvent::TouchBegin, QEvent::TouchUpdate, or QEvent::TouchEnd. - Reimplement QWidget::event() or QAbstractScrollArea::viewportEvent() for widgets and - QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events. + All touch events are of type QEvent::TouchBegin, QEvent::TouchUpdate, QEvent::TouchEnd or + QEvent::TouchCancel. Reimplement QWidget::event() or QAbstractScrollArea::viewportEvent() for + widgets and QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events. The QEvent::TouchUpdate and QEvent::TouchEnd events are sent to the widget or item that accepted the QEvent::TouchBegin event. If the QEvent::TouchBegin event is not accepted and not filtered by an event filter, then no further touch events are sent until the next QEvent::TouchBegin. + Some systems may send an event of type QEvent::TouchCancel. Upon receiving this event + applications are requested to ignore the entire active touch sequence. For example in a + composited system the compositor may decide to treat certain gestures as system-wide + gestures. Whenever such a decision is made (the gesture is recognized), the clients will be + notified with a QEvent::TouchCancel event so they can update their state accordingly. + The touchPoints() function returns a list of all touch points contained in the event. Information about each touch point can be retrieved using the QTouchEvent::TouchPoint class. The Qt::TouchPointState enum describes the different states that a touch point may have. -- cgit v1.2.3