aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-31 13:08:12 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-31 13:08:12 +0100
commit10972ca272ae59fbe0f18eef6d9237fbd4aaca86 (patch)
tree4c2766b234368b2e401dc955bd44faf8088deada /tests/manual
parente09a8591990e5281929ca2a7bb180bb3a35556ba (diff)
parent548b0bdd0f57c2209c8cbd7ac4ecda204cf69a2e (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: src/imports/controls/CheckIndicator.qml src/imports/controls/RadioIndicator.qml src/imports/controls/RangeSlider.qml src/imports/controls/Slider.qml src/imports/controls/SwitchIndicator.qml Change-Id: I32612d2f905ffa02dbaedbb1f84c8237fbd66db3
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/testbench/main.cpp2
-rw-r--r--tests/manual/testbench/qml.qrc2
-rw-r--r--tests/manual/testbench/testbench.qml (renamed from tests/manual/testbench/main.qml)140
3 files changed, 140 insertions, 4 deletions
diff --git a/tests/manual/testbench/main.cpp b/tests/manual/testbench/main.cpp
index a782b5fe..5a54dab3 100644
--- a/tests/manual/testbench/main.cpp
+++ b/tests/manual/testbench/main.cpp
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
// TODO: move style selection into app UI and use settings to save choices.
// qputenv("QT_QUICK_CONTROLS_STYLE", "material");
QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+ engine.load(QUrl(QStringLiteral("qrc:/testbench.qml")));
return app.exec();
}
diff --git a/tests/manual/testbench/qml.qrc b/tests/manual/testbench/qml.qrc
index 5f6483ac..9f4b1783 100644
--- a/tests/manual/testbench/qml.qrc
+++ b/tests/manual/testbench/qml.qrc
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/">
- <file>main.qml</file>
+ <file>testbench.qml</file>
</qresource>
</RCC>
diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/testbench.qml
index ea59d5b5..38fd06fc 100644
--- a/tests/manual/testbench/main.qml
+++ b/tests/manual/testbench/testbench.qml
@@ -745,14 +745,14 @@ ApplicationWindow {
Frame {
Tumbler {
model: 5
- implicitWidth: 100
+ implicitWidth: 80
implicitHeight: 100
}
}
Frame {
Tumbler {
model: 5
- implicitWidth: 100
+ implicitWidth: 80
implicitHeight: 100
enabled: false
}
@@ -761,11 +761,147 @@ ApplicationWindow {
RowLayout {
Dial {
+ implicitWidth: 100
+ implicitHeight: 100
}
Dial {
+ implicitWidth: 100
+ implicitHeight: 100
enabled: false
}
}
+
+ ListModel {
+ id: checkableDelegateModel
+ ListElement { label: "Normal" }
+ ListElement { label: "Pressed"; press: true }
+ ListElement { label: "Checked"; check: true }
+ ListElement { label: "CH + PR"; check: true; press: true }
+ ListElement { label: "Disabled"; disabled: true }
+ }
+
+ RowLayout {
+ Frame {
+ Column {
+ width: 200
+
+ Repeater {
+ model: checkableDelegateModel
+ delegate: CheckDelegate {
+ text: label
+ width: parent.width
+ down: press
+ checked: check
+ enabled: !disabled
+ ButtonGroup.group: radioButtonGroup
+ }
+ }
+ }
+ }
+
+ ButtonGroup {
+ id: radioButtonGroup
+ }
+
+ Frame {
+ Column {
+ width: 200
+
+ Repeater {
+ model: checkableDelegateModel
+ delegate: RadioDelegate {
+ text: label
+ down: press
+ width: parent.width
+ checked: check
+ enabled: !disabled
+ ButtonGroup.group: radioButtonGroup
+ }
+ }
+ }
+ }
+
+ Frame {
+ Column {
+ width: 200
+
+ Repeater {
+ model: checkableDelegateModel
+ delegate: SwitchDelegate {
+ text: label
+ width: parent.width
+ checked: check
+ down: press
+ enabled: !disabled
+ }
+ }
+ }
+ }
+ }
+
+ ListModel {
+ id: regularDelegateModel
+ ListElement { label: "Normal" }
+ ListElement { label: "Pressed"; press: true }
+ ListElement { label: "Disabled"; disabled: true }
+ }
+
+ RowLayout {
+ Frame {
+ Column {
+ width: 200
+
+ Repeater {
+ model: regularDelegateModel
+ delegate: ItemDelegate {
+ text: label
+ width: parent.width
+ down: press
+ enabled: !disabled
+ }
+ }
+ }
+ }
+ Frame {
+ Column {
+ id: listView
+ width: 200
+ clip: true
+
+ Repeater {
+ model: regularDelegateModel
+ delegate: SwipeDelegate {
+ id: swipeDelegate
+ text: label
+ width: parent.width
+ down: press
+ enabled: !disabled
+
+ Component {
+ id: removeComponent
+
+ Rectangle {
+ color: swipeDelegate.swipe.complete && swipeDelegate.pressed ? "#333" : "#444"
+ width: parent.width
+ height: parent.height
+ clip: true
+
+ Label {
+ font.pixelSize: swipeDelegate.font.pixelSize
+ text: "Boop"
+ color: "white"
+ anchors.centerIn: parent
+ }
+ }
+ }
+
+ swipe.left: removeComponent
+ swipe.right: removeComponent
+ }
+ }
+ }
+ }
+ }
}
}
}