diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-11-27 17:42:23 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-09 14:15:37 +0100 |
commit | 4222603f8ea3a0d0ef5b9a190605ad86e00f27f6 (patch) | |
tree | 2ace610731b845e4e04e6ea8f0def0ce3aee31a4 /dist | |
parent | 2c4879a7676d6a75379ac6ff24ac4c2a6c2b9658 (diff) |
Extend touch events.
The capability flags indicate which information is valid in the touch
points. Previously there was no way to tell if e.g. the value returned
by pressure() is actually the value provided by the driver/device or
it is just something bogus due to pressure not being supported.
The points' flags return information about the individual touch
points. One use case is to differentiate between touches made by
finger and pen.
Velocity, if available, is now also exposed.
Each touch point can now contain an additional list of "raw"
positions. These points are not reported individually but are taken
into account in some way by the underlying device and drivers to
generate the final, "accurate" touch point. In case the underlying
drivers expose these additional positions, they are made available in
the lists returned by the touch points' rawScreenPosition().
The raw positions are only available in screen coordinates to prevent
wasting time with mapping from global positions in applications that
do not use this data. Instead, apps can query the QWindow to which the
touch event was sent via QTouchEvent::window() and can call
mapFromGlobal() manually if they need local raw positions.
The capability and device type information is now held in a new
QTouchDevice class. Each touch event will contain only a pointer to
one of the global QTouchDevice instances. On top of type and
capability, the new class also contains a name which can be used to
differentiate between multiple touch input devices (i.e. to tell from
which one a given QTouchEvent originates from).
The introduction of QTouchDevice has three implications: The
QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent
need to be changed (to pass a QTouchDevice pointer instead of merely a
device type value), and each platform or generic plug-in is now
responsible for registering one or more devices using the new API
QWindowSystemInterface::registerTouchDevice.
Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'dist')
-rw-r--r-- | dist/changes-5.0.0 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 89c6fbef0d..cec264337f 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -90,6 +90,32 @@ information about a particular change. - QSound has been moved from QtGui to QtMultimedia +- QTouchEvent: + + * The DeviceType enum and deviceType() have been deprecated due to + the introduction of QTouchDevice. + + * The signature of the constructor has changed. It now takes a + QTouchDevice pointer instead of just a DeviceType value. + + * TouchPointState no longer includes TouchPointStateMask and + TouchPointPrimary. The primary flag is now stored together with + other touch point flags and is accessible through + TouchPoint::isPrimary() or TouchPoint::flags(). As a result the + internally used state mask is no longer necessary. + + * QWidget *widget() has been removed and is replaced by QObject + *target() in order to avoid QWidget dependencies. + +- QWindowSystemInterface: + + * The signature of all handleTouchEvent() variants have changed, + taking a QTouchDevice* instead of just a DeviceType value. + Platform or generic plug-ins have to create and register at least + one QTouchDevice before sending the first touch event. + + * The event type parameter is removed from handleTouchEvent(). + **************************************************************************** * General * **************************************************************************** @@ -127,6 +153,9 @@ QtGui proper parent/child functions instead of using navigate which has been deprecated for this purpose. Table and cell interfaces have been added to qaccessible2.h +* Touch events and points have been extended to hold additional + information like capability flags, point-specific flags, velocity, + and raw positions. QtWidgets --------- |