summaryrefslogtreecommitdiffstats
path: root/weather-qml/Cloudy.qml
diff options
context:
space:
mode:
Diffstat (limited to 'weather-qml/Cloudy.qml')
-rw-r--r--weather-qml/Cloudy.qml106
1 files changed, 106 insertions, 0 deletions
diff --git a/weather-qml/Cloudy.qml b/weather-qml/Cloudy.qml
new file mode 100644
index 0000000..84e6f92
--- /dev/null
+++ b/weather-qml/Cloudy.qml
@@ -0,0 +1,106 @@
+import Qt 4.6
+
+ForecastView {
+ id: root
+ isClear: false
+
+ SmallCloud {
+ id: cloud5
+ x: scaledX(-22)
+ y: scaledY(-800)
+ finalY: scaledY(-477);
+ type: isDay ? "cloud" : "cloud_rain"
+ }
+
+ SmallCloud {
+ id: cloud4
+ x: scaledX(317)
+ y: scaledY(-800)
+ finalY: scaledY(-480);
+ type: isDay ? "cloud" : "cloud_rain"
+ }
+
+ HungItem {
+ id: sun
+ x: isDay ? scaledX(198) : scaledX(220)
+ y: scaledY(-800)
+ itemX: 0
+ itemY: isDay ? 176 : 180
+ height: isDay ? 460 : 440
+ finalY: isDay ? scaledY(-255) : scaledY(-205)
+ itemImage: isDay ? "images/cold_sun.png" : "images/moon.png"
+ lineImage: isDay ? "images/cold_sun_line.png" : "images/moon_line.png"
+ }
+
+ MediumCloud {
+ id: cloud3
+ x: scaledX(215)
+ y: scaledY(-800)
+ finalY: scaledY(-340)
+ type: isDay ? "cloud" : "cloud_rain"
+ }
+
+ LargeCloud {
+ id: cloud2
+ x: scaledX(-1)
+ y: scaledY(-800)
+ finalY: scaledY(-333)
+ type: isDay ? "cloud" : "cloud_rain"
+ }
+
+ LargeCloud {
+ id: cloud1
+ x: scaledX(318)
+ y: scaledY(-800)
+ finalY: scaledY(-331)
+ type: isDay ? "cloud" : "cloud_rain"
+ }
+
+ states : State {
+ name: "final"
+ PropertyChanges { target: sun; y: sun.finalY; }
+ PropertyChanges { target: cloud1; y: cloud1.finalY; }
+ PropertyChanges { target: cloud2; y: cloud2.finalY; }
+ PropertyChanges { target: cloud3; y: cloud3.finalY; }
+ PropertyChanges { target: cloud4; y: cloud4.finalY; }
+ PropertyChanges { target: cloud5; y: cloud5.finalY; }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ ParallelAnimation {
+ NumberAnimation { target: cloud1; properties: "y";
+ easing.type: "OutBack"; duration: 500 }
+
+ SequentialAnimation {
+ PauseAnimation { duration: 200 }
+ NumberAnimation { target: cloud3; properties: "y";
+ easing.type: "OutBack"; duration: 500 }
+ }
+
+ SequentialAnimation {
+ PauseAnimation { duration: 400 }
+ NumberAnimation { target: cloud2; properties: "y";
+ easing.type: "OutBack"; duration: 500 }
+ }
+
+ SequentialAnimation {
+ PauseAnimation { duration: 600 }
+ NumberAnimation { target: cloud4; properties: "y";
+ easing.type: "OutBack"; duration: 500 }
+ }
+
+ SequentialAnimation {
+ PauseAnimation { duration: 600 }
+ NumberAnimation { target: cloud5; properties: "y";
+ easing.type: "OutBack"; duration: 500 }
+ }
+ }
+
+ NumberAnimation { target: sun; properties: "y";
+ easing.type: "OutBack"; duration: 500 }
+ }
+ }
+
+ onPresent: { root.state = "final"; }
+}