Commit Graph

11 Commits

Author SHA1 Message Date
Lucie Gérard 9c5fc88388 Correct license for test files
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-27 10:32:21 +01:00
Shawn Rutledge 509016589d Get the photosurface manual test working again
- FakeFlickable was moved in 8503f884bb
  but this still needs it, so we just copy it back (unmodified)
- use QtQuick.Dialogs version of FolderDialog
- improvements from qtdoc 489e346f37fbf31b0034f0e80fcd97e87c2e0304 and
  following patches

The FolderDialog may not open because of QTBUG-111564.
Setting XDG_CURRENT_DESKTOP=GNOME helps.

Task-number: QTBUG-108924
Task-number: QTBUG-111564
Change-Id: I15972d3df2b1a2a01cd91361ab2c8b44a40c93a1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-28 18:11:54 +01:00
Shawn Rutledge 8503f884bb Move most of the pointer manual tests to a new pointerhandlers example
They were always meant to be examples eventually. Now they will be used
for an example of how to implement custom controls using only basic
items and handlers. Some components are very similar to those in
the shared directory; but most examples will use Qt Quick Controls,
so those shared components can be removed when we no longer use them.
This example should remain as the one that shows how to build
reusable controls "from scratch".

Removed InputInspector because it's inefficient, has limited usefulness,
tends to require building the manual test to be able to run it, and
could be better built as a reusable Qt.labs component later on,
providing a model with all known devices and taking advantage of the
QPointingDevice::grabChanged signal to track the grab states rather
than polling.

Pick-to: 6.2
Change-Id: I47ab6ebb2cecab07a69cf96e546ffd0db3026a60
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-09-24 17:03:19 +02:00
Shawn Rutledge 5d45aa1a64 Add WheelHandler
It can be used to change any qreal property of its target Item in
response to wheel rotation, or it can be used in other ways that involve
bindings but without a target item.

[ChangeLog][QtQuick][Event Handlers] Added WheelHandler, which handles
mouse wheel rotation by modifying arbitrary Item properties.

Fixes: QTBUG-68119
Change-Id: I247e2325ee993cc1b91a47fbd6c4ba0ffde7ad49
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-04-27 05:41:21 +00:00
Shawn Rutledge ca7cdd71ee Make DragHandler a MultiPointHandler
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>
2018-07-19 10:56:06 +00:00
Shawn Rutledge 197c22be54 Get rid of Qt.labs.handlers import, merge into QtQuick 2.12
... and clean up imports in examples, snippets and tests accordingly.

Change-Id: I5bbe63afd2614cdc2c1ec7d179c9acd6bc03b167
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-07-17 15:11:51 +00:00
Kai Koehne 11d53337cf Fix outdated BSD license header
Change-Id: Ib1fe267c23ea9fce9bcc0a91ed61081260338460
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-11-15 17:54:35 +00:00
Shawn Rutledge fae076941b FakeFlickable: returnToBounds only on axes which need it
If you flick in such a way that y is within bounds but x is out of
bounds, then returnToBounds should not change y; and vice-versa.

Change-Id: I156a2f6e28bdcd6aecce35e639acaa05e55ee382
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-09-11 13:59:12 +00:00
Jan Arve Saether 5d4f488bf3 Move properties into grouped "point" property
Change-Id: I80000110a2e0ca69210322a0fcc587d86158358e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-05-23 05:52:18 +00:00
Shawn Rutledge 057fc4b5b0 FakeFlickable: animate returnToBounds() when flicking is done
It looks much nicer than just jerking back into position.

We still don't have "resistance" to dragging past the bounds, though.

Change-Id: I60f6f58fe87638fd17144ea6640bae673a3b633d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-05-22 19:14:00 +00:00
Shawn Rutledge 5d59327ebd add FakeFlickable manual test
Demonstrate that DragHandler, MomentumAnimation and a couple of Items
are enough to implement most of Flickable's functionality.

Change-Id: I59dae38dc66c16813385aa6c00e3a1a834520f31
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-02-08 10:36:26 +00:00