blob: 046ba6d94186bf585647d8393a45ba02a9612fec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import Qt 4.6
ForecastView {
id: root
HungItem {
id: sun
x: isDay ? scaledX(120) : scaledX(220)
y: scaledY(-800)
itemX: 0
itemY: isDay ? 200 : 180
height: isDay ? 500 : 440
finalY: isDay ? scaledY(-198) : scaledY(-205)
itemImage: isDay ? "images/sun.png" : "images/moon.png"
lineImage: isDay ? "images/sun_line.png" : "images/moon_line.png"
}
states : State {
name: "final"
PropertyChanges { target: sun; y: sun.finalY; }
}
transitions : Transition {
SequentialAnimation {
NumberAnimation { target: sun; properties: "y";
easing.type: "OutBack"; duration: 500 }
}
}
onPresent: root.state = "final"
}
|