aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qdeclarativeanimations/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick2/qdeclarativeanimations/data')
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/looping.qml16
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/reanchor.qml46
-rw-r--r--tests/auto/qtquick2/qdeclarativeanimations/data/reparent.qml56
3 files changed, 118 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/looping.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/looping.qml
new file mode 100644
index 0000000000..a3d40ae837
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/looping.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+
+Item {
+ width: 200; height: 200
+
+ Rectangle {
+ x: 50; y: 50; width: 50; height: 50; color: "red"
+
+ SequentialAnimation on rotation {
+ NumberAnimation {
+ from: 0; to: 90; duration: 100
+ loops: 3
+ }
+ }
+ }
+}
diff --git a/tests/auto/qtquick2/qdeclarativeanimations/data/reanchor.qml b/tests/auto/qtquick2/qdeclarativeanimations/data/reanchor.qml
new file mode 100644
index 0000000000..241cc81a96
--- /dev/null
+++ b/tests/auto/qtquick2/qdeclarativeanimations/data/reanchor.qml
@@ -0,0 +1,46 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: container
+ width: 200; height: 200
+ Rectangle {
+ id: myRect
+ color: "green";
+ anchors.left: parent.left
+ anchors.right: rightGuideline.left
+ anchors.top: topGuideline.top
+ anchors.bottom: container.bottom
+ }
+ Item { id: leftGuideline; x: 10 }
+ Item { id: rightGuideline; x: 150 }
+ Item { id: topGuideline; y: 10 }
+ Item { id: bottomGuideline; y: 150 }
+ Item { id: topGuideline2; y: 50 }
+ Item { id: bottomGuideline2; y: 175 }
+
+ states: [ State {
+ name: "reanchored"
+ AnchorChanges {
+ target: myRect;
+ anchors.left: leftGuideline.left
+ anchors.right: container.right
+ anchors.top: container.top
+ anchors.bottom: bottomGuideline.bottom
+ }
+ }, State {
+ name: "reanchored2"
+ AnchorChanges {
+ target: myRect;
+ anchors.left: undefined
+ anchors.right: undefined
+ anchors.top: topGuideline2.top
+ anchors.bottom: bottomGuideline2.bottom
+ }
+ }]
+
+ transitions: Transition {
+ AnchorAnimation { }
+ }
+
+ state: "reanchored"
+}
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" }
+ }
+ }
+}