aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/pointer/singlePointHandlerProperties.qml
Commit message (Collapse)AuthorAgeFilesLines
* Remove QQuickPointerEvent etc.; deliver QPointerEvents directlyShawn Rutledge2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | QEventPoint does not have an accessor to get the QPointerEvent that it came from, because that's inconsistent with the idea that QPointerEvent instances are temporary, stack-allocated and movable (the pointer would often be wrong or null, therefore could not be relied upon). So most functions that worked directly with QQuickEventPoint before (which fortunately are still private API) now need to receive the QPointerEvent too, which we choose to pass by pointer. QEventPoint is always passed by reference (const where possible) to be consistent with functions in QPointerEvent that take QEventPoint by reference. QEventPoint::velocity() should be always in scene coordinates now, which saves us the trouble of transforming it to each item's coordinate system during delivery, but means that it will need to be done in handlers or applications sometimes. If we were going to transform it, it would be important to also store the sceneVelocity separately in QEventPoint so that the transformation could be done repeatedly for different items. Task-number: QTBUG-72173 Change-Id: I7ee164d2e6893c4e407fb7d579c75aa32843933a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add QQuickHandlerPoint::device propertyShawn Rutledge2020-09-041-1/+2
| | | | | | | | | | | | The HandlerPoint type is used as the memory of an event or TouchPoint that a handler has already handled. Maybe in the future we'll store a copy of a QEventPoint instead. But for now, it's nice to have the device pointer available for binding properties, instead of only in QQuickEventPoint, which was only exposed in signals like TapHandler.tapped(). Change-Id: I314fc8c76311dc2620f1d97d4cadacf2e9869274 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Replace Qt's MidButton with MiddleButtonEdward Welbourne2020-07-221-1/+1
| | | | | | | | | | The latter has been the preferred name since Qt 4.7.0. Added a comment on where the old name is exposed to QML that it's only for backwards compatibility. Pick-to: 5.15 Change-Id: I2c5088d597dd7327cc5899d06afb180d0ec2893e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use PointHandler for singlePointProperties manual testShawn Rutledge2018-08-301-24/+25
| | | | | | | | The name indicates that it should test a SinglePointHandler, which DragHandler no longer is. Change-Id: I3c585b43c1334cf6794a98c92f742f92243adac8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Make DragHandler a MultiPointHandlerShawn Rutledge2018-07-191-22/+21
| | | | | | | | | | That is, minimumPointCount can now be set to a value > 1 to require multiple fingers to do the dragging, or to track the displacement of multiple fingers to adjust some value (such as the tilt of a map). Task-number: QTBUG-68106 Change-Id: Ib35823e36deb81c8b277d3070fcc758c7c019564 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Get rid of Qt.labs.handlers import, merge into QtQuick 2.12Shawn Rutledge2018-07-171-2/+1
| | | | | | | ... and clean up imports in examples, snippets and tests accordingly. Change-Id: I5bbe63afd2614cdc2c1ec7d179c9acd6bc03b167 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add QQuickHandlerPoint::modifiers propertyShawn Rutledge2018-05-181-2/+3
| | | | | | | | | The event includes it; this exposes it to QML, for the benefit of conditional JS logic in Pointer Handler use cases. Task-number: QTBUG-68101 Change-Id: I3f04c5db7f5aef461edb6168922b70e3fb3bda37 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix outdated BSD license headerKai Koehne2017-11-151-27/+15
| | | | | Change-Id: Ib1fe267c23ea9fce9bcc0a91ed61081260338460 Reviewed-by: Liang Qi <liang.qi@qt.io>
* singlePointHandlerProperties manual test fixesShawn Rutledge2017-09-081-1/+2
| | | | | | | | | | | After 2617ac5b9df7dfdecf0cb02d5933c40df1a55bbc the point.pos properties are renamed. We need to accept all buttons in order to show feedback for middle and right clicks. Change-Id: I2dce1b14c4ac94ffac7b8ed3ecc12938067a434c Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Move properties into grouped "point" propertyJan Arve Saether2017-05-231-18/+19
| | | | | Change-Id: I80000110a2e0ca69210322a0fcc587d86158358e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQPSingleHandler: copy some values from QQuickEventPoint to propertiesShawn Rutledge2017-01-031-0/+162
We can't copy the eventpoint and we can't continue to refer to it after delivery, either. So we can't have an event property. Some QML use cases depend on being able to access last-known values between events. Change-Id: Ice8a1763015f2554275d0cb76824fd0366eaef56 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>