| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Ib1fe267c23ea9fce9bcc0a91ed61081260338460
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
even if all points are accepted or grabbed. A passive grab isn't much
good if there are cases where the handler is prevented from monitoring.
This enables e.g. the PinchHandler to steal the grab when the right
number of touchpoints are present and have moved past the drag threshold,
and enables completion of a couple of autotests.
Change-Id: I78dc6fc585f80bfb3c13e0c6e757ef815fb94afe
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
setGrabberPointerHandler is now implemented more similarly to
setGrabberItem. One improvement is that in
tests/manual/pointer/pinchDragFlingMPTA.qml the MPTA deactivates
when the PinchHandler takes over its touchpoint grabs.
Change-Id: I0bd4f143b5f25f1b393839f86c2a7802f1fa1886
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an item that had a TapHandler and a DragHandler was placed inside a
Flickable it would call sendFilteredPointerEvent() for each of the
handlers, even if they were siblings.
This is not ideal, and because of a mechanism in flickable it even caused
the DragHandler to not drag the item as expected.
This is because of a mechanism in Flickable where the value returned is
actually derived from the previous call to filterMouseEvent() (stored in
member variable stealGrab).
Below are the relevant steps it went through when the mouse drag exceeded
the drag threshold (mouse pointer started on the item):
Precondition: QQuickFlickablePrivate::stealMouse == false
1. Mouse Drag (which exceeded drag threshold)
2. sendFilteredPointerEvent(tapHandler->parentItem()) returns false.
(but since it moved beyond threshold, it would set stealGrab-> true).
3. tapHandler->handlePointerEvent() declined and ungrabbed (due to
DragThreshold gesture policy).
4. sendFilteredPointerEvent(dragHandler->parentItem()) returns true
(because the previous call to sendFilteredPointerEvent() set stealGrab
to true).
As a consequence of (4), dragHandler->handlePointerEvent() was not called,
and the flickable would start to flick instead of the item starting to drag.
Change-Id: Ia99eae91cad0903ebbaedaaafcdf92a25705a922
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
This is more flexible in case someone wants a PinchHandler to respond
in the same way for either 2 or 3 touchpoints, for example.
Change-Id: I360ce6f0239d86aa92dbebc225e3646883e71100
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
For consistency we use QVector2D to represent relative movements in all
Pointer Handlers.
Change-Id: I23dc20c360b482a995d232e8a6d7e87d9bd8f600
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is for the sake of convention. Unfortunately (and the reason
it wasn't done this way at the outset), it may prevent us from ever
having a signal called "pressed" in this handler or its base class.
Change-Id: Iafa117410e0e33562290b87df59bc8c0085c217d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
For consistency we always spell it out, although it does make some
of these properties inconveniently verbose.
Change-Id: I64a08c3aa261c0ab89e09472dd47510abafbf7ca
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Conflicts:
examples/quick/shared/LauncherList.qml
src/quick/items/qquickevents.cpp
src/quick/items/qquickevents_p_p.h
src/quick/items/qquickwindow.cpp
tests/auto/quick/touchmouse/tst_touchmouse.cpp
Change-Id: Id692d291455093fc72db61f1b854f3fc9190267b
|
|
|
|
|
| |
Change-Id: Ia67dd04333a7879362819e1bb2a891c1f92b7069
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I46f7e2c16b775723a08aa192845d490046231990
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
to test interoperability of PointerHandlers with conventional touch-
handling Items (with MultiPointTouchArea being the prototypical instance)
Change-Id: Id19f312b17b70df072d66cd91816d2b19250a500
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
to verify when a point is pressed on a PointerHandler, dragged outside,
and released, the handler gets a release event, or a cancel.
Change-Id: Icdcb67c5549aca605bc6e7b425978760330ba270
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
Now an Event could represent a QEvent, a PointerEvent, or a call to onGrabChanged,
so we can test the sequence more thoroughly.
Change-Id: Ib935cda8dfc87c37d917989423615688dc9c260c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
5d4f488bf30f5650051d6cc226a75dbd17cd9a70 changed some APIs, but it forgot
to update all autotests.
Change-Id: I2a0ca14dbc1a0dddcbad597389c00d5e6f6c8b79
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I80000110a2e0ca69210322a0fcc587d86158358e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I1e0539fe24e19ca15641fa4007488b33c24ab8ba
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|
|
|
|
| |
Change-Id: If3d9e10bb54fc75a7e72bc6367de3e083611a45f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's now standard practice in autotests to use QScopedPointer to
manage the window so that it doesn't need to be deleted (or would be
left dangling if the test fails).
It's nice to be able to see the bounds of the EventItem.
Test not only the order of the event types received, but
the EventPoint state, and where they were received.
Of course PointerEvents go only to PointerHandlers in this test so
far... but now we can distinguish filtered events from events which
were received via the QQuickItem virtual function overrides.
Change-Id: I4830a431bedb7101c8c980ab3260d23b5852b645
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Flickable can steal the grab from a PointerHandler the same way it can
steal from an Item: by filtering the children's events. But within
the drag threshold, or if the DragHandler is dragging, the handlers
behave normally.
Change-Id: If1bc1f2e8d9aaebb590f3434a3018a9f1a1f1dac
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
| |
It's hitting slightly less than the expected amount of time in CI.
Change-Id: I51ab1ee385045dd948f52e0c27e72ce627952fd6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Change-Id: Idc516220365b3051e072506ede3f3159b0b736b2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add documentation to the grab-related event and eventpoint methods.
Rename "grabber" functions which relate only to the exclusive grab,
in cases where it would otherwise be ambiguous.
And a few other documentation changes.
Change-Id: I1a203c8c06a19d4abdb000f08b387c38341ef476
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now if a Button with a TapHandler is pressed and has only a passive
grab, Flickable can take the exclusive grab, and it notifies the
TapHandler so that the button can go back to released state.
This reverts parts of commit e2fd141372335f917c2d216051abb00d8b15f87c
such that more of tst_PointerHandlers is working the same as it was
before we started adding the passive grab concept.
Change-Id: I88970716fcbbfb066a313fcefb233cf9263da944
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
| |
Change-Id: I4a6e3c72d69e893fec2e39f4faab24af6d00c7e0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If no handler or item accepts a newly-pressed point, the event will be
re-delivered in deliverTouchEvent(). It doesn't make sense to
re-deliver to the same handlers though.
A temporary QSet isn't cheap to create, whereas it seems we will need
to keep track of handlers which have already been visited, in order to
avoid visiting passively-grabbing handlers multiple times. Since both
a QVector and a QSet are heap-allocated, and we expect to have a limited
quantity of handlers grabbing at one time, a retained QVector (cleared
between events) seems to be the cheapest data structure.
Change-Id: I831e9a2576b2fcb9095e065795f2baff58115a49
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The "weak grab" concept depends on this.
First we deliver to grabbers, then we deliver to non-grabbing handlers
(but not to non-grabbing items). Avoid re-delivering to grabbing
handlers which already received the same event.
Change-Id: If51e1cd9372e3bed1daea3758e9ef8e37c0ba5e3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
Tests will become too complex to do them all in one class, so let's
have a subdirectory for each handler.
Change-Id: I157f6c150f15ca53d77bc9eb716723c6105e393a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
|
|
|
|
|
|
|
| |
QQuickPointerHandler and QQuickItem have only QObject in common.
Change-Id: I8fb68cc1779f42049db1e0eb5ff60019a1c674d3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
|
|
Starting with touchEventDelivery and mouseEventDelivery, and
reflecting the current state of the code: a handler cannot yet be
the grabber, so we don't yet deliver properly to both the legacy
event handler functions and to the handler objects.
Change-Id: Ied73663b97907431668cb2621260d2551052d737
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
|