<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quick/handlers/qquickhandlerpoint.cpp, branch wip/cmake</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>Make qtdeclarative compile with -no-feature-tabletevent</title>
<updated>2020-02-20T11:37:37+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2020-02-18T16:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=3bafe234940f6e3faef77f03a9a2d2071c12111b'/>
<id>3bafe234940f6e3faef77f03a9a2d2071c12111b</id>
<content type='text'>
Amends 8e822e981d91e688799c8670f11dfdf6aaf9e0d1.

Fixes: QTBUG-82168
Change-Id: I8d849747a3394ca05d62b674a725d45165f081eb
Reviewed-by: Andy Shaw &lt;andy.shaw@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Amends 8e822e981d91e688799c8670f11dfdf6aaf9e0d1.

Fixes: QTBUG-82168
Change-Id: I8d849747a3394ca05d62b674a725d45165f081eb
Reviewed-by: Andy Shaw &lt;andy.shaw@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Deliver QTabletEvents to pointer handlers</title>
<updated>2020-02-11T19:53:02+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2019-12-14T15:02:21+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=8e822e981d91e688799c8670f11dfdf6aaf9e0d1'/>
<id>8e822e981d91e688799c8670f11dfdf6aaf9e0d1</id>
<content type='text'>
At this time, there are not yet any specialized handlers to
do anything specifically with tablet events; but we demonstrate
how to use HoverHandler to detect the type of stylus in use,
and how to use PointHandler to draw on a Canvas.

Unfortunately, events of types TabletEnterProximity and
TabletLeaveProximity are not delivered to the window, only to
QGuiApplication.  So HoverHandler can detect when the stylus is moved
out of its parent Item (as long as it's still hovering over the tablet
surface), but cannot detect when the stylus leaves the tablet completely.
In Qt 5 that would require a custom application subclass
(see qtbase/examples/widgets/widgets/tablet/tabletapplication.cpp).

Fixes: QTBUG-79660
Change-Id: I81fdb99082dc41c0455085e6b6d3952402bf8742
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At this time, there are not yet any specialized handlers to
do anything specifically with tablet events; but we demonstrate
how to use HoverHandler to detect the type of stylus in use,
and how to use PointHandler to draw on a Canvas.

Unfortunately, events of types TabletEnterProximity and
TabletLeaveProximity are not delivered to the window, only to
QGuiApplication.  So HoverHandler can detect when the stylus is moved
out of its parent Item (as long as it's still hovering over the tablet
surface), but cannot detect when the stylus leaves the tablet completely.
In Qt 5 that would require a custom application subclass
(see qtbase/examples/widgets/widgets/tablet/tabletapplication.cpp).

Fixes: QTBUG-79660
Change-Id: I81fdb99082dc41c0455085e6b6d3952402bf8742
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>TapHandler: wait until after tapped is emitted to reset point.position</title>
<updated>2019-07-05T13:02:56+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2019-07-03T15:17:53+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9b01e2e5d4b38533f02ba9ba907505e8c341cd0a'/>
<id>9b01e2e5d4b38533f02ba9ba907505e8c341cd0a</id>
<content type='text'>
We don't want it to hold its position indefinitely after the button is
released.  But in practice, reset() gets called again anyway in
QQuickSinglePointHandler::handlePointerEventImpl(), _after_
handleEventPoint(), which means after tapped() is emitted.  Having the
point hold its position that much longer is convenient for applications
and more consistent with the state expressed by the release event.
Also amend the documentation.
Partially reverts 17237efaefabe924599abe00e92d8b54032d7915

[ChangeLog][Event Handlers][Important Behavior Changes] TapHandler.point now
holds the release position while the tapped() signal is emitted.

Fixes: QTBUG-76871
Task-number: QTBUG-64847
Change-Id: I621a2eba4507a498788e9384344e8b4b7da32403
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't want it to hold its position indefinitely after the button is
released.  But in practice, reset() gets called again anyway in
QQuickSinglePointHandler::handlePointerEventImpl(), _after_
handleEventPoint(), which means after tapped() is emitted.  Having the
point hold its position that much longer is convenient for applications
and more consistent with the state expressed by the release event.
Also amend the documentation.
Partially reverts 17237efaefabe924599abe00e92d8b54032d7915

[ChangeLog][Event Handlers][Important Behavior Changes] TapHandler.point now
holds the release position while the tapped() signal is emitted.

