summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-02-09 12:25:46 +0200
committerQt by Nokia <qt-info@nokia.com>2012-02-09 13:13:37 +0100
commitd5268eabfbad3743c47cf7a6aaf98ef7029d2ef1 (patch)
tree52b7361717f720e5736da8b66fdd551afc27b40b /src/gui/kernel
parent4af285c7d1be43b1882fb5b2ece8539622ea1b22 (diff)
Add event type for TouchCancel.
Change-Id: Id8b68e5cb19a2a325139e3241647cc36581cf6f8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qevent.cpp12
1 files changed, 9 insertions, 3 deletions
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.