Merge lp:~neokore/ubuntu-weather-app/currentWeatherAnimations into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Raúl Yeguas
Status: Merged
Approved by: Martin Borho
Approved revision: 9
Merged at revision: 10
Proposed branch: lp:~neokore/ubuntu-weather-app/currentWeatherAnimations
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 1038 lines (+867/-21)
6 files modified
components/AddLocationDialog.qml (+2/-2)
components/CurrentWeather.qml (+18/-8)
components/DayWeatherComponent.qml (+6/-7)
components/LocationTab.qml (+5/-3)
components/WeatherApi.js (+1/-1)
components/WeatherConditionIconComponent.qml (+835/-0)
To merge this branch: bzr merge lp:~neokore/ubuntu-weather-app/currentWeatherAnimations
Reviewer Review Type Date Requested Status
Martin Borho Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+160107@code.launchpad.net

Commit message

Added a WeatherConditionIcon component with animations and transitions.

Description of the change

Added a WeatherConditionIcon component with animations and transitions.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

Looks great, well done!

Is only the sun animated? Somehow the clouds don't move like in http://www.youtube.com/watch?v=OzoxmPgz24E

Revision history for this message
Raúl Yeguas (neokore) wrote :

Other conditions like some clouds, thunderstorm or snow are animated too.
El 22/04/2013 16:06, "Martin Borho" <email address hidden> escribió:

> Looks great, well done!
>
> Is only the sun animated? Somehow the clouds don't move like in
> http://www.youtube.com/watch?v=OzoxmPgz24E
> --
>
> https://code.launchpad.net/~neokore/ubuntu-weather-app/currentWeatherAnimations/+merge/160107
> You are the owner of
> lp:~neokore/ubuntu-weather-app/currentWeatherAnimations.
>

Revision history for this message
Martin Borho (martin-borho) wrote :