Fixes: QTBUG-76871
Task-number: QTBUG-64847
Change-Id: I621a2eba4507a498788e9384344e8b4b7da32403
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: Fix link issues</title>
<updated>2019-01-03T09:45:44+00:00</updated>
<author>
<name>Nico Vertriest</name>
<email>nico.vertriest@qt.io</email>
</author>
<published>2018-12-11T11:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0e33ba51166dd68a26c56d85a1155c4849d59e4a'/>
<id>0e33ba51166dd68a26c56d85a1155c4849d59e4a</id>
<content type='text'>
Change-Id: I738b9da5335afb048d2eda2edf2be5095a91d7e5
Reviewed-by: Topi Reiniö &lt;topi.reinio@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I738b9da5335afb048d2eda2edf2be5095a91d7e5
Reviewed-by: Topi Reiniö &lt;topi.reinio@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: fix grabPermissions and other enumeration properties</title>
<updated>2018-09-14T07:55:02+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2018-09-10T13:37:34+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0a3eec60cab3c453b378ee45ac335e0dc2951f4b'/>
<id>0a3eec60cab3c453b378ee45ac335e0dc2951f4b</id>
<content type='text'>
* grabPermissions is a flags property, not bool.
* Add a list of the possible grabPermissions values.
* Fix two other places where \qmlproperty enum was used
  instead of enumeration.
* acceptedButtons, acceptedDevices, acceptedModifiers and
  acceptedPointerTypes are flags properties, not plain int.

Change-Id: I6f49dcc1e1762e913e4989b208380d64899630a6
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* grabPermissions is a flags property, not bool.
* Add a list of the possible grabPermissions values.
* Fix two other places where \qmlproperty enum was used
  instead of enumeration.
* acceptedButtons, acceptedDevices, acceptedModifiers and
  acceptedPointerTypes are flags properties, not plain int.

Change-Id: I6f49dcc1e1762e913e4989b208380d64899630a6
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PointHandler: stay active as long as acceptedButtons satisfied</title>
<updated>2018-07-27T10:43:04+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2018-02-16T07:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=f2ba3bd9792500b4d3fcfd23b03098a32641ef4f'/>
<id>f2ba3bd9792500b4d3fcfd23b03098a32641ef4f</id>
<content type='text'>
Ignore buttons which do not fit the acceptedButtons filter, and
do not assume that it's all over when any release happens.

Task-number: QTBUG-66360
Change-Id: I871ea7fdd9b76f06fa0d73382617b287c04d35ab
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ignore buttons which do not fit the acceptedButtons filter, and
do not assume that it's all over when any release happens.

Task-number: QTBUG-66360
Change-Id: I871ea7fdd9b76f06fa0d73382617b287c04d35ab
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix PointerHandler constructors and destructors</title>
<updated>2018-07-27T10:42:54+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2018-07-26T14:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0e1f83dcade8cb6428513eea4452dcd500f9e486'/>
<id>0e1f83dcade8cb6428513eea4452dcd500f9e486</id>
<content type='text'>
- Constructors should take QQuickItem* not QObject* to be symmetric
  with the parentItem() accessor (and other code) which assumes its type
- Use header initialization everywhere possible
- Reorder variables to minimize padding (somewhat)
- Remove empty destructor bodies (the compiler can write them)
- Remove override and virtual from destructors in accordance with
  https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override

Change-Id: I682a53a803d65e29136bfaec3a5b534e975ecf30
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Constructors should take QQuickItem* not QObject* to be symmetric
  with the parentItem() accessor (and other code) which assumes its type
- Use header initialization everywhere possible
- Reorder variables to minimize padding (somewhat)
- Remove empty destructor bodies (the compiler can write them)
- Remove override and virtual from destructors in accordance with
  https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override

Change-Id: I682a53a803d65e29136bfaec3a5b534e975ecf30
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rearrange docs: Pointer Handlers -&gt; Input Handlers</title>
<updated>2018-07-26T16:32:38+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2018-07-23T13:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=65fd9165162a8498c5bbe71e5372b65770c240b0'/>
<id>65fd9165162a8498c5bbe71e5372b65770c240b0</id>
<content type='text'>
At QtCS 2018 we decided to rename Pointer Handlers to Input Handlers
and include the Keys attached property as part of this set (since we
plan to have attached-property pointer handlers too, eventually).
It's no longer a module, it's included in Qt Quick 2.12.  We need to
start promoting Input Handlers and reducing the visibility of legacy
stuff like MouseArea and MultiPointTouchArea (in the hope of being
able to deprecate them eventually).

Task-number: QTBUG-66651
Change-Id: I801351ac2531191cbb1faac9318441c67a109af6
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
Reviewed-by: Venugopal Shivashankar &lt;Venugopal.Shivashankar@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At QtCS 2018 we decided to rename Pointer Handlers to Input Handlers
and include the Keys attached property as part of this set (since we
plan to have attached-property pointer handlers too, eventually).
It's no longer a module, it's included in Qt Quick 2.12.  We need to
start promoting Input Handlers and reducing the visibility of legacy
stuff like MouseArea and MultiPointTouchArea (in the hope of being
able to deprecate them eventually).

