aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-01-25 10:32:43 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-07 11:45:27 +0100
commita52c11229a0c55071a43c9352b6c2e9e8ae481fa (patch)
tree1e890f0242bf3d82f3f13d79763dd36d1a892ccf /tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml
parent5a5393fd53eea23b0de5a69ad9d706a2ee2502cc (diff)
Add additional animation autotests.
Change-Id: I11894325e73b8bb5b6ece4c626b15bd1d099f229 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml')
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml
new file mode 100644
index 0000000000..39f1e7a6d2
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml
@@ -0,0 +1,56 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400;
+ height: 240;
+ color: "black";
+
+ Rectangle {
+ id: gr
+ objectName: "target"
+ color: "green"
+ width: 50; height: 50
+ }
+
+ Rectangle {
+ id: np
+ objectName: "newParent"
+ x: 150
+ width: 150; height: 150
+ color: "yellow"
+ clip: true
+ Rectangle {
+ color: "red"
+ x: 50; y: 50; height: 50; width: 50
+ }
+
+ }
+
+ Rectangle {
+ id: vp
+ objectName: "viaParent"
+ x: 100; y: 100
+ width: 50; height: 50
+ color: "blue"
+ rotation: 45
+ scale: 2
+ }
+
+ states: State {
+ name: "state1"
+ ParentChange {
+ target: gr
+ parent: np
+ x: 50; y: 50; width: 100;
+ }
+ }
+
+ transitions: Transition {
+ reversible: true
+ to: "state1"
+ ParentAnimation {
+ target: gr; via: vp;
+ NumberAnimation { properties: "x,y,rotation,scale,width" }
+ }
+ }
+}