Looks great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/AddLocationDialog.qml'
--- components/AddLocationDialog.qml 2013-04-20 18:31:16 +0000
+++ components/AddLocationDialog.qml 2013-04-22 13:29:40 +0000
@@ -11,7 +11,7 @@
11 id: addLocationDialogue11 id: addLocationDialogue
12 height: units.gu(10)12 height: units.gu(10)
13 title: i18n.tr("Add location")13 title: i18n.tr("Add location")
14 text: i18n.tr("Write a city name o pick it by GPS location")14 text: i18n.tr("Write a city name o pick it by your location")
1515
16 function locationSelected(index) {16 function locationSelected(index) {
17 var location = citiesModel.get(index);17 var location = citiesModel.get(index);
@@ -54,7 +54,7 @@
5454
55 Button {55 Button {
56 id: locationGPSButton56 id: locationGPSButton
57 text: i18n.tr("Get by GPS location")57 text: i18n.tr("Use my own location")
58 onClicked: {58 onClicked: {
59 citiesModel.clear();59 citiesModel.clear();
60 Api.WeatherApi.searchLocationByPoint({coords: {"lon":10,"lat":53.549999}, units:"metric"}, onSearchSuccess,onApiError);60 Api.WeatherApi.searchLocationByPoint({coords: {"lon":10,"lat":53.549999}, units:"metric"}, onSearchSuccess,onApiError);
6161
=== modified file 'components/CurrentWeather.qml'
--- components/CurrentWeather.qml 2013-03-12 17:36:19 +0000
+++ components/CurrentWeather.qml 2013-04-22 13:29:40 +0000
@@ -1,12 +1,13 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "OpenWeatherMap.js" as Weather3import "./" as Components
44
5Rectangle {5Rectangle {
6 id: currentWeather6 id: currentWeather
77
8 // For Status I take the same condition codes from OpenWeatherMap (http://openweathermap.org/wiki/API/Weather_Condition_Codes)8 // For Status I take the same condition codes from OpenWeatherMap (http://openweathermap.org/wiki/API/Weather_Condition_Codes)
9 property int condition9 property int condition
10 property string icon
10 property int currentTemp11 property int currentTemp
11 property int minTemp12 property int minTemp
12 property int maxTemp13 property int maxTemp
@@ -17,15 +18,24 @@
17 height: childrenRect.height+units.gu(10)18 height: childrenRect.height+units.gu(10)
18 anchors.horizontalCenter: parent.horizontalCenter19 anchors.horizontalCenter: parent.horizontalCenter
1920
20 Image {21 Components.WeatherConditionIconComponent {
21 id: image122 id: currentCondition
22 width: units.gu(30)23 width: units.gu(30)
23 height: units.gu(30)24 height: units.gu(30)
24 sourceSize.height: units.gu(30)
25 sourceSize.width: units.gu(30)
26 anchors.horizontalCenter: parent.horizontalCenter25 anchors.horizontalCenter: parent.horizontalCenter
27 source: "../resources/images/"+Weather.getConditionIcon(condition)+".jpg"26 condition: currentWeather.icon
28 fillMode: Image.PreserveAspectFit27
28 NumberAnimation on opacity {
29 id: createAnimation
30 easing.type: Easing.Linear
31 from: 0
32 to: 1
33 duration: 1000
34 }
35
36 Component.onCompleted: {
37 createAnimation.start()
38 }
29 }39 }
3040
31 Rectangle {41 Rectangle {
@@ -33,7 +43,7 @@
33 width: units.gu(50)43 width: units.gu(50)
34 height: units.gu(10)44 height: units.gu(10)
35 anchors.horizontalCenter: parent.horizontalCenter45 anchors.horizontalCenter: parent.horizontalCenter
36 anchors.top: image1.bottom46 anchors.top: currentCondition.bottom
37 anchors.topMargin: 047 anchors.topMargin: 0
38 color: "#00000000"48 color: "#00000000"
3949
4050
=== modified file 'components/DayWeatherComponent.qml'
--- components/DayWeatherComponent.qml 2013-03-09 15:30:09 +0000
+++ components/DayWeatherComponent.qml 2013-04-22 13:29:40 +0000
@@ -1,5 +1,6 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "./" as Components
3import "OpenWeatherMap.js" as Weather4import "OpenWeatherMap.js" as Weather
45
5Rectangle {6Rectangle {
@@ -9,29 +10,27 @@
9 height:contentShape.height+units.gu(2)10 height:contentShape.height+units.gu(2)
1011
11 property int condition12 property int condition
13 property string icon
12 property int temperature14 property int temperature
13 property int temperatureMin15 property int temperatureMin
14 property bool metric: true16 property bool metric: true
15 property string scale: (metric) ? "C" : "F"17 property string scale: (metric) ? "C" : "F"
16 property string shapeColor: "#D6D6D6"18 property string shapeColor: "#D6D6D6"
1719
18 onConditionChanged: {
19 currentIcon.source = "../resources/images/"+Weather.getConditionIcon(condition)+"-day.png"
20 }
21
22 UbuntuShape{20 UbuntuShape{
23 id: contentShape21 id: contentShape
24 radius: "small"22 radius: "small"
25 width: parent.width23 width: parent.width
26 color: shapeColor24 color: shapeColor
27 anchors.centerIn: parent25 anchors.centerIn: parent
28 height:childrenRect.height26 height: childrenRect.height
29 Row {27 Row {
30 width:parent.width28 width:parent.width
31 Image {29 Components.WeatherConditionIconComponent {
32 id: currentIcon30 id: currentIcon
33 height: units.gu(10)31 height: units.gu(10)
34 fillMode: Image.PreserveAspectFit32 width:units.gu(10)
33 condition: dayWeatherComponent.icon
35 }34 }
36 Label {35 Label {
37 id: currentTemp36 id: currentTemp
3837
=== modified file 'components/LocationTab.qml'
--- components/LocationTab.qml 2013-04-20 16:17:57 +0000
+++ components/LocationTab.qml 2013-04-22 13:29:40 +0000
@@ -30,7 +30,8 @@
30 todayDateComponent.renderText()30 todayDateComponent.renderText()
3131
32 // set current Condition32 // set current Condition
33 currentCondition.condition = 801; //currentData.condition.id;33 currentCondition.condition = currentData.condition.id;
34 currentCondition.icon = currentData.condition.icon;
34 currentCondition.currentTemp = currentData.temp;35 currentCondition.currentTemp = currentData.temp;
35 currentCondition.minTemp = currentData.temp_min;36 currentCondition.minTemp = currentData.temp_min;
36 currentCondition.maxTemp = currentData.temp_max;37 currentCondition.maxTemp = currentData.temp_max;
@@ -44,7 +45,8 @@
44 date: formatTimestamp(dailyForecasts[x].timestamp, 'dddd, dd MMMM yyyy'),45 date: formatTimestamp(dailyForecasts[x].timestamp, 'dddd, dd MMMM yyyy'),
45 temp: dailyForecasts[x].temp,46 temp: dailyForecasts[x].temp,
46 tempMin: dailyForecasts[x].night,47 tempMin: dailyForecasts[x].night,
47 cond: 801 // dailyForecasts[x].condition.id;48 cond: dailyForecasts[x].condition.id,
49 condIcon: dailyForecasts[x].condition.icon
48 });50 });
49 }51 }
50 }52 }
@@ -111,7 +113,6 @@
111 CurrentWeather {113 CurrentWeather {
112 id: currentCondition114 id: currentCondition
113 anchors.top: todayDateComponent.bottom115 anchors.top: todayDateComponent.bottom
114 condition: 801
115 }116 }
116 /*ChartComponent{117 /*ChartComponent{
117 id: chartComponent118 id: chartComponent
@@ -138,6 +139,7 @@
138 temperature: temp139 temperature: temp
139 temperatureMin: tempMin140 temperatureMin: tempMin
140 condition: cond141 condition: cond
142 icon: condIcon
141 }143 }
142 }144 }
143 }145 }
144146
=== modified file 'components/WeatherApi.js'
--- components/WeatherApi.js 2013-04-20 16:17:57 +0000
+++ components/WeatherApi.js 2013-04-22 13:29:40 +0000
@@ -79,7 +79,7 @@
79 morn: f.morn,79 morn: f.morn,
80 pressure: f.pressure,80 pressure: f.pressure,
81 humidity: f.humidity,81 humidity: f.humidity,
82 condition: f.weather,82 condition: f.weather[0],
83 wind_speed: f.speed,83 wind_speed: f.speed,
84 wind_deg: f.deg84 wind_deg: f.deg
85 });85 });
8686
=== added file 'components/WeatherConditionIconComponent.qml'
--- components/WeatherConditionIconComponent.qml 1970-01-01 00:00:00 +0000
+++ components/WeatherConditionIconComponent.qml 2013-04-22 13:29:40 +0000
@@ -0,0 +1,835 @@
1import QtQuick 2.0
2import QtGraphicalEffects 1.0
3import Ubuntu.Components 0.1
4
5Rectangle {
6 id: weatherCondition
7 color: "transparent"
8 state: ""
9
10 property string condition: ""
11 property bool __sun: false
12 property bool __moon: false
13 property bool __fewClouds: true
14 property bool __scattered: false
15 property bool __broken: false
16 property bool __rain: false
17 property bool __storm: false
18 property bool __snow: false
19 property bool __fog: false
20
21 onConditionChanged: weatherCondition.state = condition
22
23 Image {
24 id: sun
25 width: weatherCondition.width
26 height: weatherCondition.height
27 anchors.horizontalCenter: weatherCondition.horizontalCenter
28 anchors.top: weatherCondition.top
29 opacity: 0
30 source: "../resources/images/sun.png"
31 fillMode: Image.PreserveAspectFit
32 }
33 Image {
34 id: moon
35 width: weatherCondition.width
36 height: weatherCondition.height
37 anchors.horizontalCenter: weatherCondition.horizontalCenter
38 anchors.top: weatherCondition.top
39 opacity: 0
40 source: "../resources/images/moon.png"
41 fillMode: Image.PreserveAspectFit
42 }
43 Image {
44 id: snowflake1
45 width: weatherCondition.width/6
46 height: weatherCondition.height/6
47 anchors {
48 left: weatherCondition.left
49 leftMargin: units.gu(0)
50 top: weatherCondition.top
51 topMargin:weatherCondition.height/1.5
52 }
53 source: "../resources/images/snow.png"
54 fillMode: Image.PreserveAspectFit
55 opacity: 0
56 RotationAnimation { id: snowflake1_anim; running: false; targets: snowflake1; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
57 }
58 Image {
59 id: snowflake2
60 width: weatherCondition.width/6
61 height: weatherCondition.height/6
62 anchors {
63 left: weatherCondition.left
64 leftMargin: weatherCondition.width/2.5
65 top: weatherCondition.top
66 topMargin:weatherCondition.height/1.5
67 }
68 source: "../resources/images/snow.png"
69 fillMode: Image.PreserveAspectFit
70 opacity: 0
71 RotationAnimation { id: snowflake2_anim; running: false; targets: snowflake2; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
72 }
73 Image {
74 id: snowflake3
75 width: weatherCondition.width/6
76 height: weatherCondition.height/6
77 anchors {
78 left: weatherCondition.left
79 leftMargin: weatherCondition.width/1.2
80 top: weatherCondition.top
81 topMargin:weatherCondition.height/1.5
82 }
83 source: "../resources/images/snow.png"
84 fillMode: Image.PreserveAspectFit
85 opacity: 0
86 RotationAnimation { id: snowflake3_anim; running: false; targets: snowflake3; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
87 }
88 Image {
89 id: cloud1
90 width: weatherCondition.width
91 height: weatherCondition.height
92 opacity: 0
93 anchors {
94 left: weatherCondition.left
95 leftMargin: weatherCondition.width/3.6
96 top: weatherCondition.top
97 topMargin: weatherCondition.height/7.5
98 }
99
100 source: "../resources/images/cloud.png"
101 fillMode: Image.PreserveAspectFit
102 }
103 InnerShadow {
104 id: cloud1Glow
105 anchors.fill: cloud1
106 radius: weatherCondition.height/10
107 samples: 24
108 horizontalOffset: 0
109 verticalOffset: weatherCondition.height/-10
110 color: "#FFFFFFFF"
111 source: cloud1
112 opacity: 0
113 }
114 Image {
115 id: rain1
116 width: weatherCondition.width
117 height: weatherCondition.height
118 opacity: 0
119 anchors {
120 left: cloud1.left
121 top: cloud1.top
122 topMargin: weatherCondition.height/10
123 }
124
125 source: "../resources/images/rain.png"
126 fillMode: Image.PreserveAspectFit
127 }
128 Image {
129 id: lightning
130 width: weatherCondition.width
131 height: weatherCondition.height
132 opacity: 0
133 anchors {
134 left: weatherCondition.left
135 top: weatherCondition.top
136 topMargin: weatherCondition.height/7.5
137 }
138
139 source: "../resources/images/lightning.png"
140 fillMode: Image.PreserveAspectFit
141 }
142 ColorOverlay {
143 id: lightningfx
144 anchors.fill: lightning
145 source: lightning
146 color: "#FFFFFFFF"
147 opacity: 0
148 }
149 Glow {
150 id: lightningGlow
151 anchors.fill: lightning
152 radius: weatherCondition.width/3.6
153 samples: 24
154 color: "yellow"
155 source: lightning
156 opacity: 0
157 }
158 Image {
159 id: cloud2
160 width: weatherCondition.width/1.2
161 height: weatherCondition.height/1.2
162 opacity: 0
163 anchors {
164 left: weatherCondition.left
165 leftMargin: weatherCondition.width/3.6
166 top: weatherCondition.top
167 topMargin: weatherCondition.height/10
168 }
169 source: "../resources/images/cloud_darker.png"
170 fillMode: Image.PreserveAspectFit
171 }
172 Image {
173 id: cloud_dark1
174 width: weatherCondition.width/1.2
175 height: weatherCondition.height/1.2
176 opacity: 0
177 anchors {
178 left: weatherCondition.left
179 leftMargin: weatherCondition.width/3.6
180 top: weatherCondition.top
181 topMargin: weatherCondition.height/10
182 }
183 source: "../resources/images/cloud_dark.png"
184 fillMode: Image.PreserveAspectFit
185 }
186 InnerShadow {
187 id: cloud_dark1Glow
188 anchors.fill: cloud_dark1
189 radius: weatherCondition.height/10
190 samples: 24
191 horizontalOffset: 0
192 verticalOffset: weatherCondition.height/-10
193 color: "#FFFFFFFF"
194 source: cloud_dark1
195 opacity: 0
196 }
197 Image {
198 id: rain2
199 width: weatherCondition.width/1.2
200 height: weatherCondition.height/1.2
201 opacity: 0
202 anchors {
203 left: weatherCondition.left
204 leftMargin: weatherCondition.height/-15
205 top: weatherCondition.top
206 topMargin: weatherCondition.height/4.5
207 }
208
209 source: "../resources/images/rain.png"
210 fillMode: Image.PreserveAspectFit
211 }
212 Image {
213 id: fog
214 width: weatherCondition.width
215 height: weatherCondition.width
216 anchors {
217 left:weatherCondition.left
218 top: weatherCondition.top
219 }
220 source: "../resources/images/fog.png"
221 fillMode: Image.PreserveAspectFit
222 opacity: 0
223 }
224 FastBlur {
225 id: fogBlur1
226 anchors.fill: fog
227 source: fog
228 radius: 24
229 opacity: 0
230 }
231 Image {
232 id: fog2
233 width: weatherCondition.width/1.5
234 height: weatherCondition.height/1.5
235 anchors {
236 left:weatherCondition.left
237 leftMargin: weatherCondition.width/2
238 top: weatherCondition.top
239 topMargin: weatherCondition.height/7.5
240 }
241 source: "../resources/images/fog.png"
242 fillMode: Image.PreserveAspectFit
243 opacity: 0
244 }
245 FastBlur {
246 id: fogBlur2
247 anchors.fill: fog2
248 source: fog2
249 radius: 18
250 opacity: 0
251 }
252
253 // CONDITION ANIMATIONS
254 RotationAnimation {
255 id: anim_01
256 running: false
257 targets: sun
258 properties: "rotation"
259 from: 0
260 to: 360
261 loops: Animation.Infinite
262 duration: 60000
263 }
264 ParallelAnimation{
265 id: anim_02
266 running: false
267 SequentialAnimation {
268 loops: Animation.Infinite
269 ParallelAnimation{
270 SequentialAnimation {
271 NumberAnimation { targets: cloud1; properties: "opacity"; from: 0; to: 1; duration: 1000 }
272 PauseAnimation {duration: 13000}
273 NumberAnimation { targets: cloud1; properties: "opacity"; from: 1; to: 0; duration: 1000 }
274 }
275 NumberAnimation {target: cloud1; property: "anchors.leftMargin"; from: weatherCondition.width/3.6; to: weatherCondition.width/-3.6; duration: 15000 }
276 ScriptAction {script: cloud1.anchors.topMargin = weatherCondition.height/7.5;}
277 }
278 PauseAnimation {duration: 15000}
279 }
280 SequentialAnimation {
281 loops: Animation.Infinite
282 PauseAnimation {duration: 17000}
283 ParallelAnimation{
284 SequentialAnimation {
285 NumberAnimation { targets: cloud2; properties: "opacity"; from: 0; to: 1; duration: 1000 }
286 PauseAnimation {duration: 8000}
287 NumberAnimation { targets: cloud2; properties: "opacity"; from: 1; to: 0; duration: 1000 }
288 }
289 NumberAnimation { target: cloud2; property: "anchors.leftMargin"; from: weatherCondition.width/3.6; to: weatherCondition.height/-7.5; duration: 10000}
290 ScriptAction {script: cloud2.anchors.topMargin = weatherCondition.height/10;}
291 }
292 }
293 }
294 ParallelAnimation {
295 id: anim_11
296 running: false
297 loops: Animation.Infinite
298
299 SequentialAnimation{
300 PauseAnimation { duration: 2000 }
301 NumberAnimation {targets: cloud1Glow; properties: "opacity"; from: 0; to: 1; duration: 10}
302 NumberAnimation {targets: cloud1Glow; properties: "opacity"; from: 1; to: 0; duration: 1000}
303 }
304 SequentialAnimation{
305 PauseAnimation { duration: 3000 }
306 NumberAnimation {targets: cloud_dark1Glow; properties: "opacity"; from: 0; to: 1; duration: 10}
307 NumberAnimation {targets: cloud_dark1Glow; properties: "opacity"; from: 1; to: 0; duration: 1000}
308 }
309 SequentialAnimation{
310 PauseAnimation { duration: 2000 }
311 ParallelAnimation{
312 NumberAnimation {targets: lightning; properties: "opacity"; from: 0; to: 1; duration: 10}
313 NumberAnimation {targets: lightningfx; properties: "opacity"; from: 0; to: 1; duration: 10}
314 NumberAnimation {targets: lightningGlow; properties: "opacity"; from: 0; to: 1; duration: 10}
315 }
316 ParallelAnimation {
317 NumberAnimation {targets: lightningGlow; properties: "opacity"; from: 1; to: 0; duration: 1000}
318 NumberAnimation {targets: lightningfx; properties: "opacity"; from: 1; to: 0; duration: 1000}
319 NumberAnimation {targets: lightning; properties: "opacity"; to: 0; duration: 2000}
320 }
321 }
322 }
323 ParallelAnimation {
324 id: anim_13
325 running: false
326 SequentialAnimation {
327 loops: Animation.Infinite
328
329 PauseAnimation { duration: 1000 }
330 ParallelAnimation{
331 NumberAnimation {target: snowflake1; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}
332 NumberAnimation {target: snowflake1; properties: "anchors.leftMargin"; from:weatherCondition.width/6; to:weatherCondition.height/15; duration: 4000}
333 NumberAnimation {target: snowflake1; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}
334 }
335 }
336 SequentialAnimation {
337 loops: Animation.Infinite
338
339 PauseAnimation { duration: 3000 }
340 ParallelAnimation {
341 NumberAnimation {target: snowflake2; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}
342 NumberAnimation {target: snowflake2; properties: "anchors.leftMargin"; from:weatherCondition.width/2; to:weatherCondition.width/2.5; duration: 4000}
343 NumberAnimation {target: snowflake2; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}
344 }
345 }
346 SequentialAnimation {
347 loops: Animation.Infinite
348
349 PauseAnimation { duration: 2000 }
350 ParallelAnimation {
351 NumberAnimation {target: snowflake3; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}
352 NumberAnimation {target: snowflake3; properties: "anchors.leftMargin"; from:weatherCondition.width/1.2; to:weatherCondition.width/1.4; duration: 4000}
353 NumberAnimation {target: snowflake3; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}
354 }
355 }
356 }
357 ParallelAnimation{
358 id: anim_50
359 running: false
360 SequentialAnimation {
361 loops: Animation.Infinite
362 ParallelAnimation{
363 SequentialAnimation {
364 NumberAnimation { targets: fogBlur1; properties: "opacity"; from: 0; to: 1; duration: 1000 }
365 PauseAnimation {duration: 13000}
366 NumberAnimation { targets: fogBlur1; properties: "opacity"; from: 1; to: 0; duration: 1000 }
367 }
368 NumberAnimation {target: fogBlur1; property: "anchors.leftMargin"; from: weatherCondition.width/-3.6; to: weatherCondition.width/3.6; duration: 15000 }
369 }
370 PauseAnimation {duration: 2000}
371 }
372 SequentialAnimation {
373 loops: Animation.Infinite
374 PauseAnimation {duration: 3000}
375 ParallelAnimation{
376 SequentialAnimation {
377 NumberAnimation { targets: fogBlur2; properties: "opacity"; from: 0; to: 0.8; duration: 1000 }
378 PauseAnimation {duration: 8000}
379 NumberAnimation { targets: fogBlur2; properties: "opacity"; from: 0.8; to: 0; duration: 1000 }
380 }
381 NumberAnimation { target: fogBlur2; property: "anchors.leftMargin"; from: weatherCondition.width/3.6; to: weatherCondition.height/-7.5; duration: 10000}
382 }
383 }
384 }
385
386 // CONDITION TRANSITION ANIMATIONS
387 ParallelAnimation {
388 id: anim_sunIn
389 NumberAnimation { targets: sun; properties: "opacity"; to: 1; duration: 1000 }
390 ScriptAction {script:{sun.anchors.horizontalCenterOffset=0;sun.anchors.topMargin=0;__sun = true;anim_01.start();}}
391 }
392 ParallelAnimation {
393 id: anim_moonIn
394 NumberAnimation { targets: moon; properties: "opacity"; to: 1; duration: 1000 }
395 ScriptAction {script:{moon.anchors.horizontalCenterOffset=0;moon.anchors.topMargin=0;__moon = true;}}
396 }
397 ParallelAnimation {
398 id: anim_sunOut
399 NumberAnimation { targets: sun; properties: "opacity"; to: 0; duration: 1000 }
400 ScriptAction {script:{__sun = false;anim_01.stop();}}
401 }
402 ParallelAnimation {
403 id: anim_moonOut
404 NumberAnimation { targets: moon; properties: "opacity"; to: 0; duration: 1000 }
405 ScriptAction {script:__moon = false;}
406 }
407 SequentialAnimation {
408 id: anim_moon2sun
409 ParallelAnimation {
410 NumberAnimation { targets: moon; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }
411 NumberAnimation { easing.type: Easing.InQuad; targets: moon; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }
412 NumberAnimation { targets: moon; properties: "opacity"; from: 1; to: 0; duration: 1000 }
413 }
414 ParallelAnimation {
415 NumberAnimation { targets: sun; properties: "anchors.horizontalCenterOffset"; from: weatherCondition.width/-1.5; to: units.gu(0); duration: 1000}
416 NumberAnimation { easing.type: Easing.OutQuad; targets: sun; properties: "anchors.topMargin"; from: weatherCondition.height/2.5; to: units.gu(0); duration: 1000 }
417 NumberAnimation { targets: sun; properties: "opacity"; from: 0; to: 1; duration: 1000 }
418 }
419 ScriptAction {script:{__sun=true; __moon=false;anim_01.start();}}
420 }
421 SequentialAnimation {
422 id: anim_sun2moon
423 ParallelAnimation {
424 NumberAnimation { targets: sun; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }
425 NumberAnimation { easing.type: Easing.InQuad; targets: sun; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }
426 NumberAnimation { targets: sun; properties: "opacity"; from: 1; to: 0; duration: 1000 }
427 }
428 ParallelAnimation {
429 NumberAnimation { targets: moon; properties: "anchors.horizontalCenterOffset"; from: weatherCondition.width/-1.5; to: units.gu(0); duration: 1000}
430 NumberAnimation { easing.type: Easing.OutQuad; targets: moon; properties: "anchors.topMargin"; from: weatherCondition.height/2.5; to: units.gu(0); duration: 1000 }
431 NumberAnimation { targets: moon; properties: "opacity"; from: 0; to: 1; duration: 1000 }
432 }
433 ScriptAction {script:{__sun=false; __moon=true;anim_01.stop();}}
434 }
435 ParallelAnimation {
436 id: anim_fewCloudsIn
437 SequentialAnimation{
438 PauseAnimation {duration: 1000}
439 ScriptAction {script:{
440 anim_02.restart();
441 }}
442 }
443 ScriptAction {script:__fewClouds = true;}
444 }
445 ParallelAnimation {
446 id: anim_fewCloudsOut
447 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000}
448 NumberAnimation { targets: cloud2; properties: "opacity"; to: 0; duration: 1000}
449 SequentialAnimation{
450 PauseAnimation {duration: 1000}
451 ScriptAction {script:{
452 anim_02.stop();
453 }}
454 }
455 ScriptAction {script:__fewClouds = false;}
456 }
457 ParallelAnimation {
458 id: anim_scatCloudsIn
459 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }
460 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }
461 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }
462 NumberAnimation { targets: cloud2; properties: "anchors.leftMargin"; to: weatherCondition.width/-15; duration: 1000 }
463 NumberAnimation { target: cloud2; property: "anchors.topMargin"; to: weatherCondition.height/7.5; duration: 1000 }
464 NumberAnimation { targets: cloud2; properties: "opacity"; to: 1; duration: 1000 }
465 ScriptAction {script:__scattered = true;}
466 }
467 ParallelAnimation {
468 id: anim_scatCloudsOut
469 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }
470 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }
471 NumberAnimation { targets: cloud2; properties: "anchors.leftMargin"; from: weatherCondition.width/-15; to: weatherCondition.width/-1.5; duration: 1000 }
472 NumberAnimation { targets: cloud2; properties: "opacity"; to: 0; duration: 1000 }
473 ScriptAction {script:__scattered = false;}
474 }
475 ParallelAnimation {
476 id: anim_brokenCloudsIn
477 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }
478 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }
479 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }
480 NumberAnimation { targets: cloud_dark1; properties: "anchors.leftMargin"; to: weatherCondition.height/-15; duration: 1000 }
481 NumberAnimation { target: cloud_dark1; property: "anchors.topMargin"; to: weatherCondition.height/7.5; duration: 1000 }
482 NumberAnimation { targets: cloud_dark1; properties: "opacity"; to: 1; duration: 1000 }
483 ScriptAction {script:__broken = true;}
484 }
485 ParallelAnimation {
486 id: anim_brokenCloudsOut
487 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }
488 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }
489 NumberAnimation { targets: cloud_dark1; properties: "anchors.leftMargin"; from: weatherCondition.height/-15; to: weatherCondition.width/-1.5; duration: 1000 }
490 NumberAnimation { targets: cloud_dark1; properties: "opacity"; to: 0; duration: 1000 }
491 ScriptAction {script:__broken = false;}
492 }
493 ParallelAnimation {
494 id: anim_rainIn
495 NumberAnimation { targets: rain1; properties: "opacity"; to: 1; duration: 1000 }
496 NumberAnimation { targets: rain2; properties: "opacity"; to: 1; duration: 1000 }
497 ScriptAction {script:__rain = true;}
498 }
499 ParallelAnimation {
500 id: anim_rainOut
501 NumberAnimation { targets: rain1; properties: "opacity"; to: 0; duration: 1000 }
502 NumberAnimation { targets: rain2; properties: "opacity"; to: 0; duration: 1000 }
503 ScriptAction {script:__rain = false;}
504 }
505 ParallelAnimation {
506 id: anim_stormIn
507 ScriptAction {script:{__storm = true; anim_11.restart();}}
508 }
509 ParallelAnimation {
510 id: anim_stormOut
511 NumberAnimation { targets: lightning; properties: "opacity"; to: 0; duration: 1 }
512 NumberAnimation { targets: lightningfx; properties: "opacity"; to: 0; duration: 1 }
513 NumberAnimation { targets: lightningGlow; properties: "opacity"; to: 0; duration: 1 }
514 NumberAnimation { targets: cloud1Glow; properties: "opacity"; to: 0; duration: 1 }
515 NumberAnimation { targets: cloud_dark1Glow; properties: "opacity"; to: 0; duration: 1 }
516 ScriptAction {script:{__storm = false; anim_11.stop();}}
517 }
518 ParallelAnimation {
519 id: anim_snowIn
520 ScriptAction {script:{__snow = true; snowflake1_anim.start(); snowflake2_anim.start(); snowflake3_anim.start(); anim_13.restart();}}
521 }
522 ParallelAnimation {
523 id: anim_snowOut
524 NumberAnimation {targets: snowflake1; properties: "opacity"; to:0; duration: 1000}
525 NumberAnimation {targets: snowflake2; properties: "opacity"; to:0; duration: 1000}
526 NumberAnimation {targets: snowflake3; properties: "opacity"; to:0; duration: 1000}
527 ScriptAction {script:{__snow = false; snowflake1_anim.stop(); snowflake2_anim.stop(); snowflake3_anim.stop(); anim_13.stop();}}
528 }
529 SequentialAnimation {
530 id: anim_fogIn
531
532 PauseAnimation {duration: 1000}
533 ScriptAction {script:{anim_50.restart(); script:__fog = true;}}
534 }
535 ParallelAnimation {
536 id: anim_fogOut
537 NumberAnimation { targets: fogBlur1; properties: "opacity"; to: 0; duration: 1000}
538 NumberAnimation { targets: fogBlur2; properties: "opacity"; to: 0; duration: 1000}
539 SequentialAnimation{
540 PauseAnimation {duration: 1000}
541 ScriptAction {script:{
542 anim_50.stop();
543 }}
544 }
545 ScriptAction {script:__fog = false;}
546 }
547
548 states: [
549 State {
550 name: "01d"
551 StateChangeScript {
552 script: {
553 if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start();
554 if(__fewClouds) anim_fewCloudsOut.start();
555 if(__rain) anim_rainOut.start();
556 if(__storm) anim_stormOut.start();
557 if(__snow) anim_snowOut.start();
558 if(__broken) anim_brokenCloudsOut.start();
559 if(__scattered) anim_scatCloudsOut.start();
560 if(__fog) anim_fogOut.start();
561 }
562 }
563 },
564 State {
565 name: "01n"
566 StateChangeScript {
567 script: {
568 if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start();
569 if(__fewClouds) anim_fewCloudsOut.start();
570 if(__rain) anim_rainOut.start();
571 if(__storm) anim_stormOut.start();
572 if(__snow) anim_snowOut.start();
573 if(__broken) anim_brokenCloudsOut.start();
574 if(__scattered) anim_scatCloudsOut.start();
575 if(__fog) anim_fogOut.start();
576 }
577 }
578 },
579 State {
580 name: "02d"
581 StateChangeScript {
582 script: {
583 if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start();
584 if(__scattered) anim_scatCloudsOut.start();
585 if(__rain) anim_rainOut.start();
586 if(__storm) anim_stormOut.start();
587 if(__snow) anim_snowOut.start();
588 if(__broken) anim_brokenCloudsOut.start();
589 if(__fog) anim_fogOut.start();
590 if(!__fewClouds) anim_fewCloudsIn.start();
591 }
592 }
593 },
594 State {
595 name: "02n"
596 StateChangeScript {
597 script: {
598 if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start();
599 if(__scattered) anim_scatCloudsOut.start();
600 if(__rain) anim_rainOut.start();
601 if(__storm) anim_stormOut.start();
602 if(__snow) anim_snowOut.start();
603 if(__broken) anim_brokenCloudsOut.start();
604 if(__fog) anim_fogOut.start();
605 if(!__fewClouds) anim_fewCloudsIn.start();
606 }
607 }
608
609 PropertyChanges {
610 target: lightning
611 opacity: 0
612 }
613 },
614 State {
615 name: "03d"
616 StateChangeScript {
617 script: {
618 if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start();
619 if(__fewClouds) anim_fewCloudsOut.start();
620 if(__rain) anim_rainOut.start();
621 if(__storm) anim_stormOut.start();
622 if(__snow) anim_snowOut.start();
623 if(__broken) anim_brokenCloudsOut.start();
624 if(__fog) anim_fogOut.start();
625 if(!__scattered) anim_scatCloudsIn.start();
626 }
627 }
628 },
629 State {
630 name: "03n"
631 StateChangeScript {
632 script: {
633 if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start();
634 if(__fewClouds) anim_fewCloudsOut.start();
635 if(__rain) anim_rainOut.start();
636 if(__storm) anim_stormOut.start();
637 if(__snow) anim_snowOut.start();
638 if(__broken) anim_brokenCloudsOut.start();
639 if(__fog) anim_fogOut.start();
640 if(!__scattered) anim_scatCloudsIn.start();
641 }
642 }
643 },
644 State {
645 name: "04d"
646 StateChangeScript {
647 script: {
648 if(__moon) anim_moonOut.start();
649 if(__sun) anim_sunOut.start();
650 if(__fewClouds) anim_fewCloudsOut.start();
651 if(__scattered) anim_scatCloudsOut.start();
652 if(__rain) anim_rainOut.start();
653 if(__storm) anim_stormOut.start();
654 if(__snow) anim_snowOut.start();
655 if(__fog) anim_fogOut.start();
656 if(!__broken) anim_brokenCloudsIn.start();
657 }
658 }
659 },
660 State {
661 name: "04n"
662 StateChangeScript {
663 script: {
664 if(__moon) anim_moonOut.start();
665 if(__sun) anim_sunOut.start();
666 if(__fewClouds) anim_fewCloudsOut.start();
667 if(__scattered) anim_scatCloudsOut.start();
668 if(__rain) anim_rainOut.start();
669 if(__storm) anim_stormOut.start();
670 if(__snow) anim_snowOut.start();
671 if(__fog) anim_fogOut.start();
672 if(!__broken) anim_brokenCloudsIn.start();
673 }
674 }
675 },
676 State {
677 name: "09d"
678 StateChangeScript {
679 script: {
680 if(__moon) anim_moonOut.start();
681 if(__sun) anim_sunOut.start();
682 if(__fewClouds) anim_fewCloudsOut.start();
683 if(__scattered) anim_scatCloudsOut.start();
684 if(__storm) anim_stormOut.start();
685 if(__snow) anim_snowOut.start();
686 if(__fog) anim_fogOut.start();
687 if(!__broken) anim_brokenCloudsIn.start();
688 if(!__rain) anim_rainIn.start();
689 }
690 }
691 },
692 State {
693 name: "09n"
694 StateChangeScript {
695 script: {
696 if(__moon) anim_moonOut.start();
697 if(__sun) anim_sunOut.start();
698 if(__fewClouds) anim_fewCloudsOut.start();
699 if(__scattered) anim_scatCloudsOut.start();
700 if(__storm) anim_stormOut.start();
701 if(__snow) anim_snowOut.start();
702 if(__fog) anim_fogOut.start();
703 if(!__broken) anim_brokenCloudsIn.start();
704 if(!__rain) anim_rainIn.start();
705 }
706 }
707 },
708 State {
709 name: "10d"
710 StateChangeScript {
711 script: {
712 if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start();
713 if(__fewClouds) anim_fewCloudsOut.start();
714 if(__broken) anim_brokenCloudsOut.start();
715 if(__storm) anim_stormOut.start();
716 if(__snow) anim_snowOut.start();
717 if(__fog) anim_fogOut.start();
718 if(!__scattered) anim_scatCloudsIn.start();
719 if(!__rain) anim_rainIn.start();
720 }
721 }
722 },
723 State {
724 name: "10n"
725 StateChangeScript {
726 script: {
727 if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start();
728 if(__fewClouds) anim_fewCloudsOut.start();
729 if(__broken) anim_brokenCloudsOut.start();
730 if(__storm) anim_stormOut.start();
731 if(__snow) anim_snowOut.start();
732 if(__fog) anim_fogOut.start();
733 if(!__scattered) anim_scatCloudsIn.start();
734 if(!__rain) anim_rainIn.start();
735 }
736 }
737 },
738 State {
739 name: "11d"
740 StateChangeScript {
741 script: {
742 if(__moon) anim_moonOut.start();
743 if(__sun) anim_sunOut.start();
744 if(__fewClouds) anim_fewCloudsOut.start();
745 if(__scattered) anim_scatCloudsOut.start();
746 if(__rain) anim_rainOut.start();
747 if(__snow) anim_snowOut.start();
748 if(__fog) anim_fogOut.start();
749 if(!__broken) anim_brokenCloudsIn.start();
750 if(!__storm) anim_stormIn.start();
751 }
752 }
753 },
754 State {
755 name: "11n"
756 StateChangeScript {
757 script: {
758 if(__moon) anim_moonOut.start();
759 if(__sun) anim_sunOut.start();
760 if(__fewClouds) anim_fewCloudsOut.start();
761 if(__scattered) anim_scatCloudsOut.start();
762 if(__rain) anim_rainOut.start();
763 if(__snow) anim_snowOut.start();
764 if(__fog) anim_fogOut.start();
765 if(!__broken) anim_brokenCloudsIn.start();
766 if(!__storm) anim_stormIn.start();
767 }
768 }
769 },
770 State {
771 name: "13d"
772 StateChangeScript {
773 script: {
774 if(__moon) anim_moonOut.start();
775 if(__sun) anim_sunOut.start();
776 if(__fewClouds) anim_fewCloudsOut.start();
777 if(__scattered) anim_scatCloudsOut.start();
778 if(__rain) anim_rainOut.start();
779 if(__storm) anim_stormOut.start();
780 if(__fog) anim_fogOut.start();
781 if(!__broken) anim_brokenCloudsIn.start();
782 if(!__snow) anim_snowIn.start();
783 }
784 }
785 },
786 State {
787 name: "13n"
788 StateChangeScript {
789 script: {
790 if(__moon) anim_moonOut.start();
791 if(__sun) anim_sunOut.start();
792 if(__fewClouds) anim_fewCloudsOut.start();
793 if(__scattered) anim_scatCloudsOut.start();
794 if(__rain) anim_rainOut.start();
795 if(__storm) anim_stormOut.start();
796 if(__fog) anim_fogOut.start();
797 if(!__broken) anim_brokenCloudsIn.start();
798 if(!__snow) anim_snowIn.start();
799 }
800 }
801 },
802 State {
803 name: "50d"
804 StateChangeScript {
805 script: {
806 if(__moon) anim_moonOut.start();
807 if(__sun) anim_sunOut.start();
808 if(__fewClouds) anim_fewCloudsOut.start();
809 if(__scattered) anim_scatCloudsOut.start();
810 if(__rain) anim_rainOut.start();
811 if(__storm) anim_stormOut.start();
812 if(__broken) anim_brokenCloudsOut.start();
813 if(__snow) anim_snowOut.start();
814 if(!__fog) anim_fogIn.start();
815 }
816 }
817 },
818 State {
819 name: "50n"
820 StateChangeScript {
821 script: {
822 if(__moon) anim_moonOut.start();
823 if(__sun) anim_sunOut.start();
824 if(__fewClouds) anim_fewCloudsOut.start();
825 if(__scattered) anim_scatCloudsOut.start();
826 if(__rain) anim_rainOut.start();
827 if(__storm) anim_stormOut.start();
828 if(__broken) anim_brokenCloudsOut.start();
829 if(__snow) anim_snowOut.start();
830 if(!__fog) anim_fogIn.start();
831 }
832 }
833 }
834 ]
835}
0836
=== added file 'resources/images/cloud.png'
1Binary files resources/images/cloud.png 1970-01-01 00:00:00 +0000 and resources/images/cloud.png 2013-04-22 13:29:40 +0000 differ837Binary files resources/images/cloud.png 1970-01-01 00:00:00 +0000 and resources/images/cloud.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/cloud_dark.png'
2Binary files resources/images/cloud_dark.png 1970-01-01 00:00:00 +0000 and resources/images/cloud_dark.png 2013-04-22 13:29:40 +0000 differ838Binary files resources/images/cloud_dark.png 1970-01-01 00:00:00 +0000 and resources/images/cloud_dark.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/cloud_darker.png'
3Binary files resources/images/cloud_darker.png 1970-01-01 00:00:00 +0000 and resources/images/cloud_darker.png 2013-04-22 13:29:40 +0000 differ839Binary files resources/images/cloud_darker.png 1970-01-01 00:00:00 +0000 and resources/images/cloud_darker.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/fog.png'
4Binary files resources/images/fog.png 1970-01-01 00:00:00 +0000 and resources/images/fog.png 2013-04-22 13:29:40 +0000 differ840Binary files resources/images/fog.png 1970-01-01 00:00:00 +0000 and resources/images/fog.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/lightning.png'
5Binary files resources/images/lightning.png 1970-01-01 00:00:00 +0000 and resources/images/lightning.png 2013-04-22 13:29:40 +0000 differ841Binary files resources/images/lightning.png 1970-01-01 00:00:00 +0000 and resources/images/lightning.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/moon.png'
6Binary files resources/images/moon.png 1970-01-01 00:00:00 +0000 and resources/images/moon.png 2013-04-22 13:29:40 +0000 differ842Binary files resources/images/moon.png 1970-01-01 00:00:00 +0000 and resources/images/moon.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/rain.png'
7Binary files resources/images/rain.png 1970-01-01 00:00:00 +0000 and resources/images/rain.png 2013-04-22 13:29:40 +0000 differ843Binary files resources/images/rain.png 1970-01-01 00:00:00 +0000 and resources/images/rain.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/snow.png'
8Binary files resources/images/snow.png 1970-01-01 00:00:00 +0000 and resources/images/snow.png 2013-04-22 13:29:40 +0000 differ844Binary files resources/images/snow.png 1970-01-01 00:00:00 +0000 and resources/images/snow.png 2013-04-22 13:29:40 +0000 differ
=== added file 'resources/images/sun.png'
9Binary files resources/images/sun.png 1970-01-01 00:00:00 +0000 and resources/images/sun.png 2013-04-22 13:29:40 +0000 differ845Binary files resources/images/sun.png 1970-01-01 00:00:00 +0000 and resources/images/sun.png 2013-04-22 13:29:40 +0000 differ

Subscribers

People subscribed via source and target branches