diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-21 15:32:36 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-22 05:39:06 +0000 |
commit | 55cb6574d41ff6e50d2956d7c6f1dd5ac1315741 (patch) | |
tree | 380067c040337db8b18abb35f25115fea444c3a0 /tests/manual | |
parent | fcfaaa12278efd3e306841b2c77d4be0247bfbd3 (diff) |
flickableWithHandlers manual test improvements
Add it to main.qml and it and its dependencies to resources
Add checkbox to control Flickable's pressDelay
Change-Id: Ifaa4bbbaf61944231ab80cf356d7a3c44b24d73b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/pointer/flickableWithHandlers.qml | 62 | ||||
-rw-r--r-- | tests/manual/pointer/main.qml | 1 | ||||
-rw-r--r-- | tests/manual/pointer/qml.qrc | 5 |
3 files changed, 47 insertions, 21 deletions
diff --git a/tests/manual/pointer/flickableWithHandlers.qml b/tests/manual/pointer/flickableWithHandlers.qml index 822ca7dc8a..8225012591 100644 --- a/tests/manual/pointer/flickableWithHandlers.qml +++ b/tests/manual/pointer/flickableWithHandlers.qml @@ -40,6 +40,7 @@ import QtQuick 2.7 import Qt.labs.handlers 1.0 +import "qrc:/quick/shared/" as Examples import "content" Rectangle { @@ -52,35 +53,54 @@ Rectangle { Flickable { anchors.fill: parent anchors.margins: 10 + anchors.topMargin: 40 contentHeight: 600 contentWidth: 600 + pressDelay: pressDelayCB.checked ? 1000 : 0 - Row { + Column { spacing: 6 - Slider { - label: "DragHandler" - width: 100; height: 500 - } - MouseAreaSlider { - label: "MouseArea" - width: 100; height: 500 + Rectangle { + radius: 5 + width: parent.width - 12 + height: pressDelayCB.implicitHeight + 12 + x: 6 + color: "lightgray" + Examples.CheckBox { + x: 6; y: 6 + id: pressDelayCB + text: "press delay" + } } - Column { + + + Row { spacing: 6 - MouseAreaButton { - text: "MouseArea" - } - MptaButton { - text: "MultiPointTouchArea" - } - MptaButton { - text: "MultiPointTouchArea" + Slider { + label: "DragHandler" + value: 49; width: 100; height: 400 } - TapHandlerButton { - text: "TapHandler" + MouseAreaSlider { + label: "MouseArea" + value: 49; width: 100; height: 400 } - TapHandlerButton { - text: "TapHandler" + Column { + spacing: 6 + MouseAreaButton { + text: "MouseArea" + } + MptaButton { + text: "MultiPointTouchArea" + } + MptaButton { + text: "MultiPointTouchArea" + } + TapHandlerButton { + text: "TapHandler" + } + TapHandlerButton { + text: "TapHandler" + } } } } diff --git a/tests/manual/pointer/main.qml b/tests/manual/pointer/main.qml index e60edd06ce..df34c7d4a3 100644 --- a/tests/manual/pointer/main.qml +++ b/tests/manual/pointer/main.qml @@ -62,6 +62,7 @@ Window { addExample("photo surface", "re-implementation of the existing photo surface demo using Handlers", Qt.resolvedUrl("photosurface.qml")) addExample("tap", "TapHandler: device-agnostic tap/click detection for buttons", Qt.resolvedUrl("tapHandler.qml")) addExample("multibuttons", "TapHandler: gesturePolicy (99 red balloons)", Qt.resolvedUrl("multibuttons.qml")) + addExample("flickable with Handlers", "Flickable with buttons, sliders etc. implemented in various ways", Qt.resolvedUrl("flickableWithHandlers.qml")) } } } diff --git a/tests/manual/pointer/qml.qrc b/tests/manual/pointer/qml.qrc index 4113974d46..5bb79176c7 100644 --- a/tests/manual/pointer/qml.qrc +++ b/tests/manual/pointer/qml.qrc @@ -3,6 +3,7 @@ <file>flingAnimation.qml</file> <file>main.qml</file> <file>fakeFlickable.qml</file> + <file>flickableWithHandlers.qml</file> <file>joystick.qml</file> <file>map.qml</file> <file>mixer.qml</file> @@ -14,8 +15,12 @@ <file>content/FakeFlickable.qml</file> <file>content/FlashAnimation.qml</file> <file>content/MomentumAnimation.qml</file> + <file>content/MouseAreaButton.qml</file> + <file>content/MouseAreaSlider.qml</file> + <file>content/MptaButton.qml</file> <file>content/MultiButton.qml</file> <file>content/Slider.qml</file> + <file>content/TapHandlerButton.qml</file> <file>resources/arrowhead.png</file> <file>resources/balloon.png</file> <file>resources/fighter.png</file> |