diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-02-11 21:35:45 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-02-11 22:49:39 (GMT) |
commit | fe9e91d5b9a5504fdc00f53abd5972621e7fa7dd (patch) | |
tree | 28c25d69001ef4dd4181ddf465b373491a61932b /tests/auto/declarative/qmlanimations/data | |
parent | 6e0c76a209b87e306e48266962f5668237e63c62 (diff) | |
download | Qt-fe9e91d5b9a5504fdc00f53abd5972621e7fa7dd.zip Qt-fe9e91d5b9a5504fdc00f53abd5972621e7fa7dd.tar.gz Qt-fe9e91d5b9a5504fdc00f53abd5972621e7fa7dd.tar.bz2 |
Adds qml prefix to all declarative autotests
Diffstat (limited to 'tests/auto/declarative/qmlanimations/data')
23 files changed, 485 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlanimations/data/attached.qml b/tests/auto/declarative/qmlanimations/data/attached.qml new file mode 100644 index 0000000..0fb6f8c --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/attached.qml @@ -0,0 +1,34 @@ +import Qt 4.6 + +Rectangle { + width: 180; height: 200; + + Component { + id: delegate + Rectangle { + id: wrapper + width: 180; height: 200 + color: "blue" + + states: State { + name: "otherState" + PropertyChanges { target: wrapper; color: "green" } + } + + transitions: Transition { + PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true } + ScriptAction { script: console.log(ListView.delayRemove ? "on" : "off") } + } + + Component.onCompleted: { + console.log(ListView.delayRemove ? "on" : "off"); + wrapper.state = "otherState" + } + } + } + + ListView { + model: 1 + delegate: delegate + } +} diff --git a/tests/auto/declarative/qmlanimations/data/badproperty1.qml b/tests/auto/declarative/qmlanimations/data/badproperty1.qml new file mode 100644 index 0000000..d31cae9 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/badproperty1.qml @@ -0,0 +1,21 @@ +import Qt 4.6 + +Rectangle { + id: wrapper + width: 240 + height: 320 + Rectangle { + id: myRect + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + states: State { + name: "state1" + PropertyChanges { target: myRect; border.color: "blue" } + } + transitions: Transition { + ColorAnimation { target: myRect; to: "red"; property: "border.colr"; duration: 1000 } + } + Component.onCompleted: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; +} diff --git a/tests/auto/declarative/qmlanimations/data/badproperty2.qml b/tests/auto/declarative/qmlanimations/data/badproperty2.qml new file mode 100644 index 0000000..3b8b111 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/badproperty2.qml @@ -0,0 +1,21 @@ +import Qt 4.6 + +Rectangle { + id: wrapper + width: 240 + height: 320 + Rectangle { + id: myRect + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + states: State { + name: "state1" + PropertyChanges { target: myRect; border.color: "blue" } + } + transitions: Transition { + ColorAnimation { target: myRect; to: "red"; property: "border"; duration: 1000 } + } + Component.onCompleted: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; +} diff --git a/tests/auto/declarative/qmlanimations/data/badtype1.qml b/tests/auto/declarative/qmlanimations/data/badtype1.qml new file mode 100644 index 0000000..6381df3 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/badtype1.qml @@ -0,0 +1,12 @@ +import Qt 4.6 + +Rectangle { + width: 240 + height: 320 + Rectangle { + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: PropertyAnimation { from: "blue"; to: "green"; } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/badtype2.qml b/tests/auto/declarative/qmlanimations/data/badtype2.qml new file mode 100644 index 0000000..8d57e41 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/badtype2.qml @@ -0,0 +1,12 @@ +import Qt 4.6 + +Rectangle { + width: 240 + height: 320 + Rectangle { + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { from: "blue"; to: "green"; } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/badtype3.qml b/tests/auto/declarative/qmlanimations/data/badtype3.qml new file mode 100644 index 0000000..c4867c3 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/badtype3.qml @@ -0,0 +1,12 @@ +import Qt 4.6 + +Rectangle { + width: 240 + height: 320 + Rectangle { + color: "red" + color: ColorAnimation { from: 10; to: 15; } + width: 50; height: 50 + x: 100; y: 100 + } +} diff --git a/tests/auto/declarative/qmlanimations/data/badtype4.qml b/tests/auto/declarative/qmlanimations/data/badtype4.qml new file mode 100644 index 0000000..a4cf265 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/badtype4.qml @@ -0,0 +1,27 @@ +import Qt 4.6 + +Rectangle { + id: wrapper + width: 240 + height: 320 + Rectangle { + id: myRect + objectName: "MyRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + MouseRegion { + anchors.fill: parent + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; + } + } + states: State { + name: "state1" + PropertyChanges { target: myRect; x: 200; color: "blue" } + } + transitions: Transition { + //comment out each in turn to make sure each only animates the relevant property + ColorAnimation { matchProperties: "x,color"; duration: 1000 } //x is real, color is color + NumberAnimation { matchProperties: "x,color"; duration: 1000 } //x is real, color is color + } +} diff --git a/tests/auto/declarative/qmlanimations/data/dotproperty.qml b/tests/auto/declarative/qmlanimations/data/dotproperty.qml new file mode 100644 index 0000000..369491f --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/dotproperty.qml @@ -0,0 +1,24 @@ +import Qt 4.6 + +Rectangle { + id: wrapper + width: 240 + height: 320 + Rectangle { + id: myRect + color: "red" + width: 50; height: 50 + x: 100; y: 100 + MouseRegion { + anchors.fill: parent + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; + } + } + states: State { + name: "state1" + PropertyChanges { target: myRect; border.color: "blue" } + } + transitions: Transition { + ColorAnimation { matchProperties: "border.color"; duration: 1000 } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/mixedtype1.qml b/tests/auto/declarative/qmlanimations/data/mixedtype1.qml new file mode 100644 index 0000000..87f4f16 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/mixedtype1.qml @@ -0,0 +1,25 @@ +import Qt 4.6 + +Rectangle { + id: wrapper + width: 240 + height: 320 + Rectangle { + id: myRect + objectName: "MyRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + MouseRegion { + anchors.fill: parent + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; + } + } + states: State { + name: "state1" + PropertyChanges { target: myRect; x: 200; border.width: 10 } + } + transitions: Transition { + PropertyAnimation { matchProperties: "x,border.width"; duration: 1000 } //x is real, border.width is int + } +} diff --git a/tests/auto/declarative/qmlanimations/data/mixedtype2.qml b/tests/auto/declarative/qmlanimations/data/mixedtype2.qml new file mode 100644 index 0000000..d555abd --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/mixedtype2.qml @@ -0,0 +1,25 @@ +import Qt 4.6 + +Rectangle { + id: wrapper + width: 240 + height: 320 + Rectangle { + id: myRect + objectName: "MyRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + MouseRegion { + anchors.fill: parent + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; + } + } + states: State { + name: "state1" + PropertyChanges { target: myRect; x: 200; color: "blue" } + } + transitions: Transition { + PropertyAnimation { matchProperties: "x,color"; duration: 1000 } //x is real, color is color + } +} diff --git a/tests/auto/declarative/qmlanimations/data/properties.qml b/tests/auto/declarative/qmlanimations/data/properties.qml new file mode 100644 index 0000000..7e73f57 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/properties.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { to: 200 } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/properties2.qml b/tests/auto/declarative/qmlanimations/data/properties2.qml new file mode 100644 index 0000000..86568ca --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/properties2.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { matchTargets: theRect; matchProperties: "x"; to: 200; } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/properties3.qml b/tests/auto/declarative/qmlanimations/data/properties3.qml new file mode 100644 index 0000000..ff08885 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/properties3.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { target: theRect; property: "x"; to: 300; } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/properties4.qml b/tests/auto/declarative/qmlanimations/data/properties4.qml new file mode 100644 index 0000000..dab7e5f --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/properties4.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { target: theRect; property: "y"; to: 200; } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/properties5.qml b/tests/auto/declarative/qmlanimations/data/properties5.qml new file mode 100644 index 0000000..56e0be8 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/properties5.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { matchTargets: theRect; matchProperties: "y"; to: 200; } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/propertiesTransition.qml b/tests/auto/declarative/qmlanimations/data/propertiesTransition.qml new file mode 100644 index 0000000..75603b9 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/propertiesTransition.qml @@ -0,0 +1,29 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + + states: State { + name: "moved" + PropertyChanges { + target: theRect + x: 200 + } + } + transitions: Transition { + NumberAnimation { matchTargets: theRect; matchProperties: "x" } + } + + MouseRegion { + anchors.fill: parent + onClicked: parent.state = "moved" + } +} diff --git a/tests/auto/declarative/qmlanimations/data/propertiesTransition2.qml b/tests/auto/declarative/qmlanimations/data/propertiesTransition2.qml new file mode 100644 index 0000000..ae59157 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/propertiesTransition2.qml @@ -0,0 +1,29 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + + states: State { + name: "moved" + PropertyChanges { + target: theRect + x: 200 + } + } + transitions: Transition { + NumberAnimation { target: theRect; property: "y"; to: 200 } + } + + MouseRegion { + anchors.fill: parent + onClicked: parent.state = "moved" + } +} diff --git a/tests/auto/declarative/qmlanimations/data/propertiesTransition3.qml b/tests/auto/declarative/qmlanimations/data/propertiesTransition3.qml new file mode 100644 index 0000000..eedba7b --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/propertiesTransition3.qml @@ -0,0 +1,29 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + + states: State { + name: "moved" + PropertyChanges { + target: theRect + x: 200 + } + } + transitions: Transition { + NumberAnimation { matchTargets: theRect; matchProperties: "y" } + } + + MouseRegion { + anchors.fill: parent + onClicked: parent.state = "moved" + } +} diff --git a/tests/auto/declarative/qmlanimations/data/propertiesTransition4.qml b/tests/auto/declarative/qmlanimations/data/propertiesTransition4.qml new file mode 100644 index 0000000..301f796 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/propertiesTransition4.qml @@ -0,0 +1,29 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + + states: State { + name: "moved" + PropertyChanges { + target: theRect + x: 200 + } + } + transitions: Transition { + NumberAnimation { target: theRect; matchProperties: "x" } + } + + MouseRegion { + anchors.fill: parent + onClicked: parent.state = "moved" + } +} diff --git a/tests/auto/declarative/qmlanimations/data/propertiesTransition5.qml b/tests/auto/declarative/qmlanimations/data/propertiesTransition5.qml new file mode 100644 index 0000000..565c519 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/propertiesTransition5.qml @@ -0,0 +1,29 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + + states: State { + name: "moved" + PropertyChanges { + target: theRect + x: 200 + } + } + transitions: Transition { + NumberAnimation { matchTargets: theRect; property: "x" } + } + + MouseRegion { + anchors.fill: parent + onClicked: parent.state = "moved" + } +} diff --git a/tests/auto/declarative/qmlanimations/data/propertiesTransition6.qml b/tests/auto/declarative/qmlanimations/data/propertiesTransition6.qml new file mode 100644 index 0000000..b541dab --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/propertiesTransition6.qml @@ -0,0 +1,29 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: theRect + objectName: "TheRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + } + + states: State { + name: "moved" + PropertyChanges { + target: theRect + x: 200 + } + } + transitions: Transition { + NumberAnimation { matchTargets: theItem; matchProperties: "x" } + } + + MouseRegion { + anchors.fill: parent + onClicked: parent.state = "moved" + } +} diff --git a/tests/auto/declarative/qmlanimations/data/valuesource.qml b/tests/auto/declarative/qmlanimations/data/valuesource.qml new file mode 100644 index 0000000..c35063d --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/valuesource.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: rect + objectName: "MyRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { id: anim; objectName: "MyAnim"; to: 200 } + } +} diff --git a/tests/auto/declarative/qmlanimations/data/valuesource2.qml b/tests/auto/declarative/qmlanimations/data/valuesource2.qml new file mode 100644 index 0000000..1a60542 --- /dev/null +++ b/tests/auto/declarative/qmlanimations/data/valuesource2.qml @@ -0,0 +1,14 @@ +import Qt 4.6 + +Rectangle { + width: 400 + height: 400 + Rectangle { + id: rect + objectName: "MyRect" + color: "red" + width: 50; height: 50 + x: 100; y: 100 + x: NumberAnimation { id: anim; objectName: "MyAnim"; running: false; to: 200 } + } +} |