summaryrefslogtreecommitdiff
path: root/tests/manual/testbench
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-02-20 15:50:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-21 17:46:54 +0100
commit2fdcf22dfa02d644cae2f0a4342783b715e12f43 (patch)
treeb13a242b05c1ebea153246e1fc5b06217e9c6883 /tests/manual/testbench
parent6ea1b2b1f26d266b88b091ddece0cdaad5d3accc (diff)
downloadqtquickcontrols-2fdcf22dfa02d644cae2f0a4342783b715e12f43.tar.gz
TestBench: Add possibility to stop timer on progress bar
Change-Id: I7aad12734a6bfe4e97ce5810366c7a5590ec1b11 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/manual/testbench')
-rw-r--r--tests/manual/testbench/content/Components.qml4
-rw-r--r--tests/manual/testbench/main.qml18
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/manual/testbench/content/Components.qml b/tests/manual/testbench/content/Components.qml
index ef80f0d7..73e154b7 100644
--- a/tests/manual/testbench/content/Components.qml
+++ b/tests/manual/testbench/content/Components.qml
@@ -69,9 +69,10 @@ Item {
}
property Component progressbar: ProgressBar {
+ property bool ___isRunning: true
Timer {
id: timer
- running: true
+ running: ___isRunning
repeat: true
interval: 25
onTriggered: {
@@ -80,6 +81,7 @@ Item {
}
}
}
+
property var model: ListModel{
id: testDataModel
Component.onCompleted: {
diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/main.qml
index c6b1cdf0..ef8e6958 100644
--- a/tests/manual/testbench/main.qml
+++ b/tests/manual/testbench/main.qml
@@ -53,6 +53,7 @@ ApplicationWindow {
toolBar: ToolBar {
width: parent.width
RowLayout {
+ id: alwaysVisible
anchors.left: parent.left
anchors.leftMargin: 8
height: parent.height
@@ -72,6 +73,16 @@ ApplicationWindow {
onClicked: container.resetSize()
}
}
+
+ CheckBox {
+ id: startStopAnim
+ anchors.left: alwaysVisible.right
+ anchors.verticalCenter: parent.verticalCenter
+ text: "Stop Animation"
+ checked: true
+ visible: false
+ onCheckedChanged: if (visible) loader.item.___isRunning = checked
+ }
}
statusBar: StatusBar {
Row {
@@ -133,12 +144,19 @@ ApplicationWindow {
PropertyLayouts{ id: layouts }
onStatusChanged: {
+ startStopAnim.visible = false
+
if (status == Loader.Ready) {
propertyMap = []
var arr = new Array
for (var prop in item) {
+ if (prop.toString() === "___isRunning") {
+ startStopAnim.visible = true
+ continue;
+ }
+
if (!prop.indexOf("on")) { // look only for properties
if (prop.indexOf("Changed") !== (prop.length - 7))
continue;