Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeanimations / data / rotation.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     width: 600; height: 200
5
6     Row {
7         spacing: 5
8         Rectangle {
9             id: rr
10             objectName: "rr"
11             color: "red"
12             width: 100; height: 100
13         }
14         Rectangle {
15             id: rr2
16             objectName: "rr2"
17             color: "red"
18             width: 100; height: 100
19         }
20         Rectangle {
21             id: rr3
22             objectName: "rr3"
23             color: "red"
24             width: 100; height: 100
25         }
26         Rectangle {
27             id: rr4
28             objectName: "rr4"
29             color: "red"
30             width: 100; height: 100
31         }
32     }
33
34     states: State {
35         name: "state1"
36         PropertyChanges { target: rr; rotation: 370 }
37         PropertyChanges { target: rr2; rotation: 370 }
38         PropertyChanges { target: rr3; rotation: 370 }
39         PropertyChanges { target: rr4; rotation: 370 }
40     }
41
42     transitions: Transition {
43         RotationAnimation { target: rr; direction: RotationAnimation.Numerical; duration: 1000 }
44         RotationAnimation { target: rr2; direction: RotationAnimation.Clockwise; duration: 1000 }
45         RotationAnimation { target: rr3; direction: RotationAnimation.Counterclockwise; duration: 1000 }
46         RotationAnimation { target: rr4; direction: RotationAnimation.Shortest; duration: 1000 }
47     }
48 }