Task-number: QTBUG-66651
Change-Id: I801351ac2531191cbb1faac9318441c67a109af6
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
Reviewed-by: Venugopal Shivashankar &lt;Venugopal.Shivashankar@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure pressPosition and scenePressPosition are correctly initialized</title>
<updated>2018-07-23T10:51:17+00:00</updated>
<author>
<name>Jan Arve Sæther</name>
<email>jan-arve.saether@qt.io</email>
</author>
<published>2018-07-20T13:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a5f1581653bf39938f052eb0138ba0e834266b0c'/>
<id>a5f1581653bf39938f052eb0138ba0e834266b0c</id>
<content type='text'>
The problem was that QQuickMultiPointHandler::m_currentPoints were only
initialized when the candidate points matched the min and max number of
points.

So if we wanted to do a two-finger pinch it would only initialize them
when *both* fingers were pressed. Due to the checking of point-&gt;state() in
QQuickHandlerPoint::reset(const QQuickEventPoint *point) it meant that it
would only initialize the press position correctly for the *last* pressed
point. This was because the first pressed point would at the point when
reset() was called have a point-&gt;state() == QQuickEventPoint::Updated, so
it would not initialize the pressPosition nor the scenePressPosition.

Luckilly we can get the scenePressPosition from the QQuickEventPoint, but
the pressPosition we have to explicitly localize.

Change-Id: I493c736814cfbc265ec33e8a72fc4283edbbdc43
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem was that QQuickMultiPointHandler::m_currentPoints were only
initialized when the candidate points matched the min and max number of
points.

So if we wanted to do a two-finger pinch it would only initialize them
when *both* fingers were pressed. Due to the checking of point-&gt;state() in
QQuickHandlerPoint::reset(const QQuickEventPoint *point) it meant that it
would only initialize the press position correctly for the *last* pressed
point. This was because the first pressed point would at the point when
reset() was called have a point-&gt;state() == QQuickEventPoint::Updated, so
it would not initialize the pressPosition nor the scenePressPosition.

Luckilly we can get the scenePressPosition from the QQuickEventPoint, but
the pressPosition we have to explicitly localize.

Change-Id: I493c736814cfbc265ec33e8a72fc4283edbbdc43
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickMultiPointHandler: store QQuickHandlerPoints, not QQEventPoint*s</title>
<updated>2018-07-19T10:55:57+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2018-06-29T13:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=d310ca768bb5f45bae4fcec9a5d8151b6a366b8d'/>
<id>d310ca768bb5f45bae4fcec9a5d8151b6a366b8d</id>
<content type='text'>
QQuickPointerTouchEvent::reset(QEvent *event) reuses instances of
QQuickEventPoint from one touch event to the next, but it makes no
attempt to match up each instance with the same pointId from the event.
So from the perspective of Handlers, each event can have its
touchpoints in a different order, and therefore it's always wrong to
hold onto any QQuickEventPoint pointer between events.  Instead we
use QQuickHandlerPoint for storage: both for exposing to QML, and for
internal storage in handlers that need to remember touchpoint state.

Without this change, any MultiPointHandler could "forget" which
point IDs it had chosen to react to, in any case where the event
contains additional points.  It was using a QVector&lt;QQuickEventPoint *&gt;
to remember the chosen points, but each of those instances might be
assigned a different touchpoint during the handling of the next
touch event (and thus its ID would change "underneath").

Perhaps this went unnoticed until now because 1) the only subclass
of MultiPointHandler was PinchHandler, and we didn't often test
use cases with extra touchpoints beyond the ones involved in the pinch
and 2) on Linux/X11 they stayed in the same order in each event.
But as soon as we try to make DragHandler inherit MultiPointHandler,
it becomes clear that it does not succeed in holding on to a particular
touchpoint while dragging multiple DragHandlers with multiple fingers,
without this patch.

Change-Id: If7e0daa9ed77b263efc09f5ea73dfba6a3c8205c
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QQuickPointerTouchEvent::reset(QEvent *event) reuses instances of
QQuickEventPoint from one touch event to the next, but it makes no
attempt to match up each instance with the same pointId from the event.
So from the perspective of Handlers, each event can have its
touchpoints in a different order, and therefore it's always wrong to
hold onto any QQuickEventPoint pointer between events.  Instead we
use QQuickHandlerPoint for storage: both for exposing to QML, and for
internal storage in handlers that need to remember touchpoint state.

Without this change, any MultiPointHandler could "forget" which
point IDs it had chosen to react to, in any case where the event
contains additional points.  It was using a QVector&lt;QQuickEventPoint *&gt;
to remember the chosen points, but each of those instances might be
assigned a different touchpoint during the handling of the next
touch event (and thus its ID would change "underneath").

Perhaps this went unnoticed until now because 1) the only subclass
of MultiPointHandler was PinchHandler, and we didn't often test
use cases with extra touchpoints beyond the ones involved in the pinch
and 2) on Linux/X11 they stayed in the same order in each event.
But as soon as we try to make DragHandler inherit MultiPointHandler,
it becomes clear that it does not succeed in holding on to a particular
touchpoint while dragging multiple DragHandlers with multiple fingers,
without this patch.

Change-Id: If7e0daa9ed77b263efc09f5ea73dfba6a3c8205c
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
