Merge lp:~josephjamesmills/ubuntu-weather-app/MockUp into lp:ubuntu-weather-app/obsolete.trunk
- MockUp
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | David Planella |
Proposed branch: | lp:~josephjamesmills/ubuntu-weather-app/MockUp |
Merge into: | lp:ubuntu-weather-app/obsolete.trunk |
Diff against target: |
4556 lines (+3974/-233) 37 files modified
ATTRIBUTION (+7/-0) Home.qml (+1111/-0) Main.qml (+18/-0) README (+0/-1) StartHere.qml (+158/-0) common/Tabs.qml (+23/-0) common/Templets.qml (+88/-0) common/Utils.js (+155/-0) common/dbUtils.js (+243/-0) debian/changelog (+0/-5) debian/compat (+0/-1) debian/control (+0/-18) debian/copyright (+0/-45) debian/rules (+0/-29) debian/source/format (+0/-1) debian/ubuntu-weather-app.install (+0/-3) examples/Browsers/youtube/BrowserHeader.qml (+150/-0) examples/Browsers/youtube/BrowserScrollbars.qml (+66/-0) examples/Browsers/youtube/ButtonBackground.qml (+49/-0) examples/Browsers/youtube/FlicableWebView.qml (+194/-0) examples/Browsers/youtube/Youtube.qml (+74/-0) examples/GetLatLongDelegate.qml (+54/-0) examples/GetLatLongModel.qml (+40/-0) examples/NOAADelegate.qml (+6/-0) examples/NOAAModel.qml (+6/-0) examples/ProgressDialog.qml (+55/-0) examples/SearchBar.qml (+60/-0) examples/SearchBox.qml (+77/-0) examples/TWC.qml (+24/-0) examples/WeatherDelegate.qml (+1091/-0) examples/WeatherModel.qml (+21/-0) po/po.pro (+0/-48) ubuntu-weather-app (+0/-2) ubuntu-weather-app.desktop (+0/-8) weather.qml (+0/-71) weather.qmlproject (+1/-1) weather.qmlproject.user (+203/-0) |
To merge this branch: | bzr merge lp:~josephjamesmills/ubuntu-weather-app/MockUp |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Planella | Disapprove | ||
Review via email: mp+149113@code.launchpad.net |
Commit message
Description of the change
Added frame work for weather added apis added pages for Home and for searching added sql database and javascript functions to call add truncate ect
Joseph Mills (josephjamesmills) wrote : | # |
Sure tell you designers to listen to me. tell them to send the artwork to me I asked maybe they would listen to you.
as far as the designers guide take what I have and do that work There are also many things that I wanted to add but I can not sue to the fact that there are missing things in the SDK
as far as comments and what not I have fixed all that. maybe if you can also tell the designers that they should use qmlginp-exporter so I dont have to do THERE JOB please. As far as I am concerened I am done with this until I get the repect that is needed to make this happen IE designers talking to me. Until then I can not even do anything.
David Planella (dpm) wrote : | # |
This branch is by now pretty old and trunk has diverged significantly. Marking it as Rejected as part of the core apps branch cleanup.
Unmerged revisions
- 5. By Joseph Mills
-
modified:
StartHere.qml
common/Tabs.qml
examples/GetLatLongDeleg ate.qml
examples/GetLatLongModel .qml
examples/ProgressDialog. qml
examples/WeatherDelegate .qml
examples/WeatherModel. qml
weather.qmlproject. user - 4. By Joseph Mills
-
autopush
- 3. By Joseph Mills
-
made framwork to call api
Preview Diff
1 | === added file 'ATTRIBUTION' |
2 | --- ATTRIBUTION 1970-01-01 00:00:00 +0000 |
3 | +++ ATTRIBUTION 2013-02-18 17:43:29 +0000 |
4 | @@ -0,0 +1,7 @@ |
5 | +Graphical resources and original code adapted from the weather-qml demo |
6 | +available at: |
7 | + |
8 | +git@gitorious.org:qt-labs/mobile-demos.git |
9 | + |
10 | +A big thanks to our buddies from INdT for some good looking artwork and |
11 | +nifty demo material |
12 | |
13 | === added file 'Home.qml' |
14 | --- Home.qml 1970-01-01 00:00:00 +0000 |
15 | +++ Home.qml 2013-02-18 17:43:29 +0000 |
16 | @@ -0,0 +1,1111 @@ |
17 | +import QtQuick 2.0 |
18 | +import QtQuick.XmlListModel 2.0 |
19 | +import QtQuick.Particles 2.0 |
20 | +import Ubuntu.Components 0.1 |
21 | +import QtQuick.LocalStorage 2.0 |
22 | +import "common/dbUtils.js" as DataBase |
23 | +import "common/Utils.js" as Util |
24 | +Item { |
25 | + id: serie |
26 | + width: parent.width |
27 | + height: parent.width |
28 | +// property string name:'' |
29 | +// property string countryName:'' |
30 | +// property string adminName1:'' |
31 | +// // property string south:'' |
32 | +// property string folder: "../artwork" |
33 | +// property string forTWC: cityName.text |
34 | + |
35 | +// function translateX(x) { |
36 | +// return root.width/10.0 + (x/700*root.width); |
37 | +// } |
38 | + |
39 | +// function translateY(y) { |
40 | +// var tmp = y+root.height/5.0; |
41 | +// return tmp > 0 ? -20 : tmp; |
42 | +// } |
43 | +// function loadDetails(countryName,adminName1,name) { |
44 | +// serie.name = name |
45 | +// serie.countryName = countryName |
46 | +// serie.adminName1 = adminName1 |
47 | +// serieModel.load(countryName,adminName1,name) |
48 | +// } |
49 | + |
50 | +// XmlListModel { |
51 | +// id: serieModel |
52 | +// function load(CountryName,AdminName1,Name) { |
53 | +// console.log("Loading Weather For ....... \n "+Name+"\n \n" |
54 | +// + encodeURI("http://www.yr.no/place/" |
55 | +// + CountryName |
56 | +// + "/" |
57 | +// + AdminName1 |
58 | +// + "/" |
59 | +// + Name |
60 | +// + "/forecast.xml")) |
61 | +// source = encodeURI("http://www.yr.no/place/"+CountryName+"/"+AdminName1+"/"+Name+"/forecast.xml") |
62 | +// reload() |
63 | +// } |
64 | +// query: "/weatherdata" |
65 | +// XmlRole { name: "timezone"; query: "location/type/string()"} |
66 | + |
67 | +// // Right Now |
68 | +// XmlRole { name: "timeFrom"; query: "forecast/tabular/time[1]/@from/string()"} |
69 | +// XmlRole { name: "timeTo"; query: "forecast/tabular/time[1]/@to/string()"} |
70 | +// XmlRole { name: "observationTime"; query: "forecast/tabular/time[1]/string()"} |
71 | +// XmlRole { name: "temperature"; query: "forecast/tabular/time[1]/temperature/@value/string()" } |
72 | +// XmlRole { name: "precipitation"; query: "forecast/tabular/time[1]/precipitation/@value/string()" } |
73 | +// XmlRole { name: "clouds"; query: "forecast/tabular/time[1]/symbol/@name/string()" } |
74 | +// XmlRole { name: "windDirection"; query: "forecast/tabular/time[1]/windDirection/@name/string()" } |
75 | +// XmlRole { name: "windSpeed"; query: "forecast/tabular/time[1]/windSpeed/@name/string()" } |
76 | +// XmlRole { name: "windSpeedMPS"; query: "forecast/tabular/time[1]/windSpeed/@mps/string()" } |
77 | +// XmlRole { name: "pressure"; query: "forecast/tabular/time[1]/pressure/@value/string()" } |
78 | +// XmlRole { name: "sunRise"; query: "sun/@rise/string()" } |
79 | +// XmlRole { name: "sunSet"; query: "sun/@set/string()" } |
80 | + |
81 | + |
82 | +// XmlRole { name: "weatherCondition"; query: "forecast/tabular/string()"} |
83 | +// XmlRole { name: "status"; query: "forecast/tabular/string()" } |
84 | + |
85 | + |
86 | + |
87 | + |
88 | +// // XmlRole { name: "lastupdate"; query: "meta/lastupdate/string()" } |
89 | +// // XmlRole { name: "nextupdate"; query: "meta/nextupdate/string()" } |
90 | +// XmlRole { name:"creditTXT"; query: "credit/link/@text/string()"} |
91 | +// XmlRole { name:"creditURL"; query: "credit/link/@url/string()"} |
92 | +// onStatusChanged: { |
93 | +// if (status == XmlListModel.Ready) console.log("Loaded") |
94 | +// if (status == XmlListModel.Loading) console.log("Loading"); |
95 | +// } |
96 | +// } |
97 | + |
98 | + Text { |
99 | + id: cityName |
100 | + color: "white" |
101 | + height:22 |
102 | + font.bold: true |
103 | + font.pixelSize: 28 |
104 | + text: DataBase.homeCity() |
105 | + anchors{ |
106 | + top: parent.top |
107 | + topMargin: 80 |
108 | + } |
109 | + } |
110 | + |
111 | + Rectangle{ |
112 | + id: separator1 |
113 | + color: "#44000000" |
114 | + height: 3 |
115 | + width: parent.width |
116 | + anchors{ |
117 | + top: cityName.bottom |
118 | + topMargin: 10 |
119 | + left: parent.left |
120 | + } |
121 | + } |
122 | + Text { |
123 | + id: today |
124 | + text: Qt.formatDate(new Date(), "MMMM dddd"+","+" d yyyy ") |
125 | + color: "white" |
126 | + font.pixelSize: 22 |
127 | + anchors{ |
128 | + top:separator1.bottom |
129 | + topMargin: 2 |
130 | + } |
131 | + } |
132 | + ListView { |
133 | + model: homeModel |
134 | + width: parent.width |
135 | + height: parent.height |
136 | + delegate: Item{ |
137 | + property string temp: tempatureTxt.text.toString() |
138 | + id: topLayout |
139 | + width: parent.width; |
140 | + height: parent.height |
141 | + |
142 | + Text { |
143 | + id: timeAroo |
144 | + text:Qt.formatDateTime(new Date(), "hh"+":"+"mm") |
145 | + height:22 |
146 | + state: "Milatary" |
147 | + x:state === "Milatary" ? separator1.width - 88 : separator1.width - 115 |
148 | + Behavior on x{NumberAnimation{ |
149 | + duration: 1200; easing.type: Easing.OutBounce} |
150 | + } |
151 | + color: "white" |
152 | + font.bold: true |
153 | + font.pixelSize: 22 |
154 | + anchors{ |
155 | + top: parent.top |
156 | + topMargin: 0 |
157 | + // |
158 | + } |
159 | + } |
160 | + MouseArea{ |
161 | + anchors.fill: timeAroo |
162 | + onClicked: if (timeAroo.text === Qt.formatDateTime(new Date(), "hh"+":"+"mm") ){ |
163 | + timeAroo.text = Qt.formatDateTime(new Date(), "h:mm ap") |
164 | + timeAroo.state = "12-Hour" |
165 | + }else{ |
166 | + timeAroo.text = Qt.formatDateTime(new Date(), "hh"+":"+"mm") |
167 | + timeAroo.state = "Milatary" |
168 | + } |
169 | + } |
170 | + Image { |
171 | + id: fahrenheitImg |
172 | + source: "artwork/"+"fahrenheit.png" |
173 | + width: sourceSize.width / 2 |
174 | + height: sourceSize.height / 2 |
175 | + opacity: tempatureTxt.state === "Celcius" ? 0 : 1 |
176 | + Behavior on opacity {NumberAnimation{duration: 200; easing.type: Easing.InQuad}} |
177 | + y: tempatureTxt.state === "Celcius" ? separator1.height * 2 : separator1.width |
178 | + Behavior on y {NumberAnimation{duration: 1200 ; easing.type: Easing.OutBack}} |
179 | + x: tempatureTxt.width + tempatureTxt.height + 12 |
180 | + } |
181 | + Image { |
182 | + id: celciusImg |
183 | + source:{if(tempatureTxt.state === "Celcius") |
184 | + "artwork/"+"centigrades.png" |
185 | + else |
186 | + "artwork/"+"fahrenheit.png" |
187 | + } |
188 | + height: sourceSize.height / 2 |
189 | + width: sourceSize.width / 2 |
190 | + |
191 | + opacity: tempatureTxt.state === "Celcius" ? 1 : 0 |
192 | + Behavior on opacity {NumberAnimation{duration:200; easing.type: Easing.OutQuad}} |
193 | + x: tempatureTxt.state === "Celcius" ? tempatureTxt.width :tempatureTxt.state === "Fahrenheit"? -separator1.width : tempatureTxt.width |
194 | + Behavior on x{NumberAnimation{duration: 1200; easing.type: Easing.OutBack}} |
195 | + anchors{ |
196 | + top: tempatureTxt.top |
197 | + } |
198 | + |
199 | + } |
200 | + Text { |
201 | + id: tempatureTxt |
202 | + text: temperature |
203 | + color: "white" |
204 | + width: separator1.width / 2 |
205 | + font.pixelSize: 64 |
206 | + font.bold: true |
207 | + state: "Celcius" |
208 | + x: state === "Celcius" ? (separator1.width / 1.22)-width : (separator1.width/1.22)-width |
209 | + y: parent.width / 1.12 |
210 | + }MouseArea{ |
211 | + anchors.fill: tempatureTxt |
212 | + onClicked: { |
213 | + var f = (temperature * 9 / 5 + 32) |
214 | + if (tempatureTxt.state === "Celcius"){ |
215 | + tempatureTxt.text = (temperature * 9 / 5 + 32) |
216 | + tempatureTxt.state = "Fahrenheit" |
217 | + }else{ |
218 | + tempatureTxt.text = temperature |
219 | + tempatureTxt.state = "Celcius" |
220 | + |
221 | + } |
222 | + } |
223 | + } |
224 | + |
225 | + |
226 | + Image { |
227 | + id: hangerSunMoon |
228 | + height: sourceSize.height |
229 | + source: "artwork/na_icon_line.png" |
230 | + y:mainImage.y - mainImage.sourceSize.height |
231 | + anchors{ |
232 | + horizontalCenter: mainImage.horizontalCenter |
233 | + } |
234 | + } |
235 | + |
236 | + //This is only for MOON and Sun & fallback |
237 | + Image { |
238 | + id: mainImage |
239 | + width: sourceSize.width / 1.04 |
240 | + height: sourceSize.height |
241 | + smooth: true |
242 | + state: "Shown" |
243 | + x: parent.width /2 - (width/2) |
244 | + y: if (state === "Shown") |
245 | + parent.width / 4.22 |
246 | + else if (state === "Hidden") |
247 | + -parent.width |
248 | + else |
249 | + parent.width/ 5.44 |
250 | + Behavior on y{NumberAnimation{duration: 1200;easing.type: Easing.OutBounce}} |
251 | + source: { |
252 | + |
253 | + if (Util.nightOrDay(new Date(),"hh") === "night" === true ) |
254 | + "artwork/" + "moon.png" |
255 | + else if (Util.nightOrDay(new Date(),"hh") === "night" !== true && temperature > 5) |
256 | + "artwork/" + "sun.png" |
257 | + else if (Util.nightOrDay(new Date(),"hh") === "night" !== true && temperature < 5) |
258 | + "artwork/" + "cold_sun.png" |
259 | + |
260 | + else if (weatherCondition === "light rain" && Util.nightOrDay(new Date(),"hh") === "night" !== true) |
261 | + "artwork/"+"sun.png" |
262 | + |
263 | + |
264 | + else if (weatherCondition === "mist" && Util.nightOrDay(new Date(),"hh") === "night" !== true) |
265 | + "artwork/"+"cold_sun.png" |
266 | + |
267 | + |
268 | + |
269 | + else |
270 | + "artwork/" +"na_icon.png" |
271 | + } |
272 | + |
273 | + }MouseArea { |
274 | + id:mainImageMouseArea |
275 | + anchors.fill: mainImage |
276 | + onPressAndHold:{ mainImage.state = "Hidden" } |
277 | + onReleased:{mainImage.state = "Shown"} |
278 | + onClicked: { |
279 | +// observationTime.subString(observationTime.lastIndexOf("T")+1)+observationTime.subString(0,observationTime.indexOf(":")+) |
280 | +// sunSet) moon |
281 | +//observationTime.substring(observationTime.lastIndexOf("T")+1)+observationTime.substring(0,observationTime.indexOf(":")) |
282 | + var isUP = timeFrom.substring(timeFrom.lastIndexOf("T")+1) |
283 | + var isDown = sunSet.substring(sunSet.lastIndexOf("T")+1) |
284 | + var isSunUP = sunRise.substring(sunRise.lastIndexOf("T")+1) |
285 | + console.log(isUP.substring(0,isUP.indexOf(":")) +" ? " + isDown.substring(0,isDown.indexOf(":")) |
286 | + + "\n" |
287 | + + isUP.substring(0,isUP.indexOf(":")) +" ? " +isSunUP.substring(0,isSunUP.indexOf(":"))) |
288 | + } |
289 | + } |
290 | + |
291 | + |
292 | + //Start to add the clouds |
293 | + // Ok this is how this works if there condtions call for the cloud then they are shown pelse they are not. |
294 | + //each item has a string and the string is set to match the item that it is attached to. this makes it so |
295 | + //so that each time the moon or sun is pressed and held each one will move up with animations and also on different durations |
296 | + //It is imporant that we keep the states the same as "main Image" aka the sun or moon or cold sun |
297 | + |
298 | + //////////////////////////cloudsImage1 |
299 | + Image { |
300 | + id: cloudsImage1 |
301 | + width: sourceSize.width /2 |
302 | + height: sourceSize.height /2 |
303 | + opacity:{ |
304 | + if (clouds === "Cloudy"||clouds ==="Snow") |
305 | + 1 |
306 | + else |
307 | + 0 |
308 | + } |
309 | + smooth: true |
310 | + state: mainImage.state |
311 | + x: parent.width / 20 |
312 | + y: if (state === "Shown") |
313 | + parent.width / 2 |
314 | + else if (state === "Hidden") |
315 | + -parent.width |
316 | + else |
317 | + parent.width / 2 |
318 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
319 | + source: "artwork/" + "cloud_1.png" |
320 | + } |
321 | + Image { |
322 | + id: hangerCloud1 |
323 | + height: sourceSize.height /2 |
324 | + opacity: cloudsImage1.opacity |
325 | + |
326 | + source: "artwork/"+"cloud_1_line.png" |
327 | + y: cloudsImage1.y - cloudsImage1.sourceSize.height -(cloudsImage1.sourceSize.height / 1.844) |
328 | + x:cloudsImage1.width / 1.844 |
329 | + } |
330 | + // End cloudsImage1 |
331 | + |
332 | + |
333 | + //cloudsImage2 |
334 | + Image { |
335 | + id: cloudsImage2 |
336 | + width: sourceSize.width / 1.88 |
337 | + height: sourceSize.height / 1.88 |
338 | + opacity:{ |
339 | + if (clouds === "Cloudy"||clouds ==="Snow"|| clouds == "Partly cloudy") |
340 | + 1 |
341 | + else |
342 | + 0 |
343 | + } |
344 | + |
345 | + smooth: true |
346 | + state: mainImage.state |
347 | + x: parent.width / 2 |
348 | + y: if (state === "Shown") |
349 | + parent.width / 2 |
350 | + else if (state === "Hidden") |
351 | + -parent.width |
352 | + else |
353 | + parent.width / 2 |
354 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
355 | + source: "artwork/" + "cloud_2.png" |
356 | + } |
357 | + Image { |
358 | + id: hangerCloud2 |
359 | + opacity: cloudsImage2.opacity |
360 | + |
361 | + height: sourceSize.height /2 |
362 | + source: "artwork/"+"cloud_2_line.png" |
363 | + y: cloudsImage2.y - cloudsImage2.sourceSize.height -(cloudsImage2.sourceSize.height / 1.14) |
364 | + x:cloudsImage2.x + cloudsImage2.width / 2.25 |
365 | + } |
366 | + // End cloudsImage2 |
367 | + |
368 | + |
369 | + |
370 | + //cloudsImage3 |
371 | + Image { |
372 | + id: cloudsImage3 |
373 | + width: sourceSize.width /2 |
374 | + height: sourceSize.height /2 |
375 | + opacity:{ |
376 | + if (clouds === "Cloudy"||clouds ==="Snow"||clouds == "Partly cloudy") |
377 | + 1 |
378 | + else |
379 | + 0 |
380 | + } |
381 | + smooth: true |
382 | + state: mainImage.state |
383 | + x: parent.width / 50 |
384 | + y: if (state === "Shown") |
385 | + parent.width / 2.66 |
386 | + else if (state === "Hidden") |
387 | + -parent.width |
388 | + else |
389 | + parent.width / 2.66 |
390 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
391 | + source: "artwork/" + "cloud_3.png" |
392 | + } |
393 | + Image { |
394 | + id: hangerCloud3 |
395 | + opacity: cloudsImage3.opacity |
396 | + height: sourceSize.height /2 |
397 | + source: "artwork/"+"cloud_3_line.png" |
398 | + y: cloudsImage3.y - cloudsImage3.sourceSize.height -(cloudsImage3.sourceSize.height + cloudsImage3.height /2) |
399 | + x:cloudsImage3.x + cloudsImage3.width / 2.25 |
400 | + } |
401 | + // End cloudsImage3 |
402 | + |
403 | + |
404 | +//////////////start rain clouds |
405 | + //cloudsImageRain1 |
406 | + Image { |
407 | + id: cloudsRainImage1 |
408 | + width: sourceSize.width /2 |
409 | + height: sourceSize.height /2 |
410 | + opacity:{ |
411 | + if (clouds === "Rain") |
412 | + 1 |
413 | + else |
414 | + 0 |
415 | + } |
416 | + |
417 | + smooth: true |
418 | + state: mainImage.state |
419 | + x: parent.width / 20 |
420 | + y: if (state === "Shown") |
421 | + parent.width / 2 |
422 | + else if (state === "Hidden") |
423 | + -parent.width |
424 | + else |
425 | + parent.width / 2 |
426 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
427 | + source: "artwork/" + "cloud_rain_1.png" |
428 | + } |
429 | + Image { |
430 | + id: hangerCloudRain1 |
431 | + opacity: cloudsRainImage1.opacity |
432 | + |
433 | + height: sourceSize.height /2 |
434 | + source: "artwork/"+"cloud_rain_1_line.png" |
435 | + y: cloudsRainImage1.y - cloudsRainImage1.sourceSize.height -(cloudsRainImage1.sourceSize.height / 1.844) |
436 | + x:cloudsRainImage1.width / 1.844 |
437 | + } |
438 | + // End cloudsImageRain1 |
439 | + |
440 | + |
441 | + //cloudsImageRain2 |
442 | + Image { |
443 | + id: cloudsImageRain2 |
444 | + width: sourceSize.width / 1.88 |
445 | + height: sourceSize.height / 1.88 |
446 | + smooth: true |
447 | + state: mainImage.state |
448 | + x: parent.width / 2 |
449 | + opacity:{ |
450 | + if (clouds === "Rain") |
451 | + 1 |
452 | + else |
453 | + 0 |
454 | + } |
455 | + |
456 | + y: if (state === "Shown") |
457 | + parent.width / 2 |
458 | + else if (state === "Hidden") |
459 | + -parent.width |
460 | + else |
461 | + parent.width / 2 |
462 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
463 | + source: "artwork/" + "cloud_rain_2.png" |
464 | + } |
465 | + Image { |
466 | + id: hangerCloudRain2 |
467 | + height: sourceSize.height /2 |
468 | + source: "artwork/"+"cloud_rain_2_line.png" |
469 | + opacity: cloudsImageRain2.opacity |
470 | + |
471 | + y: cloudsImageRain2.y - cloudsImageRain2.sourceSize.height -(cloudsImageRain2.sourceSize.height / 1.14) |
472 | + x:cloudsImageRain2.x + cloudsImageRain2.width / 2.25 |
473 | + } |
474 | + // End cloudsImageRain2 |
475 | + |
476 | + |
477 | + |
478 | + //cloudsImageRain3 |
479 | + Image { |
480 | + id: cloudsImageRain3 |
481 | + width: sourceSize.width /2 |
482 | + height: sourceSize.height /2 |
483 | + smooth: true |
484 | + opacity:{ |
485 | + if (clouds === "Rain") |
486 | + 1 |
487 | + else |
488 | + 0 |
489 | + } |
490 | + |
491 | + state: mainImage.state |
492 | + x: parent.width / 50 |
493 | + y: if (state === "Shown") |
494 | + parent.width / 2.66 |
495 | + else if (state === "Hidden") |
496 | + -parent.width |
497 | + else |
498 | + parent.width / 2.66 |
499 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
500 | + source: "artwork/" + "cloud_rain_3.png" |
501 | + } |
502 | + Image { |
503 | + id: hangerCloudRain3 |
504 | + height: sourceSize.height /2 |
505 | + opacity: cloudsImageRain3.opacity |
506 | + |
507 | + source: "artwork/"+"cloud_rain_3_line.png" |
508 | + y: cloudsImageRain3.y - cloudsImageRain3.sourceSize.height -(cloudsImageRain3.sourceSize.height + cloudsImageRain3.height /2) |
509 | + x:cloudsImageRain3.x + cloudsImageRain3.width / 2.25 |
510 | + } |
511 | + // End cloudsImageRain3 |
512 | + |
513 | + |
514 | +////////////////////////start Storm Clouds |
515 | + |
516 | + //cloudsImageStrom1 |
517 | + Image { |
518 | + id: cloudsStormImage1 |
519 | + width: sourceSize.width /2 |
520 | + height: sourceSize.height /2 |
521 | + opacity:{ |
522 | + if (clouds === "Heavy rain") |
523 | + 1 |
524 | + else |
525 | + 0 |
526 | + } |
527 | + smooth: true |
528 | + state: mainImage.state |
529 | + x: parent.width / 20 |
530 | + y: if (state === "Shown") |
531 | + parent.width / 2 |
532 | + else if (state === "Hidden") |
533 | + -parent.width |
534 | + else |
535 | + parent.width / 2 |
536 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
537 | + source: "artwork/" + "cloud_storm_1.png" |
538 | + } |
539 | + Image { |
540 | + id: hangerCloudStorm1 |
541 | + height: sourceSize.height /2 |
542 | + opacity: cloudsImageTStorm1.opacity |
543 | + |
544 | + source: "artwork/"+"cloud_storm_1_line.png" |
545 | + y: cloudsStormImage1.y - cloudsStormImage1.sourceSize.height -(cloudsStormImage1.sourceSize.height / 1.844) |
546 | + x:cloudsStormImage1.width / 1.844 |
547 | + } |
548 | + // End cloudsImageStrom1 |
549 | + |
550 | + |
551 | + //cloudsImageStrom2 |
552 | + Image { |
553 | + id: cloudsImageStrom2 |
554 | + width: sourceSize.width / 1.88 |
555 | + height: sourceSize.height / 1.88 |
556 | + opacity:{ |
557 | + if (clouds === "Heavy rain") |
558 | + 1 |
559 | + else |
560 | + 0 |
561 | + } |
562 | + |
563 | + smooth: true |
564 | + state: mainImage.state |
565 | + x: parent.width / 2 |
566 | + y: if (state === "Shown") |
567 | + parent.width / 2 |
568 | + else if (state === "Hidden") |
569 | + -parent.width |
570 | + else |
571 | + parent.width / 2 |
572 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
573 | + source: "artwork/" + "cloud_storm_2.png" |
574 | + } |
575 | + Image { |
576 | + id: hangerCloudStorm2 |
577 | + height: sourceSize.height /2 |
578 | + source: "artwork/"+"cloud_storm_2_line.png" |
579 | + opacity: cloudsImageStrom2.opacity |
580 | + |
581 | + y: cloudsImageStrom2.y - cloudsImageStrom2.sourceSize.height -(cloudsImageStrom2.sourceSize.height / 1.14) |
582 | + x:cloudsImageStrom2.x + cloudsImageStrom2.width / 2.25 |
583 | + } |
584 | + // End cloudsImageStrom2 |
585 | + |
586 | + |
587 | + |
588 | + //cloudsImageStrom3 |
589 | + Image { |
590 | + id: cloudsImageStrom3 |
591 | + width: sourceSize.width /2 |
592 | + height: sourceSize.height /2 |
593 | + smooth: true |
594 | + opacity:{ |
595 | + if (clouds === "Heavy rain") |
596 | + 1 |
597 | + else |
598 | + 0 |
599 | + } |
600 | + |
601 | + state: mainImage.state |
602 | + x: parent.width / 50 |
603 | + y: if (state === "Shown") |
604 | + parent.width / 2.66 |
605 | + else if (state === "Hidden") |
606 | + -parent.width |
607 | + else |
608 | + parent.width / 2.66 |
609 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
610 | + source: "artwork/" + "cloud_storm_3.png" |
611 | + } |
612 | + Image { |
613 | + id: hangerCloudStorm3 |
614 | + opacity: cloudsImageStrom3.opacity |
615 | + height: sourceSize.height /2 |
616 | + source: "artwork/"+"cloud_storm_3_line.png" |
617 | + y: cloudsImageStrom3.y - cloudsImageStrom3.sourceSize.height -(cloudsImageStrom3.sourceSize.height + cloudsImageStrom3.height /2) |
618 | + x:cloudsImageStrom3.x + cloudsImageStrom3.width / 2.25 |
619 | + } |
620 | + // End cloudsImageStrom3 |
621 | + |
622 | + |
623 | + //cloudsImageTStrom1 |
624 | + Image { |
625 | + id: cloudsImageTStorm1 |
626 | + width: sourceSize.width /2 |
627 | + height: sourceSize.height /2 |
628 | + opacity:{ |
629 | + if(clouds === "Rain showers") |
630 | + 1 |
631 | + else |
632 | + 0 |
633 | + } smooth: true |
634 | + state: mainImage.state |
635 | + x: parent.width / 20 |
636 | + y: if (state === "Shown") |
637 | + parent.width / 2 |
638 | + else if (state === "Hidden") |
639 | + -parent.width |
640 | + else |
641 | + parent.width / 2 |
642 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
643 | + source: "artwork/" + "cloud_tstorm_1.png" |
644 | + } |
645 | + Image { |
646 | + id: hangerCloudTStorm1 |
647 | + height: sourceSize.height /2 |
648 | + source: "artwork/"+"cloud_tstorm_1_line.png" |
649 | + opacity: cloudsImageTStorm1.opacity |
650 | + y: cloudsImageTStorm1.y - cloudsImageTStorm1.sourceSize.height -(cloudsImageTStorm1.sourceSize.height / 1.844) |
651 | + x:cloudsImageTStorm1.width / 1.844 |
652 | + } |
653 | + // End cloudsImageTStorm1 |
654 | + |
655 | + |
656 | + //cloudsImageTStorm2 |
657 | + Image { |
658 | + id: cloudsImageTStorm2 |
659 | + width: sourceSize.width / 1.88 |
660 | + height: sourceSize.height / 1.88 |
661 | + smooth: true |
662 | + opacity:{ |
663 | + if(clouds === "Rain showers") |
664 | + 1 |
665 | + else |
666 | + 0 |
667 | + } |
668 | + state: mainImage.state |
669 | + x: parent.width / 2 |
670 | + y: if (state === "Shown") |
671 | + parent.width / 2 |
672 | + else if (state === "Hidden") |
673 | + -parent.width |
674 | + else |
675 | + parent.width / 2 |
676 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
677 | + source: "artwork/" + "cloud_tstorm_2.png" |
678 | + } |
679 | + Image { |
680 | + id: hangerCloudTStorm2 |
681 | + height: sourceSize.height /2 |
682 | + opacity: cloudsImageTStorm2.opacity |
683 | + source: "artwork/"+"cloud_tstorm_2_line.png" |
684 | + y: cloudsImageTStorm2.y - cloudsImageTStorm2.sourceSize.height -(cloudsImageTStorm2.sourceSize.height / 1.14) |
685 | + x:cloudsImageTStorm2.x + cloudsImageTStorm2.width / 2.25 |
686 | + } |
687 | + // End cloudsImageTStorm2 |
688 | + |
689 | + |
690 | + |
691 | + //cloudsImageTStorm3 |
692 | + Image { |
693 | + id: cloudsImageTStorm3 |
694 | + width: sourceSize.width /2 |
695 | + height: sourceSize.height /2 |
696 | + opacity:{ |
697 | + if(clouds === "Rain showers") |
698 | + 1 |
699 | + else |
700 | + 0 |
701 | + } |
702 | + smooth: true |
703 | + state: mainImage.state |
704 | + x: parent.width / 50 |
705 | + y: if (state === "Shown") |
706 | + parent.width / 2.66 |
707 | + else if (state === "Hidden") |
708 | + -parent.width |
709 | + else |
710 | + parent.width / 2.66 |
711 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
712 | + source: "artwork/" + "cloud_storm_3.png" |
713 | + } |
714 | + Image { |
715 | + id: hangerCloudTStorm3 |
716 | + opacity: cloudsImageTStorm3.opacity |
717 | + height: sourceSize.height /2 |
718 | + source: "artwork/"+"cloud_storm_3_line.png" |
719 | + y: cloudsImageTStorm3.y - cloudsImageTStorm3.sourceSize.height -(cloudsImageTStorm3.sourceSize.height + cloudsImageTStorm3.height /2) |
720 | + x:cloudsImageTStorm3.x + cloudsImageTStorm3.width / 2.25 |
721 | + } |
722 | + // End cloudsImageTStorm3 |
723 | + |
724 | + |
725 | + |
726 | + |
727 | + |
728 | + |
729 | +//////////////// Particals and ShaderEffects for snow and rain |
730 | + |
731 | + //Snow |
732 | + ImageParticle { |
733 | + id:snowImagePartical |
734 | + opacity: { |
735 | + if (clouds === "Snow" && mainImage.state === "Shown" ) |
736 | + 1 |
737 | + else |
738 | + 0 |
739 | + } |
740 | + Behavior on opacity{NumberAnimation{duration:400}} |
741 | + width: parent.width |
742 | + height: parent.width |
743 | + x: parent.width / 20 |
744 | + y: parent.width / 1.58 |
745 | + system: snowSystem |
746 | + source: "artwork/"+"snow_flake_01.png" |
747 | + color: "#FFFAFA" |
748 | + clip: true |
749 | + alpha: 0.8 |
750 | + } |
751 | + ParticleSystem { |
752 | + id: snowSystem |
753 | +// opacity: rainImagePartical.opacity |
754 | + } |
755 | + Emitter { |
756 | + system: snowSystem |
757 | + width: parent.width |
758 | + height: parent.width |
759 | + emitRate: 22 |
760 | + lifeSpan: 9000 |
761 | + size: parent.width / 30 |
762 | + sizeVariation:parent.width / 9 |
763 | + velocity: AngleDirection { |
764 | + angleVariation: 90; |
765 | + magnitude: 9 |
766 | + } |
767 | + maximumEmitted: 100 |
768 | + startTime: 4000 |
769 | + } |
770 | + |
771 | + //////////////////////////Rain |
772 | + ImageParticle { |
773 | + id:rainImagePartical |
774 | + opacity: { |
775 | + if (clouds === "Rain" && mainImage.state === "Shown" |
776 | + || clouds === "Rain showers" && mainImage.state === "Shown" |
777 | + || clouds === "Heavy rain" && mainImage.state === "Shown") |
778 | + 1 |
779 | + else |
780 | + 0 |
781 | + } |
782 | + Behavior on opacity{NumberAnimation{duration:400}} |
783 | + width: parent.width |
784 | + height: parent.width / 12 |
785 | + x: parent.width / 20 |
786 | + y: parent.width / 1.58 |
787 | + system: rainSystem |
788 | + source: "artwork/"+"rain_01.png" |
789 | + color: "grey" |
790 | + clip: false |
791 | + alpha: 0.8 |
792 | + } |
793 | + ParticleSystem { |
794 | + id: rainSystem |
795 | + } |
796 | + Emitter { |
797 | + system: rainSystem |
798 | + width: parent.width |
799 | + y:parent.width / 1.5 |
800 | + height: parent.width / 4 |
801 | + emitRate:{ |
802 | + if(clouds === "Rain") |
803 | + 120 |
804 | + else if (clouds === "Rain showers") |
805 | + 140 |
806 | + else if (clouds === "Heavy rain") |
807 | + 170 |
808 | + else |
809 | + 120 |
810 | + } |
811 | + lifeSpan: 900 |
812 | + size: tab.width |
813 | + sizeVariation:tab.width |
814 | + velocity: AngleDirection { |
815 | + angleVariation: 90; |
816 | + magnitude: 9 |
817 | + } |
818 | + maximumEmitted: 100 |
819 | + startTime: 4000 |
820 | + } |
821 | + |
822 | + |
823 | + |
824 | + |
825 | + |
826 | + |
827 | + |
828 | + |
829 | + |
830 | +// ImageParticle {anchors.fill: parent ;system: particles1 ;source: "art/" ;color: "gray" ;clip: true; alpha: 0.8} |
831 | +// ImageParticle {anchors.fill: parent ;system: particles2 ;source: "" ;color: "gray" ;clip: true; alpha: 1} |
832 | +// ImageParticle {anchors.fill: parent ;system: particles3 ;source: "ar" ;color: "gray" ;clip: true; alpha: 0.8} |
833 | +// ImageParticle {anchors.fill: parent ;system: particles4 ;source: "a" ;color: "gray" ;clip: true; alpha: 0.8} |
834 | +// ImageParticle {anchors.fill: parent ;system: particles5 ;source: "a" ;color:"gray"; clip: true; alpha: .5} |
835 | +// ImageParticle {anchors.fill: parent ;system: particles6 ;source: "art" ;color:"gray"; clip: true; alpha: .5*/} |
836 | + |
837 | + |
838 | + |
839 | + |
840 | + |
841 | + |
842 | +// ParticleSystem { id: particles1 }Emitter {system: particles1; anchors.fill: parent ;emitRate: 1;lifeSpan: 8000 ;size: 24 ;sizeVariation: 50 ;velocity: AngleDirection { angleVariation: 180; magnitude: 10} maximumEmitted: 10 ;startTime: 2000} |
843 | +// ParticleSystem { id: particles2 }Emitter {system: particles2; anchors.fill: parent ;emitRate: 3;lifeSpan: 10000 ;size: 24 ;sizeVariation: 50 ;velocity: AngleDirection { angleVariation: 180; magnitude: 12 } maximumEmitted: 9 ;startTime: 5000} |
844 | +// ParticleSystem { id: particles3 }Emitter {system: particles3; anchors.fill: parent ;emitRate: 15;lifeSpan: 9000 ;size: 24 ;sizeVariation: 50 ;velocity: AngleDirection { angleVariation: 180; magnitude: 7 } maximumEmitted: 20 ;startTime: 5000} |
845 | +// ParticleSystem { id: particles4 }Emitter {system: particles4; anchors.fill: parent ;emitRate: 2;lifeSpan: 9000 ;size: 24 ;sizeVariation: 25 ;velocity: AngleDirection { angleVariation: 180; magnitude: 7 } maximumEmitted: 20 ;startTime: 5000} |
846 | +// ParticleSystem { id: particles5 }Emitter {system: particles5; anchors.fill: parent ;emitRate: 2;lifeSpan: 4000 ;size: 32 ;sizeVariation: 40 ;velocity: AngleDirection { angleVariation: 180; magnitude: 12 } maximumEmitted: 17 ;startTime: 5000} |
847 | +// ParticleSystem { id: particles6 }Emitter {system: particles6; anchors.fill: parent ;emitRate: 2;lifeSpan: 4000 ;size: 32 ;sizeVariation: 40 ;velocity: AngleDirection { angleVariation: 180; magnitude: 12 } maximumEmitted: 4 ;startTime: 5000} |
848 | + |
849 | + |
850 | + |
851 | + |
852 | + |
853 | + |
854 | + |
855 | + |
856 | + |
857 | + |
858 | + |
859 | + |
860 | + |
861 | + |
862 | + |
863 | + |
864 | + |
865 | + |
866 | + |
867 | + |
868 | + |
869 | + |
870 | + |
871 | + |
872 | + |
873 | + |
874 | + |
875 | + |
876 | + |
877 | + |
878 | + |
879 | + |
880 | + |
881 | + |
882 | + |
883 | + |
884 | + |
885 | + |
886 | + |
887 | + |
888 | + |
889 | + |
890 | +//////////////////////////////////// This is Details |
891 | + Rectangle{ |
892 | + id:detailsSlider |
893 | + width: separator1.width |
894 | + height: separator1.width * 1.5 |
895 | + color: "#88000000" |
896 | + state: "Hidden" |
897 | + x: state === "Hidden" ? -separator1.width * 2 : 0 |
898 | + Behavior on x{NumberAnimation{duration: 1200; easing.type: Easing.OutBack}} |
899 | + Text { |
900 | + id: conditions |
901 | + height: 20 |
902 | + width: separator1.width |
903 | + text:"<b>Conditions: </b>"+clouds |
904 | + color: "white" |
905 | + font.pixelSize: 12 |
906 | + anchors{ |
907 | + top:detailsSlider.top |
908 | + topMargin:40 //detailsSlider.width / 2 |
909 | + left: parent.left |
910 | + leftMargin: parent.width / 20 |
911 | + |
912 | + } |
913 | + } |
914 | + Text { |
915 | + id: humidityText |
916 | + height: 20 |
917 | + width: separator1.width |
918 | + text:"<b>Wind Speed: </b>" + windSpeed + " \("+ windSpeedMPS +" Miles Per Second \) " |
919 | + color: "white" |
920 | + font.pixelSize: 12 |
921 | + anchors{ |
922 | + top:conditions.bottom |
923 | + topMargin: 1 |
924 | + left: parent.left |
925 | + leftMargin: parent.width / 20 |
926 | + |
927 | + } |
928 | + }Text { |
929 | + id: dewPointTxt |
930 | + height: 20 |
931 | + width: separator1.width |
932 | + text:"<b>Wind Direction: </b>" + windDirection |
933 | + color: "white" |
934 | + font.pixelSize: 12 |
935 | + anchors{ |
936 | + top:humidityText.bottom |
937 | + topMargin: 1 |
938 | + left: parent.left |
939 | + leftMargin: parent.width / 20 |
940 | + |
941 | + } |
942 | + } |
943 | + |
944 | + Text { |
945 | + id: presureTxt |
946 | + height: 20 |
947 | + width: separator1.width |
948 | + text:"<b>Pressure: </b>"+pressure |
949 | + color: "white" |
950 | + font.pixelSize: 12 |
951 | + anchors{ |
952 | + top:dewPointTxt.bottom |
953 | + topMargin: 1 |
954 | + left: parent.left |
955 | + leftMargin: parent.width / 20 |
956 | + |
957 | + } |
958 | + } Text { |
959 | + id: timeFromTxt |
960 | + height: 20 |
961 | + width: separator1.width |
962 | + text:"<b>Staring Observation Time: </b>"+timeFrom |
963 | + color: "white" |
964 | + font.pixelSize: 12 |
965 | + anchors{ |
966 | + top:presureTxt.bottom |
967 | + topMargin: 1 |
968 | + left: parent.left |
969 | + leftMargin: parent.width / 20 |
970 | + |
971 | + } |
972 | + } Text { |
973 | + id: timeToTxt |
974 | + height: 20 |
975 | + width: separator1.width |
976 | + text:"<b>Ending Observation Time: </b>"+timeTo |
977 | + color: "white" |
978 | + font.pixelSize: 12 |
979 | + anchors{ |
980 | + top:timeFromTxt.bottom |
981 | + topMargin: 1 |
982 | + left: parent.left |
983 | + leftMargin: parent.width / 20 |
984 | + |
985 | + } |
986 | + } |
987 | + Text { |
988 | + id: sunRiseTxt |
989 | + height: 20 |
990 | + width: separator1.width |
991 | + text:"<b>Sun Rise: </b>"+sunRise |
992 | + color: "white" |
993 | + font.pixelSize: 12 |
994 | + anchors{ |
995 | + top:timeToTxt.bottom |
996 | + topMargin: 1 |
997 | + left: parent.left |
998 | + leftMargin: parent.width / 20 |
999 | + |
1000 | + } |
1001 | + } |
1002 | + Text { |
1003 | + id: sunSetTxt |
1004 | + height: 20 |
1005 | + width: separator1.width |
1006 | + text:"<b>Sun Set: </b>"+sunSet |
1007 | + color: "white" |
1008 | + font.pixelSize: 12 |
1009 | + anchors{ |
1010 | + top:sunRiseTxt.bottom |
1011 | + topMargin: 1 |
1012 | + left: parent.left |
1013 | + leftMargin: parent.width / 20 |
1014 | + |
1015 | + } |
1016 | + } |
1017 | + UbuntuShape{ |
1018 | + id:saveButton |
1019 | + width: separator1.width / 3 |
1020 | + height: separator1.width / 8 |
1021 | + color:"grey" |
1022 | + x: 0 |
1023 | + y: parent.width + (height*1.3) |
1024 | + }Text { |
1025 | + id:detailsSaveButtonTxt |
1026 | + color:"#92FFFFFF" |
1027 | + anchors.centerIn: saveButton |
1028 | + text: "Save as Favorite" |
1029 | + }MouseArea{ |
1030 | + anchors.fill: detailsSaveButtonTxt |
1031 | + onClicked: { |
1032 | + DataBase.createInitHomeTable() |
1033 | + DataBase.truncateHome() |
1034 | + DataBase.insertIntoTable() |
1035 | + console.log( |
1036 | + DataBase.homeCountry() + "\n" |
1037 | + + DataBase.homeState() + "\n" |
1038 | + + DataBase.homeCity() +"\n" |
1039 | + + serie.countryName + "\n" |
1040 | + + serie.adminName1 +"\n" |
1041 | + + serie.name |
1042 | + |
1043 | + ) |
1044 | + } |
1045 | + |
1046 | + } |
1047 | + |
1048 | + } |
1049 | + |
1050 | + |
1051 | + |
1052 | + |
1053 | + // Details Button |
1054 | + UbuntuShape{ |
1055 | + id:detailsButton |
1056 | + width: separator1.width / 3 |
1057 | + height: separator1.width / 8 |
1058 | + color:"grey" |
1059 | + x: parent.width - width |
1060 | + y: parent.width + (height*1.3) |
1061 | + }Text { |
1062 | + id:detailsButtonTxt |
1063 | + color:"#92FFFFFF" |
1064 | + anchors.centerIn: detailsButton |
1065 | + text: "details" |
1066 | + }MouseArea{ |
1067 | + anchors.fill: detailsButtonTxt |
1068 | + onClicked: { |
1069 | + if (detailsSlider.state === "Hidden"){ |
1070 | + detailsSlider.x = 0 |
1071 | + detailsSlider.state = "Shown" |
1072 | + } else{ |
1073 | + detailsSlider.x = -separator1.width * 2 |
1074 | + detailsSlider.state = "Hidden" |
1075 | + } |
1076 | + |
1077 | + |
1078 | + } |
1079 | + } |
1080 | + |
1081 | + |
1082 | + }//Item |
1083 | + |
1084 | + |
1085 | + |
1086 | + |
1087 | + |
1088 | + |
1089 | + }//ListView |
1090 | + XmlListModel { |
1091 | + id: homeModel |
1092 | + function loadthis(){ |
1093 | + return "http://www.yr.no/place/"+DataBase.homeCountry()+"/"+DataBase.homeState()+"/"+DataBase.homeCity()+"/forecast.xml" |
1094 | + } |
1095 | + source:loadthis() |
1096 | + query: "/weatherdata" |
1097 | + XmlRole { name: "timezone"; query: "location/type/string()"} |
1098 | + XmlRole { name: "timeFrom"; query: "forecast/tabular/time[1]/@from/string()"} |
1099 | + XmlRole { name: "timeTo"; query: "forecast/tabular/time[1]/@to/string()"} |
1100 | + XmlRole { name: "observationTime"; query: "forecast/tabular/time[1]/string()"} |
1101 | + XmlRole { name: "temperature"; query: "forecast/tabular/time[1]/temperature/@value/string()" } |
1102 | + XmlRole { name: "precipitation"; query: "forecast/tabular/time[1]/precipitation/@value/string()" } |
1103 | + XmlRole { name: "clouds"; query: "forecast/tabular/time[1]/symbol/@name/string()" } |
1104 | + XmlRole { name: "windDirection"; query: "forecast/tabular/time[1]/windDirection/@name/string()" } |
1105 | + XmlRole { name: "windSpeed"; query: "forecast/tabular/time[1]/windSpeed/@name/string()" } |
1106 | + XmlRole { name: "windSpeedMPS"; query: "forecast/tabular/time[1]/windSpeed/@mps/string()" } |
1107 | + XmlRole { name: "pressure"; query: "forecast/tabular/time[1]/pressure/@value/string()" } |
1108 | + XmlRole { name: "sunRise"; query: "sun/@rise/string()" } |
1109 | + XmlRole { name: "sunSet"; query: "sun/@set/string()" } |
1110 | + XmlRole { name: "weatherCondition"; query: "forecast/tabular/string()"} |
1111 | + XmlRole { name: "status"; query: "forecast/tabular/string()" } |
1112 | + XmlRole { name:"creditTXT"; query: "credit/link/@text/string()"} |
1113 | + XmlRole { name:"creditURL"; query: "credit/link/@url/string()"} |
1114 | + onStatusChanged: { |
1115 | + if (status == XmlListModel.Ready){ |
1116 | + console.log("Home Loaded") |
1117 | + } |
1118 | + if (status == XmlListModel.Loading){ |
1119 | + console.log("Home Loading") |
1120 | + } |
1121 | + if (status == XmlListModel.Error) |
1122 | + console.log("Home Error" + errorString()); |
1123 | + } |
1124 | + } |
1125 | + |
1126 | + |
1127 | +}//Item |
1128 | |
1129 | === added file 'Main.qml' |
1130 | --- Main.qml 1970-01-01 00:00:00 +0000 |
1131 | +++ Main.qml 2013-02-18 17:43:29 +0000 |
1132 | @@ -0,0 +1,18 @@ |
1133 | +import QtQuick 2.0 |
1134 | +import Ubuntu.Components 0.1 |
1135 | +import "common" as Con |
1136 | +FocusScope{ |
1137 | + id:shellaroo |
1138 | + width: units.gu(50) |
1139 | + height: units.gu(75) |
1140 | + Rectangle { |
1141 | + objectName: "weather" |
1142 | + width: units.gu(50) |
1143 | + height: units.gu(75) |
1144 | + Con.Tabs { |
1145 | + id: tabs |
1146 | + anchors.fill: parent |
1147 | + |
1148 | + } |
1149 | + } |
1150 | +} |
1151 | |
1152 | === removed file 'README' |
1153 | --- README 2013-02-12 16:18:48 +0000 |
1154 | +++ README 1970-01-01 00:00:00 +0000 |
1155 | @@ -1,1 +0,0 @@ |
1156 | -this is an example README file. |
1157 | |
1158 | === added file 'StartHere.qml' |
1159 | --- StartHere.qml 1970-01-01 00:00:00 +0000 |
1160 | +++ StartHere.qml 2013-02-18 17:43:29 +0000 |
1161 | @@ -0,0 +1,158 @@ |
1162 | +import QtQuick 2.0 |
1163 | +import "common" |
1164 | +import "examples" |
1165 | +import Ubuntu.Components 0.1 |
1166 | +import QtQuick.XmlListModel 2.0 |
1167 | + |
1168 | +Rectangle { |
1169 | + id: page |
1170 | + width: parent.width; height: parent.height |
1171 | + color: "transparent" |
1172 | + property string currentSearchString: "" |
1173 | +// Component.onCompleted: { searchBar.focus = true } |
1174 | + Text { |
1175 | + id: searchHeader |
1176 | + text: qsTr(" Location") |
1177 | + font.family: "Ubuntu" |
1178 | + color: "#92FFFFFF" |
1179 | + font.pixelSize: 22 |
1180 | + opacity: searchBar.anchors.top === parent.bottom ? 0 : 1 |
1181 | + Behavior on opacity{ NumberAnimation{duration: 1200 ;easing.type: Easing.OutQuart}} |
1182 | + anchors{ |
1183 | + top: parent.top |
1184 | + topMargin:searchBar.height + 20 |
1185 | + } |
1186 | + } |
1187 | + SearchBar { |
1188 | + id: searchBar |
1189 | + width: parent.width |
1190 | + height:80 |
1191 | + KeyNavigation.down: listView |
1192 | + anchors{ |
1193 | + top: searchHeader.bottom |
1194 | + |
1195 | + } |
1196 | + onSearch: { |
1197 | + currentSearchString = text; |
1198 | + feedModel.newSearch(text); |
1199 | +// forTWC = text |
1200 | + } |
1201 | + } |
1202 | + GridView { |
1203 | + id: listView |
1204 | + width: parent.width -10 |
1205 | + cacheBuffer: 687 |
1206 | + anchors{ |
1207 | + top: searchBar.bottom; |
1208 | + topMargin: 5 |
1209 | + bottom: parent.bottom |
1210 | + } |
1211 | + contentHeight: 10 |
1212 | + contentWidth: parent.width |
1213 | + cellHeight: parent.height / 4 |
1214 | + cellWidth:parent.width |
1215 | + clip: true |
1216 | +// highlight: feedModel |
1217 | + model: GetLatLongModel { |
1218 | + id: feedModel; |
1219 | + source: '' |
1220 | + onStatusChanged: { |
1221 | + if (status == XmlListModel.Loading){ |
1222 | + progresDialog.text = "Searching '" + currentSearchString + "'"; |
1223 | + page.state = 'Loading'; |
1224 | + } else { |
1225 | + page.state = ''; |
1226 | + } |
1227 | + } |
1228 | + } |
1229 | + delegate: GetLatLongDelegate { |
1230 | + id:feedDelegate |
1231 | + onClicked: { |
1232 | + serieDelegate.loadDetails(countryName,adminName1,name); |
1233 | + page.state = 'Serie'; |
1234 | + } |
1235 | + } |
1236 | + } |
1237 | + UbuntuShape{ |
1238 | + id:backButton |
1239 | + width: parent.width / 3 |
1240 | + height: parent.width / 8 |
1241 | + color: "grey" |
1242 | + visible: searchBar.anchors.top === searchHeader.bottom ? false : true |
1243 | + anchors{ |
1244 | + left:parent.left |
1245 | + bottom: parent.bottom |
1246 | + } |
1247 | + } |
1248 | + MouseArea{ |
1249 | + id:backButtonMouseArea |
1250 | + anchors.fill: backButton |
1251 | + onClicked: { |
1252 | +// searchBar.anchors.top = searchHeader.bottom |
1253 | + page.state = 'base state' |
1254 | + serieDelegate.opacity = 0 |
1255 | + searchBar.anchors.top = searchHeader.bottom |
1256 | + |
1257 | + } |
1258 | + } |
1259 | + Text { |
1260 | + id: backButtonTxt |
1261 | + text: qsTr("back") |
1262 | + font.family: "Ubuntu" |
1263 | + color: "#92FFFFFF" |
1264 | + visible: backButton.visible === true ? true : false |
1265 | + anchors.centerIn: backButtonMouseArea |
1266 | + } |
1267 | + WeatherDelegate{ |
1268 | + id: serieDelegate |
1269 | + opacity: 0.0 |
1270 | + state: opacity === 0.0 |
1271 | + anchors.fill: parent |
1272 | + Behavior on x { NumberAnimation { from:listView.currentItem.x; to: 0; duration: 1000 }} |
1273 | + Behavior on height { NumberAnimation { from: listView.currentItem.height; to: page.height; duration: 1000 }} |
1274 | + } |
1275 | + |
1276 | + ProgressDialog { |
1277 | + id: progresDialog; |
1278 | + visible: false; |
1279 | + anchors { |
1280 | + horizontalCenter: parent.horizontalCenter |
1281 | + verticalCenter: parent.verticalCenter |
1282 | + } |
1283 | + } |
1284 | + |
1285 | + states: [ |
1286 | + State { |
1287 | + name: "Serie" |
1288 | + PropertyChanges { |
1289 | + target: serieDelegate |
1290 | + opacity: 1.0 |
1291 | + } |
1292 | + |
1293 | + PropertyChanges { |
1294 | + target: listView |
1295 | + opacity: 0.0 |
1296 | + } |
1297 | + AnchorChanges { |
1298 | + target: searchBar |
1299 | + anchors.top: parent.bottom |
1300 | + // anchors.top: parent.top |
1301 | + } |
1302 | + }, |
1303 | + State { |
1304 | + name: "Loading" |
1305 | + PropertyChanges { |
1306 | + target: progresDialog |
1307 | + visible: true |
1308 | + } |
1309 | + } |
1310 | + ] |
1311 | + |
1312 | + transitions: [ |
1313 | + Transition { |
1314 | + PropertyAnimation { properties: "opacity"; duration: 300} |
1315 | + AnchorAnimation { duration: 300 } |
1316 | + } |
1317 | + ] |
1318 | +} |
1319 | + |
1320 | |
1321 | === added directory 'artwork' |
1322 | === added file 'artwork/avatar@8.png' |
1323 | Binary files artwork/avatar@8.png 1970-01-01 00:00:00 +0000 and artwork/avatar@8.png 2013-02-18 17:43:29 +0000 differ |
1324 | === added file 'artwork/background_sheen.png' |
1325 | Binary files artwork/background_sheen.png 1970-01-01 00:00:00 +0000 and artwork/background_sheen.png 2013-02-18 17:43:29 +0000 differ |
1326 | === added file 'artwork/centigrades.png' |
1327 | Binary files artwork/centigrades.png 1970-01-01 00:00:00 +0000 and artwork/centigrades.png 2013-02-18 17:43:29 +0000 differ |
1328 | === added file 'artwork/cloud_1.png' |
1329 | Binary files artwork/cloud_1.png 1970-01-01 00:00:00 +0000 and artwork/cloud_1.png 2013-02-18 17:43:29 +0000 differ |
1330 | === added file 'artwork/cloud_1_line.png' |
1331 | Binary files artwork/cloud_1_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_1_line.png 2013-02-18 17:43:29 +0000 differ |
1332 | === added file 'artwork/cloud_2.png' |
1333 | Binary files artwork/cloud_2.png 1970-01-01 00:00:00 +0000 and artwork/cloud_2.png 2013-02-18 17:43:29 +0000 differ |
1334 | === added file 'artwork/cloud_2_line.png' |
1335 | Binary files artwork/cloud_2_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_2_line.png 2013-02-18 17:43:29 +0000 differ |
1336 | === added file 'artwork/cloud_3.png' |
1337 | Binary files artwork/cloud_3.png 1970-01-01 00:00:00 +0000 and artwork/cloud_3.png 2013-02-18 17:43:29 +0000 differ |
1338 | === added file 'artwork/cloud_3_line.png' |
1339 | Binary files artwork/cloud_3_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_3_line.png 2013-02-18 17:43:29 +0000 differ |
1340 | === added file 'artwork/cloud_rain_1.png' |
1341 | Binary files artwork/cloud_rain_1.png 1970-01-01 00:00:00 +0000 and artwork/cloud_rain_1.png 2013-02-18 17:43:29 +0000 differ |
1342 | === added file 'artwork/cloud_rain_1_line.png' |
1343 | Binary files artwork/cloud_rain_1_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_rain_1_line.png 2013-02-18 17:43:29 +0000 differ |
1344 | === added file 'artwork/cloud_rain_2.png' |
1345 | Binary files artwork/cloud_rain_2.png 1970-01-01 00:00:00 +0000 and artwork/cloud_rain_2.png 2013-02-18 17:43:29 +0000 differ |
1346 | === added file 'artwork/cloud_rain_2_line.png' |
1347 | Binary files artwork/cloud_rain_2_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_rain_2_line.png 2013-02-18 17:43:29 +0000 differ |
1348 | === added file 'artwork/cloud_rain_3.png' |
1349 | Binary files artwork/cloud_rain_3.png 1970-01-01 00:00:00 +0000 and artwork/cloud_rain_3.png 2013-02-18 17:43:29 +0000 differ |
1350 | === added file 'artwork/cloud_rain_3_line.png' |
1351 | Binary files artwork/cloud_rain_3_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_rain_3_line.png 2013-02-18 17:43:29 +0000 differ |
1352 | === added file 'artwork/cloud_storm_1.png' |
1353 | Binary files artwork/cloud_storm_1.png 1970-01-01 00:00:00 +0000 and artwork/cloud_storm_1.png 2013-02-18 17:43:29 +0000 differ |
1354 | === added file 'artwork/cloud_storm_1_line.png' |
1355 | Binary files artwork/cloud_storm_1_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_storm_1_line.png 2013-02-18 17:43:29 +0000 differ |
1356 | === added file 'artwork/cloud_storm_2.png' |
1357 | Binary files artwork/cloud_storm_2.png 1970-01-01 00:00:00 +0000 and artwork/cloud_storm_2.png 2013-02-18 17:43:29 +0000 differ |
1358 | === added file 'artwork/cloud_storm_2_line.png' |
1359 | Binary files artwork/cloud_storm_2_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_storm_2_line.png 2013-02-18 17:43:29 +0000 differ |
1360 | === added file 'artwork/cloud_storm_3.png' |
1361 | Binary files artwork/cloud_storm_3.png 1970-01-01 00:00:00 +0000 and artwork/cloud_storm_3.png 2013-02-18 17:43:29 +0000 differ |
1362 | === added file 'artwork/cloud_storm_3_line.png' |
1363 | Binary files artwork/cloud_storm_3_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_storm_3_line.png 2013-02-18 17:43:29 +0000 differ |
1364 | === added file 'artwork/cloud_tstorm_1.png' |
1365 | Binary files artwork/cloud_tstorm_1.png 1970-01-01 00:00:00 +0000 and artwork/cloud_tstorm_1.png 2013-02-18 17:43:29 +0000 differ |
1366 | === added file 'artwork/cloud_tstorm_1_line.png' |
1367 | Binary files artwork/cloud_tstorm_1_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_tstorm_1_line.png 2013-02-18 17:43:29 +0000 differ |
1368 | === added file 'artwork/cloud_tstorm_2.png' |
1369 | Binary files artwork/cloud_tstorm_2.png 1970-01-01 00:00:00 +0000 and artwork/cloud_tstorm_2.png 2013-02-18 17:43:29 +0000 differ |
1370 | === added file 'artwork/cloud_tstorm_2_line.png' |
1371 | Binary files artwork/cloud_tstorm_2_line.png 1970-01-01 00:00:00 +0000 and artwork/cloud_tstorm_2_line.png 2013-02-18 17:43:29 +0000 differ |
1372 | === added file 'artwork/cold_sun.png' |
1373 | Binary files artwork/cold_sun.png 1970-01-01 00:00:00 +0000 and artwork/cold_sun.png 2013-02-18 17:43:29 +0000 differ |
1374 | === added file 'artwork/cold_sun_line.png' |
1375 | Binary files artwork/cold_sun_line.png 1970-01-01 00:00:00 +0000 and artwork/cold_sun_line.png 2013-02-18 17:43:29 +0000 differ |
1376 | === added file 'artwork/division_line.png' |
1377 | Binary files artwork/division_line.png 1970-01-01 00:00:00 +0000 and artwork/division_line.png 2013-02-18 17:43:29 +0000 differ |
1378 | === added file 'artwork/fahrenheit.png' |
1379 | Binary files artwork/fahrenheit.png 1970-01-01 00:00:00 +0000 and artwork/fahrenheit.png 2013-02-18 17:43:29 +0000 differ |
1380 | === added file 'artwork/fog.png' |
1381 | Binary files artwork/fog.png 1970-01-01 00:00:00 +0000 and artwork/fog.png 2013-02-18 17:43:29 +0000 differ |
1382 | === added file 'artwork/haze.png' |
1383 | Binary files artwork/haze.png 1970-01-01 00:00:00 +0000 and artwork/haze.png 2013-02-18 17:43:29 +0000 differ |
1384 | === added file 'artwork/moon.png' |
1385 | Binary files artwork/moon.png 1970-01-01 00:00:00 +0000 and artwork/moon.png 2013-02-18 17:43:29 +0000 differ |
1386 | === added file 'artwork/moon_line.png' |
1387 | Binary files artwork/moon_line.png 1970-01-01 00:00:00 +0000 and artwork/moon_line.png 2013-02-18 17:43:29 +0000 differ |
1388 | === added file 'artwork/na_icon.png' |
1389 | Binary files artwork/na_icon.png 1970-01-01 00:00:00 +0000 and artwork/na_icon.png 2013-02-18 17:43:29 +0000 differ |
1390 | === added file 'artwork/na_icon_line.png' |
1391 | Binary files artwork/na_icon_line.png 1970-01-01 00:00:00 +0000 and artwork/na_icon_line.png 2013-02-18 17:43:29 +0000 differ |
1392 | === added directory 'artwork/pics' |
1393 | === added file 'artwork/pics/clear.png' |
1394 | Binary files artwork/pics/clear.png 1970-01-01 00:00:00 +0000 and artwork/pics/clear.png 2013-02-18 17:43:29 +0000 differ |
1395 | === added file 'artwork/pics/indicator.png' |
1396 | Binary files artwork/pics/indicator.png 1970-01-01 00:00:00 +0000 and artwork/pics/indicator.png 2013-02-18 17:43:29 +0000 differ |
1397 | === added file 'artwork/pics/lineedit-bg-focus.png' |
1398 | Binary files artwork/pics/lineedit-bg-focus.png 1970-01-01 00:00:00 +0000 and artwork/pics/lineedit-bg-focus.png 2013-02-18 17:43:29 +0000 differ |
1399 | === added file 'artwork/pics/lineedit-bg.png' |
1400 | Binary files artwork/pics/lineedit-bg.png 1970-01-01 00:00:00 +0000 and artwork/pics/lineedit-bg.png 2013-02-18 17:43:29 +0000 differ |
1401 | === added file 'artwork/pics/moreDown.png' |
1402 | Binary files artwork/pics/moreDown.png 1970-01-01 00:00:00 +0000 and artwork/pics/moreDown.png 2013-02-18 17:43:29 +0000 differ |
1403 | === added file 'artwork/pics/moreDownW.png' |
1404 | Binary files artwork/pics/moreDownW.png 1970-01-01 00:00:00 +0000 and artwork/pics/moreDownW.png 2013-02-18 17:43:29 +0000 differ |
1405 | === added file 'artwork/pics/moreUp.png' |
1406 | Binary files artwork/pics/moreUp.png 1970-01-01 00:00:00 +0000 and artwork/pics/moreUp.png 2013-02-18 17:43:29 +0000 differ |
1407 | === added file 'artwork/pics/moreUpW.png' |
1408 | Binary files artwork/pics/moreUpW.png 1970-01-01 00:00:00 +0000 and artwork/pics/moreUpW.png 2013-02-18 17:43:29 +0000 differ |
1409 | === added file 'artwork/pics/star_off.gif' |
1410 | Binary files artwork/pics/star_off.gif 1970-01-01 00:00:00 +0000 and artwork/pics/star_off.gif 2013-02-18 17:43:29 +0000 differ |
1411 | === added file 'artwork/pics/star_on.gif' |
1412 | Binary files artwork/pics/star_on.gif 1970-01-01 00:00:00 +0000 and artwork/pics/star_on.gif 2013-02-18 17:43:29 +0000 differ |
1413 | === added file 'artwork/rainDrop.png' |
1414 | Binary files artwork/rainDrop.png 1970-01-01 00:00:00 +0000 and artwork/rainDrop.png 2013-02-18 17:43:29 +0000 differ |
1415 | === added file 'artwork/rain_01.png' |
1416 | Binary files artwork/rain_01.png 1970-01-01 00:00:00 +0000 and artwork/rain_01.png 2013-02-18 17:43:29 +0000 differ |
1417 | === added file 'artwork/rain_02.png' |
1418 | Binary files artwork/rain_02.png 1970-01-01 00:00:00 +0000 and artwork/rain_02.png 2013-02-18 17:43:29 +0000 differ |
1419 | === added file 'artwork/rain_03.png' |
1420 | Binary files artwork/rain_03.png 1970-01-01 00:00:00 +0000 and artwork/rain_03.png 2013-02-18 17:43:29 +0000 differ |
1421 | === added file 'artwork/search_background.png' |
1422 | Binary files artwork/search_background.png 1970-01-01 00:00:00 +0000 and artwork/search_background.png 2013-02-18 17:43:29 +0000 differ |
1423 | === added file 'artwork/search_icon.png' |
1424 | Binary files artwork/search_icon.png 1970-01-01 00:00:00 +0000 and artwork/search_icon.png 2013-02-18 17:43:29 +0000 differ |
1425 | === added file 'artwork/snow_flake.png' |
1426 | Binary files artwork/snow_flake.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake.png 2013-02-18 17:43:29 +0000 differ |
1427 | === added file 'artwork/snow_flake_01.png' |
1428 | Binary files artwork/snow_flake_01.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_01.png 2013-02-18 17:43:29 +0000 differ |
1429 | === added file 'artwork/snow_flake_02.png' |
1430 | Binary files artwork/snow_flake_02.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_02.png 2013-02-18 17:43:29 +0000 differ |
1431 | === added file 'artwork/snow_flake_03.png' |
1432 | Binary files artwork/snow_flake_03.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_03.png 2013-02-18 17:43:29 +0000 differ |
1433 | === added file 'artwork/snow_flake_04.png' |
1434 | Binary files artwork/snow_flake_04.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_04.png 2013-02-18 17:43:29 +0000 differ |
1435 | === added file 'artwork/snow_flake_05.png' |
1436 | Binary files artwork/snow_flake_05.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_05.png 2013-02-18 17:43:29 +0000 differ |
1437 | === added file 'artwork/snow_flake_06.png' |
1438 | Binary files artwork/snow_flake_06.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_06.png 2013-02-18 17:43:29 +0000 differ |
1439 | === added file 'artwork/snow_flake_07.png' |
1440 | Binary files artwork/snow_flake_07.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_07.png 2013-02-18 17:43:29 +0000 differ |
1441 | === added file 'artwork/snow_flake_08.png' |
1442 | Binary files artwork/snow_flake_08.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_08.png 2013-02-18 17:43:29 +0000 differ |
1443 | === added file 'artwork/snow_flake_09.png' |
1444 | Binary files artwork/snow_flake_09.png 1970-01-01 00:00:00 +0000 and artwork/snow_flake_09.png 2013-02-18 17:43:29 +0000 differ |
1445 | === added file 'artwork/star_01.png' |
1446 | Binary files artwork/star_01.png 1970-01-01 00:00:00 +0000 and artwork/star_01.png 2013-02-18 17:43:29 +0000 differ |
1447 | === added file 'artwork/star_02.png' |
1448 | Binary files artwork/star_02.png 1970-01-01 00:00:00 +0000 and artwork/star_02.png 2013-02-18 17:43:29 +0000 differ |
1449 | === added file 'artwork/star_03.png' |
1450 | Binary files artwork/star_03.png 1970-01-01 00:00:00 +0000 and artwork/star_03.png 2013-02-18 17:43:29 +0000 differ |
1451 | === added file 'artwork/storm_01.png' |
1452 | Binary files artwork/storm_01.png 1970-01-01 00:00:00 +0000 and artwork/storm_01.png 2013-02-18 17:43:29 +0000 differ |
1453 | === added file 'artwork/storm_02.png' |
1454 | Binary files artwork/storm_02.png 1970-01-01 00:00:00 +0000 and artwork/storm_02.png 2013-02-18 17:43:29 +0000 differ |
1455 | === added file 'artwork/storm_03.png' |
1456 | Binary files artwork/storm_03.png 1970-01-01 00:00:00 +0000 and artwork/storm_03.png 2013-02-18 17:43:29 +0000 differ |
1457 | === added file 'artwork/storm_04.png' |
1458 | Binary files artwork/storm_04.png 1970-01-01 00:00:00 +0000 and artwork/storm_04.png 2013-02-18 17:43:29 +0000 differ |
1459 | === added file 'artwork/storm_05.png' |
1460 | Binary files artwork/storm_05.png 1970-01-01 00:00:00 +0000 and artwork/storm_05.png 2013-02-18 17:43:29 +0000 differ |
1461 | === added file 'artwork/sun.png' |
1462 | Binary files artwork/sun.png 1970-01-01 00:00:00 +0000 and artwork/sun.png 2013-02-18 17:43:29 +0000 differ |
1463 | === added file 'artwork/sun_line.png' |
1464 | Binary files artwork/sun_line.png 1970-01-01 00:00:00 +0000 and artwork/sun_line.png 2013-02-18 17:43:29 +0000 differ |
1465 | === added file 'artwork/thunder.png' |
1466 | Binary files artwork/thunder.png 1970-01-01 00:00:00 +0000 and artwork/thunder.png 2013-02-18 17:43:29 +0000 differ |
1467 | === removed file 'avatar@8.png' |
1468 | Binary files avatar@8.png 2013-02-12 16:18:48 +0000 and avatar@8.png 1970-01-01 00:00:00 +0000 differ |
1469 | === added directory 'common' |
1470 | === added file 'common/Tabs.qml' |
1471 | --- common/Tabs.qml 1970-01-01 00:00:00 +0000 |
1472 | +++ common/Tabs.qml 2013-02-18 17:43:29 +0000 |
1473 | @@ -0,0 +1,23 @@ |
1474 | +import QtQuick 2.0 |
1475 | +import Ubuntu.Components 0.1 |
1476 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
1477 | +Templets{ |
1478 | + id:tempThis |
1479 | + showHeader: false |
1480 | + Tabs { |
1481 | + ItemStyle.class: "new-tabs" |
1482 | + id: tabs |
1483 | + Tab { |
1484 | + title: i18n.tr("Weather") |
1485 | + page: Qt.resolvedUrl("../Home.qml") |
1486 | + } |
1487 | + Tab { |
1488 | + title: i18n.tr("Search") |
1489 | + page: Qt.resolvedUrl("../StartHere.qml") |
1490 | + } |
1491 | + Tab{ |
1492 | + title: "TWC" |
1493 | + page: Qt.resolvedUrl("../examples/TWC.qml") |
1494 | + } |
1495 | + } |
1496 | +} |
1497 | |
1498 | === added file 'common/Templets.qml' |
1499 | --- common/Templets.qml 1970-01-01 00:00:00 +0000 |
1500 | +++ common/Templets.qml 2013-02-18 17:43:29 +0000 |
1501 | @@ -0,0 +1,88 @@ |
1502 | +/* |
1503 | + * Copyright 2012 Canonical Ltd. |
1504 | + * |
1505 | + * This program is free software; you can redistribute it and/or modify |
1506 | + * it under the terms of the GNU Lesser General Public License as published by |
1507 | + * the Free Software Foundation; version 3. |
1508 | + * |
1509 | + * This program is distributed in the hope that it will be useful, |
1510 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1511 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1512 | + * GNU Lesser General Public License for more details. |
1513 | + * |
1514 | + * You should have received a copy of the GNU Lesser General Public License |
1515 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1516 | + */ |
1517 | + |
1518 | +import QtQuick 2.0 |
1519 | +import Ubuntu.Components 0.1 |
1520 | + |
1521 | +Rectangle { |
1522 | + id: template |
1523 | + |
1524 | + width: units.gu(100) |
1525 | + height: units.gu(75) |
1526 | + |
1527 | + property string title |
1528 | + default property Item content |
1529 | + |
1530 | + property bool showHeader: true |
1531 | + |
1532 | + onContentChanged: { |
1533 | + content.parent = page |
1534 | + content.anchors.top = header.bottom |
1535 | + content.anchors.bottom = page.bottom |
1536 | + content.anchors.left = page.left |
1537 | + content.anchors.right = page.right |
1538 | + } |
1539 | + |
1540 | + color: "#C7C7C7" |
1541 | + |
1542 | + |
1543 | + Item { |
1544 | + id: page |
1545 | + |
1546 | + parent: template |
1547 | + anchors { |
1548 | + fill: parent |
1549 | + margins: template.showHeader ? units.gu(4) : units.gu(2) |
1550 | + } |
1551 | + |
1552 | + Binding { |
1553 | + target: content.anchors |
1554 | + property: "topMargin" |
1555 | + value: page.anchors.margins |
1556 | + } |
1557 | + |
1558 | + Item { |
1559 | + id: header |
1560 | + height: visible ? childrenRect.height : 0 |
1561 | + anchors { |
1562 | + left: parent.left |
1563 | + right: parent.right |
1564 | + } |
1565 | + visible: template.showHeader |
1566 | + |
1567 | + Label { |
1568 | + id: title |
1569 | + ItemStyle.class: "title" |
1570 | + text: template.title |
1571 | + } |
1572 | + |
1573 | + Rectangle { |
1574 | + id: underline |
1575 | + |
1576 | + anchors { |
1577 | + top: title.bottom |
1578 | + topMargin: units.gu(0.5) |
1579 | + left: parent.left |
1580 | + right: parent.right |
1581 | + } |
1582 | + height: units.dp(1) |
1583 | + color: "#38772953" |
1584 | + } |
1585 | + } |
1586 | + } |
1587 | +} |
1588 | + |
1589 | + |
1590 | |
1591 | === added file 'common/Utils.js' |
1592 | --- common/Utils.js 1970-01-01 00:00:00 +0000 |
1593 | +++ common/Utils.js 2013-02-18 17:43:29 +0000 |
1594 | @@ -0,0 +1,155 @@ |
1595 | +.pragma library |
1596 | +function nightOrDay(){ |
1597 | + var now = Qt.formatDateTime(new Date(),"hh") |
1598 | + if (now <= 17 && now >= 05) |
1599 | + return "day" |
1600 | + else |
1601 | + return "night" |
1602 | +} |
1603 | +var observationTime = "" |
1604 | +var dir = "../artwork/" |
1605 | +var homeDir = "artwork/" |
1606 | +var x = "weatherCondition" |
1607 | +var cutMe = observationTime.substring(observationTime.lastIndexOf(":")-5) |
1608 | + |
1609 | +function cut1ObTime(string){ |
1610 | +string.substring(string.lastIndexOf(":")-5) |
1611 | +} |
1612 | + |
1613 | +function fromIso8601(date) { |
1614 | + var timestamp, struct, minutesOffset = 0; |
1615 | + var numericKeys = [ 1, 4, 5, 6, 7, 10, 11 ]; |
1616 | + |
1617 | + // ES5 §15.9.4.2 states that the string should attempt to be parsed as a Date Time String Format string |
1618 | + // before falling back to any implementation-specific date parsing, so that’s what we do, even if native |
1619 | + // implementations could be faster |
1620 | + // 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm |
1621 | + if ((struct = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(date))) { |
1622 | + // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC |
1623 | + for (var i = 0, k; (k = numericKeys[i]); ++i) { |
1624 | + struct[k] = +struct[k] || 0; |
1625 | + } |
1626 | + |
1627 | + // allow undefined days and months |
1628 | + struct[2] = (+struct[2] || 1) - 1; |
1629 | + struct[3] = +struct[3] || 1; |
1630 | + |
1631 | + if (struct[8] !== 'Z' && struct[9] !== undefined) { |
1632 | + minutesOffset = struct[10] * 60 + struct[11]; |
1633 | + |
1634 | + if (struct[9] === '+') { |
1635 | + minutesOffset = 0 - minutesOffset; |
1636 | + } |
1637 | + } |
1638 | + |
1639 | + timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]); |
1640 | + return new Date(timestamp); |
1641 | + } |
1642 | + else return null; |
1643 | +} |
1644 | + |
1645 | + |
1646 | + |
1647 | + |
1648 | + |
1649 | +//Most of this is adopted from QtMediaHub and also from weather.qml |
1650 | +var folder = "../../artwork/" |
1651 | +function fahrenheit2celsius(f) { |
1652 | + return ((f-32)*5/9.0).toFixed(0); |
1653 | +} |
1654 | + |
1655 | +//function mapToImages(weatherCondition) |
1656 | +// if (typeof weatherCondition != "undefined") { |
1657 | +// var map = { |
1658 | +// "light rain" : "rain_1.png", |
1659 | +// "sunny" : "sun.png", |
1660 | +// "mostly_sunny" : "MostlySunny.qml", |
1661 | +// "partly_cloudy" : "PartlyCloudy.qml", |
1662 | +// "mostly_cloudy" : "MostlyCloudy.qml", |
1663 | +// "chance_of_storm" : "Storm.qml", |
1664 | +// "showers" : "Rain.qml", |
1665 | +// "rain" : "Rain.qml", |
1666 | +// "chance_of_snow" : "na_icon.png", |
1667 | +// "cloudy" : "MostlyCloudy.qml", |
1668 | +// "mist" : "Mist.qml", |
1669 | +// "storm" : "Storm.qml", |
1670 | +// "thunderstorm" : "Thunderstorm.qml", |
1671 | +// "chance_of_tstorm" : "Thunderstorm.qml", |
1672 | +// "sleet" : "na_icon.png", |
1673 | +// "snow" : "na_icon.png", |
1674 | +// "icy" : "na_icon.png", |
1675 | +// "dust" : "na_icon.png", |
1676 | +// "fog" : "Fog.qml", |
1677 | +// "smoke" : "UnknownForecast.qml", |
1678 | +// "haze" : "haze.png", |
1679 | +// "flurries" : "na_icon.png" |
1680 | +// } |
1681 | +// var tmp = "UnknownForecast.qml"; |
1682 | +// var slice = name.substring(weatherCondition.lastIndexOf("/")+1,weatherCondition.lastIndexOf(".")); |
1683 | + |
1684 | +// if (map[slice]) |
1685 | +// tmp = map[slice] |
1686 | + |
1687 | +// return "../forecasts/"+tmp; |
1688 | +// } |
1689 | +// return "../forecasts/UnknownForecast.qml"; |
1690 | +// } |
1691 | + |
1692 | + |
1693 | + |
1694 | + |
1695 | +//function mapToFile(weatherCondition) { |
1696 | +// if (typeof weatherCondition != "undefined") { |
1697 | +// var map = { |
1698 | +// "chance_of_rain" : "Rain.qml", |
1699 | +// "sunny" : "Sunny.qml", |
1700 | +// "mostly_sunny" : "MostlySunny.qml", |
1701 | +// "partly_cloudy" : "PartlyCloudy.qml", |
1702 | +// "mostly_cloudy" : "MostlyCloudy.qml", |
1703 | +// "chance_of_storm" : "Storm.qml", |
1704 | +// "showers" : "Rain.qml", |
1705 | +// "rain" : "Rain.qml", |
1706 | +// "chance_of_snow" : "UnknownForecast.qml", |
1707 | +// "cloudy" : "MostlyCloudy.qml", |
1708 | +// "mist" : "Mist.qml", |
1709 | +// "storm" : "Storm.qml", |
1710 | +// "thunderstorm" : "Thunderstorm.qml", |
1711 | +// "chance_of_tstorm" : "Thunderstorm.qml", |
1712 | +// "sleet" : "UnknownForecast.qml", |
1713 | +// "snow" : "UnknownForecast.qml", |
1714 | +// "icy" : "UnknownForecast.qml", |
1715 | +// "dust" : "UnknownForecast.qml", |
1716 | +// "fog" : "Fog.qml", |
1717 | +// "smoke" : "UnknownForecast.qml", |
1718 | +// "haze" : "Haze.qml", |
1719 | +// "flurries" : "UnknownForecast.qml" |
1720 | +// } |
1721 | + |
1722 | +// var tmp = "UnknownForecast.qml"; |
1723 | +// var slice = name.substring(weatherCondition.lastIndexOf("/")+1,weatherCondition.lastIndexOf(".")); |
1724 | + |
1725 | +// if (map[slice]) |
1726 | +// tmp = map[slice] |
1727 | + |
1728 | +// return "../forecasts/"+tmp; |
1729 | +// } |
1730 | +// return "../forecasts/UnknownForecast.qml"; |
1731 | +//} |
1732 | + |
1733 | +//function stripLast5(string) { |
1734 | +// return (string.substr(0, string.length-5)) |
1735 | +//} |
1736 | + |
1737 | +//function loadForecastQml() { |
1738 | +// if (weatherMeasurements.count > 0) { |
1739 | +// forecastLoader.source = "" |
1740 | +// forecastLoader.source = mapToFile(weatherMeasurements.get(0).icon) |
1741 | +// } |
1742 | +//} |
1743 | +//if (typeof info != "undefined" && typeof info.current_date_time != "undefined") { |
1744 | +// var date_time = info.current_date_time; |
1745 | +// var slice = date_time.substring(date_time.indexOf(" ")+1,date_time.indexOf(":")); |
1746 | +// item.isDay = slice > 18 || slice < 6 ? false : true; |
1747 | +//} else { |
1748 | +// item.isDay = true; |
1749 | +//} |
1750 | |
1751 | === added file 'common/dbUtils.js' |
1752 | --- common/dbUtils.js 1970-01-01 00:00:00 +0000 |
1753 | +++ common/dbUtils.js 2013-02-18 17:43:29 +0000 |
1754 | @@ -0,0 +1,243 @@ |
1755 | +//DataBase Stuff IE Adding and remove deleting database Functions |
1756 | +//Table Options For DateBase IE add to table Select from table ect. |
1757 | +var number = 1 |
1758 | +var text = "" |
1759 | +var countryTXT = "" |
1760 | +var locationTXT = "" |
1761 | +var cityTXT = "" |
1762 | +function homeDatabase() { |
1763 | + return LocalStorage.openDatabaseSync("weather_app_home", "1.0", "StorageDatabase", 1000000); |
1764 | +} |
1765 | +function createInitDatabase(){ |
1766 | +var db = homeDatabase(); |
1767 | + db.transaction( |
1768 | + function(tx){ |
1769 | + tx.executeSql('CREATE database IF NOT EXISTS weather_app_home') |
1770 | + } |
1771 | + ) |
1772 | +} |
1773 | +function insertIntoTable() { |
1774 | + var db = homeDatabase(); |
1775 | + db.transaction( |
1776 | + function(tx) { |
1777 | + tx.executeSql('INSERT INTO weather_api_home VALUES(?, ?, ?, ?)', ['1',encodeURI(serie.countryName), encodeURI(serie.adminName1) ,encodeURI(serie.name) ]); |
1778 | + } |
1779 | + ) |
1780 | +} |
1781 | +function createInitHomeTable() { |
1782 | + var db = homeDatabase(); |
1783 | + db.transaction( |
1784 | + function(tx) { |
1785 | + tx.executeSql('CREATE TABLE IF NOT EXISTS weather_api_home(WD_1 INT ,Country TEXT,State TEXT,City TEXT)'); |
1786 | + } |
1787 | + ) |
1788 | +} |
1789 | + |
1790 | +//function truncateWD(){ |
1791 | +// var db = homeDatabase(); |
1792 | +// db.transaction( |
1793 | +// function(tx){ |
1794 | +// tx.executeSql('DELETE WD_1 FROM weather_api_home WHERE WD_1=1') |
1795 | +// } |
1796 | +// ) |
1797 | +//} |
1798 | +function truncateHome(){ |
1799 | + var db = homeDatabase(); |
1800 | + db.transaction( |
1801 | + function(tx){ |
1802 | + tx.executeSql('DELETE FROM weather_api_home WHERE WD_1=1') |
1803 | + } |
1804 | + ) |
1805 | +} |
1806 | +//function truncateState(){ |
1807 | +// var db = homeDatabase(); |
1808 | +// db.transaction( |
1809 | +// function(tx){ |
1810 | +// tx.executeSql('DELETE State FROM weather_api_home WHERE WD_1=1') |
1811 | +// } |
1812 | +// ) |
1813 | +//} |
1814 | +//function truncateCity(){ |
1815 | +// var db = homeDatabase(); |
1816 | +// db.transaction( |
1817 | +// function(tx){ |
1818 | +// tx.executeSql('DELETE City FROM weather_api_home WHERE WD_1=1') |
1819 | +// } |
1820 | +// ) |
1821 | +//} |
1822 | +function homeCountry() { |
1823 | + var db = homeDatabase(); |
1824 | + db.transaction( |
1825 | + function(tx) { |
1826 | + var rs = tx.executeSql('SELECT * FROM weather_api_home'); |
1827 | + var r = "" |
1828 | + for(var i = 0; i < rs.rows.length; i++) { |
1829 | + r += rs.rows.item(i).Country |
1830 | + } |
1831 | + text = r } |
1832 | + ) |
1833 | +return text |
1834 | +} |
1835 | + |
1836 | +function homeState() { |
1837 | + var db = homeDatabase(); |
1838 | + db.transaction( |
1839 | + function(tx) { |
1840 | + var rs = tx.executeSql('SELECT * FROM weather_api_home'); |
1841 | + var r = "" |
1842 | + for(var i = 0; i < rs.rows.length; i++) { |
1843 | + r += rs.rows.item(i).State } |
1844 | + text = r }) |
1845 | + return text |
1846 | +} |
1847 | + |
1848 | + |
1849 | +function homeCity() { |
1850 | + var db = homeDatabase(); |
1851 | + db.transaction( |
1852 | + function(tx) { |
1853 | + var rs = tx.executeSql('SELECT * FROM weather_api_home'); |
1854 | + var r = "" |
1855 | + for(var i = 0; i < rs.rows.length; i++) { |
1856 | + r += rs.rows.item(i).City } |
1857 | + text = r }) |
1858 | + return text |
1859 | +} |
1860 | + |
1861 | + |
1862 | + |
1863 | + |
1864 | + |
1865 | + |
1866 | + |
1867 | + |
1868 | + |
1869 | + |
1870 | + |
1871 | + |
1872 | + |
1873 | + |
1874 | + |
1875 | + |
1876 | + |
1877 | +function showAllWeatherNoINT() { |
1878 | + var db = homeDatabase(); |
1879 | + db.transaction( |
1880 | + function(tx) { |
1881 | + // Show all added greetings |
1882 | + var rs = tx.executeSql('SELECT Country,State,Cite FROM WEATHERAPI'); |
1883 | + var r = "" |
1884 | + for(var i = 0; i < rs.rows.length; i++) { |
1885 | + r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n" |
1886 | + } |
1887 | + text = r |
1888 | + } |
1889 | + ) |
1890 | +} |
1891 | + |
1892 | + |
1893 | + |
1894 | + |
1895 | + |
1896 | + |
1897 | + |
1898 | + |
1899 | + |
1900 | + |
1901 | + |
1902 | + |
1903 | + |
1904 | + |
1905 | + |
1906 | + |
1907 | + |
1908 | + |
1909 | + |
1910 | + |
1911 | + |
1912 | + |
1913 | + |
1914 | + |
1915 | + |
1916 | + |
1917 | + |
1918 | + |
1919 | + |
1920 | + |
1921 | + |
1922 | + |
1923 | + |
1924 | + |
1925 | + |
1926 | + |
1927 | + |
1928 | + |
1929 | + |
1930 | + |
1931 | +/////////////////////////////////// FOR favorite |
1932 | +//function createInitDatabase(){ |
1933 | +//var db = getDatabase(); |
1934 | +// db.transaction( |
1935 | +// function(tx){ |
1936 | +// tx.executeSql('CREATE database IF NOT EXISTS weather_app') |
1937 | +// } |
1938 | +// ) |
1939 | +//} |
1940 | + |
1941 | +//function createInitTable() { |
1942 | +// var db = getDatabase(); |
1943 | +// db.transaction( |
1944 | +// function(tx) { |
1945 | +// tx.executeSql('CREATE TABLE IF NOT EXISTS WEATHERAPI(Country TEXT,State TEXT,City TEXT)'); |
1946 | +// } |
1947 | +// ) |
1948 | +//} |
1949 | + |
1950 | +//function insertIntoTable() { |
1951 | +// var db = getDatabase(); |
1952 | +// db.transaction( |
1953 | +// function(tx) { |
1954 | +// tx.executeSql('INSERT INTO WEATHERAPI VALUES(?, ?, ?)', [countryTXT, locationTXT,cityTXT ]); |
1955 | +// } |
1956 | +// ) |
1957 | +//} |
1958 | + |
1959 | + |
1960 | +//function truncateTable(){ |
1961 | +// var db = getDatabase(); |
1962 | +// db.transaction( |
1963 | +// function(tx){ |
1964 | +// tx.executeSql('DELETE * FROM WEATHERAPI') |
1965 | +// } |
1966 | +// ) |
1967 | +//} |
1968 | + |
1969 | +//function showAllDbTable() { |
1970 | +// var db = getDatabase(); |
1971 | +// db.transaction( |
1972 | +// function(tx) { |
1973 | +// // Show all added greetings |
1974 | +// var rs = tx.executeSql('SELECT * FROM WEATHERAPI'); |
1975 | +// var r = "" |
1976 | +// for(var i = 0; i < rs.rows.length; i++) { |
1977 | +// r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n" |
1978 | +// } |
1979 | +// text = r |
1980 | +// } |
1981 | +// ) |
1982 | +//} |
1983 | + |
1984 | +//function showAllWeatherNoINT() { |
1985 | +// var db = getDatabase(); |
1986 | +// db.transaction( |
1987 | +// function(tx) { |
1988 | +// // Show all added greetings |
1989 | +// var rs = tx.executeSql('SELECT Country,State,Cite FROM WEATHERAPI'); |
1990 | +// var r = "" |
1991 | +// for(var i = 0; i < rs.rows.length; i++) { |
1992 | +// r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n" |
1993 | +// } |
1994 | +// text = r |
1995 | +// } |
1996 | +// ) |
1997 | +//} |
1998 | |
1999 | === removed directory 'debian' |
2000 | === removed file 'debian/changelog' |
2001 | --- debian/changelog 2013-02-12 16:27:32 +0000 |
2002 | +++ debian/changelog 1970-01-01 00:00:00 +0000 |
2003 | @@ -1,5 +0,0 @@ |
2004 | -ubuntu-weather-app (0.1) raring; urgency=low |
2005 | - |
2006 | - * Initial release |
2007 | - |
2008 | - -- Michael Hall <mhall119@ubuntu.com> Mon, 11 Feb 2013 16:04:00 -0500 |
2009 | |
2010 | === removed file 'debian/compat' |
2011 | --- debian/compat 2013-02-12 16:18:48 +0000 |
2012 | +++ debian/compat 1970-01-01 00:00:00 +0000 |
2013 | @@ -1,1 +0,0 @@ |
2014 | -8 |
2015 | |
2016 | === removed file 'debian/control' |
2017 | --- debian/control 2013-02-12 16:27:32 +0000 |
2018 | +++ debian/control 1970-01-01 00:00:00 +0000 |
2019 | @@ -1,18 +0,0 @@ |
2020 | -Source: ubuntu-weather-app |
2021 | -Priority: extra |
2022 | -Maintainer: Ugo Riboni <ugo.riboni@canonical.com> |
2023 | -Build-Depends: debhelper (>= 8.0.0), |
2024 | -Standards-Version: 3.9.3 |
2025 | -Section: misc |
2026 | -Homepage: https://launchpad.net/ubuntu-weather-app |
2027 | - |
2028 | -Package: ubuntu-weather-app |
2029 | -Section: misc |
2030 | -Architecture: any |
2031 | -Depends: ${shlibs:Depends}, ${misc:Depends}, |
2032 | - qmlscene, |
2033 | - qt-components-ubuntu, |
2034 | - qtdeclarative5-qtquick2-plugin |
2035 | -Description: Weather application |
2036 | - Core Weather application |
2037 | - |
2038 | |
2039 | === removed file 'debian/copyright' |
2040 | --- debian/copyright 2013-02-12 16:27:32 +0000 |
2041 | +++ debian/copyright 1970-01-01 00:00:00 +0000 |
2042 | @@ -1,45 +0,0 @@ |
2043 | -Format: http://dep.debian.net/deps/dep5 |
2044 | -Upstream-Name: ubuntu-weather-app |
2045 | -Source: |
2046 | - |
2047 | -Files: * |
2048 | -Copyright: 2013 Canonical Ltd. |
2049 | -License: GPL-3.0 |
2050 | - |
2051 | -Files: debian/* |
2052 | -Copyright: 2013 Canonical Ltd. |
2053 | -License: LGPL-3.0 |
2054 | - |
2055 | -License: GPL-3.0 |
2056 | - This package is free software; you can redistribute it and/or |
2057 | - modify it under the terms of the GNU General Public |
2058 | - License as published by the Free Software Foundation; either |
2059 | - version 3 of the License. |
2060 | - . |
2061 | - This package is distributed in the hope that it will be useful, |
2062 | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
2063 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2064 | - General Public License for more details. |
2065 | - . |
2066 | - You should have received a copy of the GNU General Public License |
2067 | - along with this program. If not, see <http://www.gnu.org/licenses/>. |
2068 | - . |
2069 | - On Debian systems, the complete text of the GNU General |
2070 | - Public License can be found in "/usr/share/common-licenses/GPL-3". |
2071 | - |
2072 | -License: LGPL-3.0 |
2073 | - This package is free software; you can redistribute it and/or |
2074 | - modify it under the terms of the GNU Lesser General Public |
2075 | - License as published by the Free Software Foundation; either |
2076 | - version 3 of the License. |
2077 | - . |
2078 | - This package is distributed in the hope that it will be useful, |
2079 | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
2080 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2081 | - Lesser General Public License for more details. |
2082 | - . |
2083 | - You should have received a copy of the GNU General Public License |
2084 | - along with this program. If not, see <http://www.gnu.org/licenses/>. |
2085 | - . |
2086 | - On Debian systems, the complete text of the GNU Lesser General |
2087 | - Public License can be found in "/usr/share/common-licenses/LGPL-3". |
2088 | |
2089 | === removed file 'debian/docs' |
2090 | === removed file 'debian/rules' |
2091 | --- debian/rules 2013-02-12 16:27:32 +0000 |
2092 | +++ debian/rules 1970-01-01 00:00:00 +0000 |
2093 | @@ -1,29 +0,0 @@ |
2094 | -#!/usr/bin/make -f |
2095 | -# -*- makefile -*- |
2096 | -# Sample debian/rules that uses debhelper. |
2097 | -# This file was originally written by Joey Hess and Craig Small. |
2098 | -# As a special exception, when this file is copied by dh-make into a |
2099 | -# dh-make output file, you may use that output file without restriction. |
2100 | -# This special exception was added by Craig Small in version 0.37 of dh-make. |
2101 | - |
2102 | -# Uncomment this to turn on verbose mode. |
2103 | -#export DH_VERBOSE=1 |
2104 | - |
2105 | -# Work-around for some machines where INSTALL_ROOT is not set properly by |
2106 | -# dh_auto_install |
2107 | -override_dh_auto_install: |
2108 | - dh_auto_install -- INSTALL_ROOT=$(CURDIR)/debian/tmp |
2109 | - |
2110 | -# Workaround a bug in that debhelper package version |
2111 | -override_dh_install: |
2112 | - mkdir -p $(CURDIR)/debian/tmp/usr/share/applications/ |
2113 | - mkdir -p $(CURDIR)/debian/tmp/usr/bin/ |
2114 | - mkdir -p $(CURDIR)/debian/tmp/usr/share/ubuntu-weather-app/ |
2115 | - cp ubuntu-weather-app.desktop $(CURDIR)/debian/tmp/usr/share/applications/ |
2116 | - cp ubuntu-weather-app $(CURDIR)/debian/tmp/usr/bin/ |
2117 | - cp -r *.qml *.png $(CURDIR)/debian/tmp/usr/share/ubuntu-weather-app/ |
2118 | - |
2119 | - dh_install --sourcedir=debian/tmp --fail-missing |
2120 | - |
2121 | -%: |
2122 | - dh $@ |
2123 | |
2124 | === removed directory 'debian/source' |
2125 | === removed file 'debian/source/format' |
2126 | --- debian/source/format 2013-02-12 16:18:48 +0000 |
2127 | +++ debian/source/format 1970-01-01 00:00:00 +0000 |
2128 | @@ -1,1 +0,0 @@ |
2129 | -3.0 (native) |
2130 | |
2131 | === removed file 'debian/ubuntu-weather-app.install' |
2132 | --- debian/ubuntu-weather-app.install 2013-02-12 16:27:32 +0000 |
2133 | +++ debian/ubuntu-weather-app.install 1970-01-01 00:00:00 +0000 |
2134 | @@ -1,3 +0,0 @@ |
2135 | -usr/share/applications |
2136 | -usr/bin |
2137 | -usr/share/ubuntu-weather-app |
2138 | |
2139 | === added directory 'examples' |
2140 | === added directory 'examples/Browsers' |
2141 | === added directory 'examples/Browsers/youtube' |
2142 | === added file 'examples/Browsers/youtube/BrowserHeader.qml' |
2143 | --- examples/Browsers/youtube/BrowserHeader.qml 1970-01-01 00:00:00 +0000 |
2144 | +++ examples/Browsers/youtube/BrowserHeader.qml 2013-02-18 17:43:29 +0000 |
2145 | @@ -0,0 +1,150 @@ |
2146 | +/**************************************************************************** |
2147 | +** |
2148 | +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). |
2149 | +** All rights reserved. |
2150 | +** Contact: Nokia Corporation (qt-info@nokia.com) |
2151 | +** |
2152 | +** This file is part of the QtDeclarative module of the Qt Toolkit. |
2153 | +** |
2154 | +** $QT_BEGIN_LICENSE:LGPL$ |
2155 | +** GNU Lesser General Public License Usage |
2156 | +** This file may be used under the terms of the GNU Lesser General Public |
2157 | +** License version 2.1 as published by the Free Software Foundation and |
2158 | +** appearing in the file LICENSE.LGPL included in the packaging of this |
2159 | +** file. Please review the following information to ensure the GNU Lesser |
2160 | +** General Public License version 2.1 requirements will be met: |
2161 | +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
2162 | +** |
2163 | +** In addition, as a special exception, Nokia gives you certain additional |
2164 | +** rights. These rights are described in the Nokia Qt LGPL Exception |
2165 | +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
2166 | +** |
2167 | +** GNU General Public License Usage |
2168 | +** Alternatively, this file may be used under the terms of the GNU General |
2169 | +** Public License version 3.0 as published by the Free Software Foundation |
2170 | +** and appearing in the file LICENSE.GPL included in the packaging of this |
2171 | +** file. Please review the following information to ensure the GNU General |
2172 | +** Public License version 3.0 requirements will be met: |
2173 | +** http://www.gnu.org/copyleft/gpl.html. |
2174 | +** |
2175 | +** Other Usage |
2176 | +** Alternatively, this file may be used in accordance with the terms and |
2177 | +** conditions contained in a signed written agreement between you and Nokia. |
2178 | +** |
2179 | +** |
2180 | +** |
2181 | +** |
2182 | +** |
2183 | +** $QT_END_LICENSE$ |
2184 | +** |
2185 | +****************************************************************************/ |
2186 | + |
2187 | +import QtQuick 2.0 |
2188 | +//import "../../common" |
2189 | +Image { |
2190 | + id: header |
2191 | + |
2192 | + property alias editUrl: urlInput.url |
2193 | + property bool urlChanged: false |
2194 | + |
2195 | + source: "../../common/artwork/scrollbar.png"; fillMode: Image.TileHorizontally |
2196 | + |
2197 | + x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width |
2198 | + ? -webView.contentX+webView.contentWidth-webView.width : 0 |
2199 | + y: { |
2200 | + if (webView.progress < 1.0) |
2201 | + return 0; |
2202 | + else { |
2203 | + webView.contentY < 0 ? -webView.contentY : webView.contentY > height ? -height : -webView.contentY |
2204 | + } |
2205 | + } |
2206 | +// Column { |
2207 | +// width: parent.width |
2208 | + |
2209 | +// Item { |
2210 | +// width: parent.width; height: 20 |
2211 | +// Text { |
2212 | +// anchors.centerIn: parent |
2213 | +// text: webView.title; font.pixelSize: 14; font.bold: true |
2214 | +// color: "white"; styleColor: "black"; style: Text.Sunken |
2215 | +// } |
2216 | +// } |
2217 | + |
2218 | +// Item { |
2219 | +// width: parent.width; height: 40 |
2220 | + |
2221 | +// Button { |
2222 | +// id: backButton |
2223 | +// action: webView.back; image: "pics/go-previous-view.png" |
2224 | +// anchors { left: parent.left; bottom: parent.bottom } |
2225 | +// } |
2226 | + |
2227 | +// Button { |
2228 | +// id: nextButton |
2229 | +// anchors.left: backButton.right |
2230 | +// action: webView.forward; image: "pics/go-next-view.png" |
2231 | +// } |
2232 | + |
2233 | +// UrlInput { |
2234 | +// id: urlInput |
2235 | +// anchors { left: nextButton.right; right: reloadButton.left } |
2236 | +// image: "pics/display.png" |
2237 | +// onUrlEntered: { |
2238 | +// webBrowser.urlString = url |
2239 | +// webBrowser.focus = true |
2240 | +// header.urlChanged = false |
2241 | +// } |
2242 | +// onUrlChanged: header.urlChanged = true |
2243 | +// } |
2244 | + |
2245 | +// Button { |
2246 | +// id: reloadButton |
2247 | +// anchors { right: quitButton.left; rightMargin: 10 } |
2248 | +// action: webView.reload; image: "pics/view-refresh.png" |
2249 | +// visible: webView.progress == 1.0 && !header.urlChanged |
2250 | +// } |
2251 | +// Text { |
2252 | +// id: quitButton |
2253 | +// color: "white" |
2254 | +// style: Text.Sunken |
2255 | +// anchors.right: parent.right |
2256 | +// anchors.top: parent.top |
2257 | +// anchors.bottom: parent.bottom |
2258 | +// verticalAlignment: Text.AlignVCenter |
2259 | +// horizontalAlignment: Text.AlignHCenter |
2260 | +// font.pixelSize: 18 |
2261 | +// width: 60 |
2262 | +// text: "Quit" |
2263 | +// MouseArea { |
2264 | +// anchors.fill: parent |
2265 | +// onClicked: Qt.quit() |
2266 | +// } |
2267 | +// Rectangle { |
2268 | +// width: 1 |
2269 | +// y: 5 |
2270 | +// height: parent.height-10 |
2271 | +// anchors.right: parent.left |
2272 | +// color: "darkgray" |
2273 | +// } |
2274 | +// } |
2275 | + |
2276 | +// Button { |
2277 | +// id: stopButton |
2278 | +// anchors { right: quitButton.left; rightMargin: 10 } |
2279 | +// action: webView.stop; image: "pics/edit-delete.png" |
2280 | +// visible: webView.progress < 1.0 && !header.urlChanged |
2281 | +// } |
2282 | + |
2283 | +// Button { |
2284 | +// id: goButton |
2285 | +// anchors { right: parent.right; rightMargin: 4 } |
2286 | +// onClicked: { |
2287 | +// webBrowser.urlString = urlInput.url |
2288 | +// webBrowser.focus = true |
2289 | +// header.urlChanged = false |
2290 | +// } |
2291 | +// image: "pics/go-jump-locationbar.png"; visible: header.urlChanged |
2292 | + } |
2293 | + |
2294 | + |
2295 | + |
2296 | |
2297 | === added file 'examples/Browsers/youtube/BrowserScrollbars.qml' |
2298 | --- examples/Browsers/youtube/BrowserScrollbars.qml 1970-01-01 00:00:00 +0000 |
2299 | +++ examples/Browsers/youtube/BrowserScrollbars.qml 2013-02-18 17:43:29 +0000 |
2300 | @@ -0,0 +1,66 @@ |
2301 | +import QtQuick 2.0 |
2302 | + |
2303 | +Item { |
2304 | + id: container |
2305 | + |
2306 | + property variant scrollArea |
2307 | + property variant orientation: Qt.Vertical |
2308 | + |
2309 | + opacity: 0 |
2310 | + |
2311 | + function position() |
2312 | + { |
2313 | + var ny = 0; |
2314 | + if (container.orientation == Qt.Vertical) |
2315 | + ny = scrollArea.visibleArea.yPosition * container.height; |
2316 | + else |
2317 | + ny = scrollArea.visibleArea.xPosition * container.width; |
2318 | + if (ny > 2) return ny; else return 2; |
2319 | + } |
2320 | + |
2321 | + function size() |
2322 | + { |
2323 | + var nh, ny; |
2324 | + |
2325 | + if (container.orientation == Qt.Vertical) |
2326 | + nh = scrollArea.visibleArea.heightRatio * container.height; |
2327 | + else |
2328 | + nh = scrollArea.visibleArea.widthRatio * container.width; |
2329 | + |
2330 | + if (container.orientation == Qt.Vertical) |
2331 | + ny = scrollArea.visibleArea.yPosition * container.height; |
2332 | + else |
2333 | + ny = scrollArea.visibleArea.xPosition * container.width; |
2334 | + |
2335 | + if (ny > 3) { |
2336 | + var t; |
2337 | + if (container.orientation == Qt.Vertical) |
2338 | + t = Math.ceil(container.height - 3 - ny); |
2339 | + else |
2340 | + t = Math.ceil(container.width - 3 - ny); |
2341 | + if (nh > t) return t; else return nh; |
2342 | + } else return nh + ny; |
2343 | + } |
2344 | + |
2345 | + Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.5 } |
2346 | + |
2347 | + BorderImage { |
2348 | + source: "../common/artwork/scrollbar.png" |
2349 | + border { left: 1; right: 1; top: 1; bottom: 1 } |
2350 | + x: container.orientation == Qt.Vertical ? 2 : position() |
2351 | + width: container.orientation == Qt.Vertical ? container.width - 4 : size() |
2352 | + y: container.orientation == Qt.Vertical ? position() : 2 |
2353 | + height: container.orientation == Qt.Vertical ? size() : container.height - 4 |
2354 | + } |
2355 | + |
2356 | + states: State { |
2357 | + name: "visible" |
2358 | + when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally |
2359 | + PropertyChanges { target: container; opacity: 1.0 } |
2360 | + } |
2361 | + |
2362 | + transitions: Transition { |
2363 | + from: "visible"; to: "" |
2364 | + NumberAnimation { properties: "opacity"; duration: 600 } |
2365 | + } |
2366 | +} |
2367 | |
2368 | === added file 'examples/Browsers/youtube/ButtonBackground.qml' |
2369 | --- examples/Browsers/youtube/ButtonBackground.qml 1970-01-01 00:00:00 +0000 |
2370 | +++ examples/Browsers/youtube/ButtonBackground.qml 2013-02-18 17:43:29 +0000 |
2371 | @@ -0,0 +1,49 @@ |
2372 | +/* |
2373 | + * This file is part of unity-2d |
2374 | + * |
2375 | + * Copyright 2010-2011 Canonical Ltd. |
2376 | + * |
2377 | + * This program is free software; you can redistribute it and/or modify |
2378 | + * it under the terms of the GNU General Public License as published by |
2379 | + * the Free Software Foundation; version 3. |
2380 | + * |
2381 | + * This program is distributed in the hope that it will be useful, |
2382 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2383 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2384 | + * GNU General Public License for more details. |
2385 | + * |
2386 | + * You should have received a copy of the GNU General Public License |
2387 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2388 | + */ |
2389 | + |
2390 | +import QtQuick 2.0 |
2391 | + |
2392 | +Item { |
2393 | + id: background |
2394 | + |
2395 | + property string state |
2396 | + |
2397 | + opacity: ( state == "selected" || state == "pressed" |
2398 | + || state == "hovered" ) ? 1.0 : 0.0 |
2399 | + Behavior on opacity {NumberAnimation {duration: 100}} |
2400 | + |
2401 | + Rectangle { |
2402 | + |
2403 | + /* FIXME: */ |
2404 | + anchors.fill: parent |
2405 | + anchors.bottomMargin: 1 |
2406 | + anchors.rightMargin: 1 |
2407 | + |
2408 | + color: background.state == "pressed" ? "#ffffffff" : "#00000000" |
2409 | + border.color: "#cccccc" |
2410 | + border.width: 1 |
2411 | + radius: 3 |
2412 | + |
2413 | + Image { |
2414 | + fillMode: Image.Tile |
2415 | + anchors.fill: parent |
2416 | + source: "artwork/button_background.png" |
2417 | + smooth: false |
2418 | + } |
2419 | + } |
2420 | +} |
2421 | |
2422 | === added file 'examples/Browsers/youtube/FlicableWebView.qml' |
2423 | --- examples/Browsers/youtube/FlicableWebView.qml 1970-01-01 00:00:00 +0000 |
2424 | +++ examples/Browsers/youtube/FlicableWebView.qml 2013-02-18 17:43:29 +0000 |
2425 | @@ -0,0 +1,194 @@ |
2426 | +/**************************************************************************** |
2427 | + ** |
2428 | + ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). |
2429 | + ** All rights reserved. |
2430 | + ** Contact: Nokia Corporation (qt-info@nokia.com) |
2431 | + ** |
2432 | + ** This file is part of the QtDeclarative module of the Qt Toolkit. |
2433 | + ** |
2434 | + ** $QT_BEGIN_LICENSE:LGPL$ |
2435 | + ** GNU Lesser General Public License Usage |
2436 | + ** This file may be used under the terms of the GNU Lesser General Public |
2437 | + ** License version 2.1 as published by the Free Software Foundation and |
2438 | + ** appearing in the file LICENSE.LGPL included in the packaging of this |
2439 | + ** file. Please review the following information to ensure the GNU Lesser |
2440 | + ** General Public License version 2.1 requirements will be met: |
2441 | + ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
2442 | + ** |
2443 | + ** In addition, as a special exception, Nokia gives you certain additional |
2444 | + ** rights. These rights are described in the Nokia Qt LGPL Exception |
2445 | + ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
2446 | + ** |
2447 | + ** GNU General Public License Usage |
2448 | + ** Alternatively, this file may be used under the terms of the GNU General |
2449 | + ** Public License version 3.0 as published by the Free Software Foundation |
2450 | + ** and appearing in the file LICENSE.GPL included in the packaging of this |
2451 | + ** file. Please review the following information to ensure the GNU General |
2452 | + ** Public License version 3.0 requirements will be met: |
2453 | + ** http://www.gnu.org/copyleft/gpl.html. |
2454 | + ** |
2455 | + ** Other Usage |
2456 | + ** Alternatively, this file may be used in accordance with the terms and |
2457 | + ** conditions contained in a signed written agreement between you and Nokia. |
2458 | + ** |
2459 | + ** |
2460 | + ** |
2461 | + ** |
2462 | + ** |
2463 | + ** $QT_END_LICENSE$ |
2464 | + ** |
2465 | + ****************************************************************************/ |
2466 | + |
2467 | + import QtQuick 2.0 |
2468 | + import QtWebKit 3.0 |
2469 | + |
2470 | + Flickable { |
2471 | + property alias title: webView.title |
2472 | + property alias icon: webView.icon |
2473 | + property alias progress: webView.progress |
2474 | + property alias url: webView.url |
2475 | + property alias back: webView.back |
2476 | + property alias stop: webView.stop |
2477 | + property alias reload: webView.reload |
2478 | + property alias forward: webView.forward |
2479 | + id: flickable |
2480 | +// width: parent.width |
2481 | + contentWidth: Math.max(parent.width,webView.width) |
2482 | + contentHeight: Math.max(parent.height,webView.height) |
2483 | + anchors.top: headerSpace.bottom |
2484 | + anchors.bottom: parent.top |
2485 | + anchors.left: parent.left |
2486 | + anchors.right: parent.right |
2487 | + pressDelay: 200 |
2488 | + |
2489 | + onWidthChanged : { |
2490 | + // Expand (but not above 1:1) if otherwise would be smaller that available width. |
2491 | + if (width > webView.width*webView.contentsScale && webView.contentsScale < 1.0) |
2492 | + webView.contentsScale = width / webView.width * webView.contentsScale; |
2493 | + } |
2494 | + |
2495 | + WebView { |
2496 | + id: webView |
2497 | + transformOrigin: Item.TopLeft |
2498 | + |
2499 | + function fixUrl(url) |
2500 | + { |
2501 | + if (url == "") return url |
2502 | + if (url[0] == "/") return "file://"+url |
2503 | + if (url.indexOf(":")<0) { |
2504 | + if (url.indexOf(".")<0 || url.indexOf(" ")>=0) { |
2505 | + // Fall back to a search engine; hard-code Wikipedia |
2506 | + return "http://en.wikipedia.org/w/index.php?search="+url |
2507 | + } else { |
2508 | + return "http://"+url |
2509 | + } |
2510 | + } |
2511 | + return url |
2512 | + } |
2513 | + |
2514 | + url: fixUrl(webBrowser.urlString) |
2515 | + smooth: false // We don't want smooth scaling, since we only scale during (fast) transitions |
2516 | + focus: true |
2517 | + |
2518 | + onAlert: console.log(message) |
2519 | + |
2520 | + function doZoom(zoom,centerX,centerY) |
2521 | + { |
2522 | + if (centerX) { |
2523 | + var sc = zoom*contentsScale; |
2524 | + scaleAnim.to = sc; |
2525 | + flickVX.from = flickable.contentX |
2526 | + flickVX.to = Math.max(0,Math.min(centerX-flickable.width/2,webView.width*sc-flickable.width)) |
2527 | + finalX.value = flickVX.to |
2528 | + flickVY.from = flickable.contentY |
2529 | + flickVY.to = Math.max(0,Math.min(centerY-flickable.height/2,webView.height*sc-flickable.height)) |
2530 | + finalY.value = flickVY.to |
2531 | + quickZoom.start() |
2532 | + } |
2533 | + } |
2534 | + |
2535 | + Keys.onLeftPressed: webView.contentsScale -= 0.1 |
2536 | + Keys.onRightPressed: webView.contentsScale += 0.1 |
2537 | + |
2538 | + preferredWidth: flickable.width |
2539 | + preferredHeight: flickable.height |
2540 | +// contentsScale: 1 |
2541 | +// onContentsSizeChanged: { |
2542 | +// // zoom out |
2543 | +// contentsScale = Math.min(1,flickable.width / contentsSize.width) |
2544 | +// } |
2545 | + onUrlChanged: { |
2546 | + // got to topleft |
2547 | + flickable.contentX = 0 |
2548 | + flickable.contentY = 0 |
2549 | + if (url != null) { header.editUrl = url.toString(); } |
2550 | + } |
2551 | +// onDoubleClick: { |
2552 | +// if (!heuristicZoom(clickX,clickY,2.5)) { |
2553 | +// var zf = flickable.width / contentsSize.width |
2554 | +// if (zf >= contentsScale) |
2555 | +// zf = 2.0*contentsScale // zoom in (else zooming out) |
2556 | +// doZoom(zf,clickX*zf,clickY*zf) |
2557 | +// } |
2558 | +// } |
2559 | + |
2560 | + SequentialAnimation { |
2561 | + id: quickZoom |
2562 | + |
2563 | + PropertyAction { |
2564 | + target: webView |
2565 | + property: "renderingEnabled" |
2566 | + value: false |
2567 | + } |
2568 | + ParallelAnimation { |
2569 | + NumberAnimation { |
2570 | + id: scaleAnim |
2571 | + target: webView |
2572 | + property: "contentsScale" |
2573 | + // the to property is set before calling |
2574 | + easing.type: Easing.Linear |
2575 | + duration: 200 |
2576 | + } |
2577 | + NumberAnimation { |
2578 | + id: flickVX |
2579 | + target: flickable |
2580 | + property: "contentX" |
2581 | + easing.type: Easing.Linear |
2582 | + duration: 200 |
2583 | + from: 0 // set before calling |
2584 | + to: 0 // set before calling |
2585 | + } |
2586 | + NumberAnimation { |
2587 | + id: flickVY |
2588 | + target: flickable |
2589 | + property: "contentY" |
2590 | + easing.type: Easing.Linear |
2591 | + duration: 200 |
2592 | + from: 0 // set before calling |
2593 | + to: 0 // set before calling |
2594 | + } |
2595 | + } |
2596 | + // Have to set the contentXY, since the above 2 |
2597 | + // size changes may have started a correction if |
2598 | + // contentsScale < 1.0. |
2599 | + PropertyAction { |
2600 | + id: finalX |
2601 | + target: flickable |
2602 | + property: "contentX" |
2603 | + value: 0 // set before calling |
2604 | + } |
2605 | + PropertyAction { |
2606 | + id: finalY |
2607 | + target: flickable |
2608 | + property: "contentY" |
2609 | + value: 0 // set before calling |
2610 | + } |
2611 | + PropertyAction { |
2612 | + target: webView |
2613 | + property: "renderingEnabled" |
2614 | + value: true |
2615 | + } |
2616 | + } |
2617 | +// onZoomTo: doZoom(zoom,centerX,centerY) |
2618 | + } |
2619 | + } |
2620 | |
2621 | === added file 'examples/Browsers/youtube/Youtube.qml' |
2622 | --- examples/Browsers/youtube/Youtube.qml 1970-01-01 00:00:00 +0000 |
2623 | +++ examples/Browsers/youtube/Youtube.qml 2013-02-18 17:43:29 +0000 |
2624 | @@ -0,0 +1,74 @@ |
2625 | +import QtQuick 2.0 |
2626 | +import QtWebKit 3.0 |
2627 | +//import "../../common" |
2628 | +//import"../../s/*y*/steminfo" |
2629 | + |
2630 | + |
2631 | +Rectangle { |
2632 | + id: webBrowser |
2633 | + property string urlString : "https://www.youtube.com/tv" |
2634 | + width: parent.width; height: parent.height |
2635 | + color: "#343434" |
2636 | + FlicableWebView { |
2637 | + id: webView |
2638 | + url: webBrowser.urlString |
2639 | + onProgressChanged: header.urlChanged = false |
2640 | + anchors { |
2641 | + top: headerSpace.bottom; |
2642 | + left: parent.left; |
2643 | + right: parent.right; |
2644 | + bottom: parent.bottom |
2645 | + } |
2646 | + } |
2647 | + |
2648 | + Item { |
2649 | + id: headerSpace; |
2650 | + width: parent.width; |
2651 | + height: 0 |
2652 | + } |
2653 | + |
2654 | +// SettingsMangerParser { |
2655 | +// visible: false |
2656 | +// icon: "/usr/share/pixmaps/mythtv.png" |
2657 | +// id:mythfrontend |
2658 | +// x: 900 |
2659 | +// smooth: true |
2660 | +// desktopFile: "mythtv.desktop" |
2661 | +// } |
2662 | + BrowserScrollbars { |
2663 | + scrollArea: webView; width: 8 |
2664 | + anchors { right: parent.right; top: header.bottom; bottom: parent.bottom } |
2665 | + } |
2666 | + |
2667 | + BrowserScrollbars{ |
2668 | + scrollArea: webView; height: 8; orientation: Qt.Horizontal |
2669 | + anchors { right: parent.right; rightMargin: 8; left: parent.left; bottom: parent.bottom } |
2670 | + } |
2671 | + |
2672 | + |
2673 | +// Row{ |
2674 | +// id:testbutton |
2675 | +// PictureGlowButton{ |
2676 | +// id:drendering |
2677 | +// text: "testing 1" |
2678 | +// onClicked: declarativeView.activeLens = activateQtvviewer |
2679 | +// } |
2680 | +// PictureGlowButton{ |
2681 | +// id:fanart |
2682 | +// text: "Testing 2" |
2683 | +// onClicked: declarativeView.activeLens = activateVideffect |
2684 | +// } |
2685 | +// PictureGlowButton{ |
2686 | +// id:showmythbuttons |
2687 | +// text: "Luanch Myth" |
2688 | +// onClicked: mythfrontend.visible = "" ? mythfrontend.visible = "" : mythfrontend.visible = true |
2689 | +// } |
2690 | + } |
2691 | + // Header { |
2692 | + // id: header |
2693 | + // editUrl: webBrowser.urlString |
2694 | + // width: headerSpace.width; height: headerSpace.height |
2695 | + // } |
2696 | + |
2697 | + |
2698 | +//} |
2699 | |
2700 | === added file 'examples/GetLatLongDelegate.qml' |
2701 | --- examples/GetLatLongDelegate.qml 1970-01-01 00:00:00 +0000 |
2702 | +++ examples/GetLatLongDelegate.qml 2013-02-18 17:43:29 +0000 |
2703 | @@ -0,0 +1,54 @@ |
2704 | +import QtQuick 2.0 |
2705 | +import QtQuick.XmlListModel 2.0 |
2706 | +import Ubuntu.Components 0.1 |
2707 | +Item { |
2708 | + id: series |
2709 | + signal clicked() |
2710 | + x: 15 |
2711 | +// visible: west === "" ? false : true |
2712 | + width: listView.width - 3 |
2713 | + height: listView.width / 3.33 |
2714 | + Rectangle { |
2715 | + color: bannerImg.status === Image.Error ? "#66000000" : "transparent" |
2716 | + anchors.fill: parent |
2717 | + border.color: "#00000000" |
2718 | + border.width: 3 |
2719 | + smooth: true |
2720 | + } |
2721 | + UbuntuShape { |
2722 | + id: bannerImg |
2723 | + anchors.fill: parent |
2724 | + color: "#22000000" |
2725 | + } |
2726 | + MouseArea { |
2727 | + anchors.fill: parent |
2728 | + onClicked:{series.clicked()} |
2729 | + } |
2730 | + Item { |
2731 | + id: topLayout |
2732 | + x: 20; |
2733 | + width: parent.width; |
2734 | + height: parent.height |
2735 | + anchors.verticalCenter: parent.verticalCenter |
2736 | + Text { |
2737 | + height: 20 |
2738 | + id: titleLabel |
2739 | + text: "Name" +name+"\n" |
2740 | ++ adminName1+"\n" |
2741 | + + adminName2+"\n" |
2742 | + +"population: " +population+"\n" |
2743 | + +countryName +"\n" |
2744 | + +countryCode+"\n" |
2745 | + + elevation +"\n" |
2746 | +// +north+"\n" |
2747 | +// +east+"\n" |
2748 | +// +west+"\n" |
2749 | +// +south |
2750 | + color: "white" |
2751 | + font.pixelSize: 12 |
2752 | + font.bold: true; |
2753 | + wrapMode: Text.WordWrap |
2754 | + |
2755 | + } |
2756 | + } |
2757 | +} |
2758 | |
2759 | === added file 'examples/GetLatLongModel.qml' |
2760 | --- examples/GetLatLongModel.qml 1970-01-01 00:00:00 +0000 |
2761 | +++ examples/GetLatLongModel.qml 2013-02-18 17:43:29 +0000 |
2762 | @@ -0,0 +1,40 @@ |
2763 | +import QtQuick 2.0 |
2764 | +import QtQuick.XmlListModel 2.0 |
2765 | + |
2766 | +XmlListModel { |
2767 | + id: seriesModel |
2768 | + function newSearch(text) { |
2769 | + console.log("Searching: " + text); |
2770 | + source ="http://api.geonames.org/search?q="+text+"&maxRows=10&username=bobweaver12345&style=FULL" |
2771 | + reload() |
2772 | + } |
2773 | + query: "//geonames/geoname" |
2774 | + XmlRole { name: "name"; query: "name/string()" } |
2775 | + XmlRole { name: "lat"; query: "lat/string()" } |
2776 | + XmlRole { name: "lng"; query: "lng/string()" } |
2777 | + XmlRole { name:"postalcode"; query: "postalcode/string()"} //zip code |
2778 | + // XmlRole { name:"stateName"; query: "adminName1/string()"} //state |
2779 | + XmlRole { name:"countryName"; query: "countryName/string()"} //country long name |
2780 | + XmlRole { name:"countryCode"; query: "countryCode/string()"} //counrty short name |
2781 | + XmlRole { name:"geonameId"; query: "geonameId/string()"} //site name ID |
2782 | + XmlRole { name:"fclName"; query: "fclName/string()"} //Items a town ,city ,rural ,ect |
2783 | + XmlRole { name:"population"; query: "population/string()"} //population of item |
2784 | + XmlRole { name:"elevation"; query: "elevation/string()"} //elevation of Item |
2785 | + XmlRole { name:"adminName1"; query: "adminName1/string()"} //long statename |
2786 | + XmlRole { name:"adminName2"; query: "adminName2/string()"} // county in state USA |
2787 | + // bbox top line of the east west south and north |
2788 | + XmlRole { name:"west";query: "bbox/west/string()"} |
2789 | + XmlRole { name:"north"; query: "bbox/north/string()"} |
2790 | + XmlRole { name:"east"; query: "bbox/east/string()"} |
2791 | + XmlRole { name:"south"; query: "bbox/south/string()"} |
2792 | + |
2793 | +// XmlRole { name:"score" ; query:"score/string()" } // Have No clue |
2794 | + XmlRole { name:"totalResultsCount" ; query:"totalResultsCount/string()" } // For Debuging |
2795 | + |
2796 | + onStatusChanged: { |
2797 | + if (status == XmlListModel.Ready) console.log("Loaded") |
2798 | + if (status == XmlListModel.Loading) console.log("Loading"); |
2799 | +// if (status == XmlListModel.Error) console.log("Error: " + errorString ); |
2800 | + } |
2801 | +} |
2802 | + |
2803 | |
2804 | === added file 'examples/NOAADelegate.qml' |
2805 | --- examples/NOAADelegate.qml 1970-01-01 00:00:00 +0000 |
2806 | +++ examples/NOAADelegate.qml 2013-02-18 17:43:29 +0000 |
2807 | @@ -0,0 +1,6 @@ |
2808 | +import QtQuick 2.0 |
2809 | + |
2810 | +Rectangle { |
2811 | + width: 100 |
2812 | + height: 62 |
2813 | +} |
2814 | |
2815 | === added file 'examples/NOAAModel.qml' |
2816 | --- examples/NOAAModel.qml 1970-01-01 00:00:00 +0000 |
2817 | +++ examples/NOAAModel.qml 2013-02-18 17:43:29 +0000 |
2818 | @@ -0,0 +1,6 @@ |
2819 | +import QtQuick 2.0 |
2820 | + |
2821 | +Rectangle { |
2822 | + width: 100 |
2823 | + height: 62 |
2824 | +} |
2825 | |
2826 | === added file 'examples/ProgressDialog.qml' |
2827 | --- examples/ProgressDialog.qml 1970-01-01 00:00:00 +0000 |
2828 | +++ examples/ProgressDialog.qml 2013-02-18 17:43:29 +0000 |
2829 | @@ -0,0 +1,55 @@ |
2830 | +import QtQuick 2.0 |
2831 | +Item { |
2832 | + id: progresDialog |
2833 | + width: parent.width |
2834 | + height: parent.height |
2835 | + property alias text: progresText.text |
2836 | + Rectangle { |
2837 | + id: background |
2838 | + anchors.fill: parent |
2839 | + border.color: "#55FFFFFF" |
2840 | + radius: 4 |
2841 | + border.width: 0 |
2842 | + gradient: Gradient { |
2843 | + GradientStop { position: 0; color: "#77000000"} |
2844 | + GradientStop { position: 0.9; color: "#66808080"} |
2845 | + GradientStop { position: 1; color: "#77000000"} |
2846 | + } |
2847 | + } |
2848 | + Text { |
2849 | + id: progresText |
2850 | + text: "" |
2851 | + width: parent.width - 40 |
2852 | + color: "white" |
2853 | + font.pixelSize: 20 |
2854 | + anchors{ |
2855 | + horizontalCenter: parent.horizontalCenter |
2856 | + top: parent.top |
2857 | + topMargin: 20 |
2858 | + } |
2859 | + } |
2860 | + |
2861 | + Image { |
2862 | + id: indicatorImg |
2863 | + width: 128 |
2864 | + height: 128 |
2865 | + smooth: true |
2866 | + //FIX ME |
2867 | + sourceSize.height: height |
2868 | + sourceSize.width: width |
2869 | + source: "/usr/share/unity/5/launcher_bfb.png" |
2870 | + anchors{ |
2871 | + verticalCenter: parent.verticalCenter |
2872 | + horizontalCenter: parent.horizontalCenter |
2873 | + } |
2874 | + RotationAnimation { |
2875 | + target: indicatorImg; |
2876 | + running: true |
2877 | + loops: Animation.Infinite |
2878 | + duration: 1200 |
2879 | + direction: RotationAnimation.Clockwise |
2880 | +// from: 0 |
2881 | +// to: 360 |
2882 | + } |
2883 | + } |
2884 | +} |
2885 | |
2886 | === added file 'examples/SearchBar.qml' |
2887 | --- examples/SearchBar.qml 1970-01-01 00:00:00 +0000 |
2888 | +++ examples/SearchBar.qml 2013-02-18 17:43:29 +0000 |
2889 | @@ -0,0 +1,60 @@ |
2890 | +import QtQuick 2.0 |
2891 | + |
2892 | +Rectangle { |
2893 | + id: searchBar |
2894 | + height: 70 |
2895 | + color: "transparent" |
2896 | + width: parent.width - 100 |
2897 | + signal search(string text); |
2898 | + BorderImage { |
2899 | + id: searchbar |
2900 | + source: "../artwork/search_background.png" |
2901 | + width: parent.width ; height: 70 |
2902 | + border.left: 25; border.top: 25 |
2903 | + border.right: 25; border.bottom: 25 |
2904 | + } |
2905 | + Image { |
2906 | + id: magGlass |
2907 | + source: "../artwork/search_icon.png" |
2908 | + anchors{ |
2909 | + left: searchbar.left |
2910 | + leftMargin: 12 |
2911 | + verticalCenter:searchbar.verticalCenter |
2912 | + } |
2913 | + } |
2914 | + SearchBox{ |
2915 | + id: searchBox |
2916 | + state: 'Show' |
2917 | + height: parent.height - 5 |
2918 | +// focus: parent.focus === true ? true : false |
2919 | + anchors{ |
2920 | + left: magGlass.right |
2921 | + leftMargin: 15 |
2922 | + right: parent.right |
2923 | + rightMargin: 5 |
2924 | + } |
2925 | + onReturnPressed: { |
2926 | + if (searchBox.text !== '') { |
2927 | + searchBar.search(searchBox.text); |
2928 | + searchBox.text = "" |
2929 | + } |
2930 | + } |
2931 | + |
2932 | + states: [ |
2933 | + State { |
2934 | + name: "Hide" |
2935 | + PropertyChanges { |
2936 | + target: searchBox |
2937 | + opacity: 0.0 |
2938 | + } |
2939 | + }, |
2940 | + State { |
2941 | + name: "Show" |
2942 | + PropertyChanges { |
2943 | + target: searchBox |
2944 | + opacity: 1.0 |
2945 | + } |
2946 | + } |
2947 | + ] |
2948 | + } |
2949 | +} |
2950 | |
2951 | === added file 'examples/SearchBox.qml' |
2952 | --- examples/SearchBox.qml 1970-01-01 00:00:00 +0000 |
2953 | +++ examples/SearchBox.qml 2013-02-18 17:43:29 +0000 |
2954 | @@ -0,0 +1,77 @@ |
2955 | +import QtQuick 2.0 |
2956 | + |
2957 | +FocusScope { |
2958 | + id: focusScope |
2959 | + width: 250; height: textInput.height + 10 |
2960 | + property alias text: textInput.text |
2961 | + signal returnPressed(); |
2962 | + |
2963 | + Text { |
2964 | + id: typeSomething |
2965 | + verticalAlignment: Text.AlignLeft |
2966 | + text: qsTr("Enter City") |
2967 | + anchors{ |
2968 | + right: parent.right |
2969 | + rightMargin: 8 |
2970 | + left: parent.left |
2971 | + verticalCenter: parent.verticalCenter |
2972 | + } |
2973 | + color: "#44FFFFFF" |
2974 | + font.pixelSize: 22 |
2975 | + font.italic: true |
2976 | + } |
2977 | + |
2978 | + MouseArea { |
2979 | + anchors.fill: parent |
2980 | + onClicked: { focusScope.focus = true; textInput.openSoftwareInputPanel(); } |
2981 | + } |
2982 | + |
2983 | + TextInput { |
2984 | + id: textInput |
2985 | + smooth: true |
2986 | + anchors { left: parent.left; right: clear.left; rightMargin: 8; verticalCenter: parent.verticalCenter } |
2987 | + focus: true |
2988 | + selectByMouse: true |
2989 | + font.pixelSize: 28 |
2990 | + font.bold: true |
2991 | + color: "#FFFFFF" |
2992 | + |
2993 | + Keys.onPressed: { |
2994 | + if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) |
2995 | + returnPressed(); |
2996 | + } |
2997 | + } |
2998 | + |
2999 | + Image { |
3000 | + id: clear |
3001 | + height: parent.height |
3002 | + width: height |
3003 | + smooth: true |
3004 | + fillMode: Image.PreserveAspectFit |
3005 | + anchors { right: parent.right; rightMargin: 8; verticalCenter: parent.verticalCenter } |
3006 | + source: "../artwork/pics/clear.png" |
3007 | + opacity: 0 |
3008 | + |
3009 | + MouseArea { |
3010 | + anchors.fill: parent |
3011 | + onClicked: { textInput.text = ''; focusScope.focus = true; textInput.openSoftwareInputPanel(); } |
3012 | + } |
3013 | + } |
3014 | + |
3015 | + states: State { |
3016 | + name: "hasText"; when: textInput.text != '' |
3017 | + PropertyChanges { target: typeSomething; opacity: 0 } |
3018 | + PropertyChanges { target: clear; opacity: 0 } |
3019 | + } |
3020 | + |
3021 | + transitions: [ |
3022 | + Transition { |
3023 | + from: ""; to: "hasText" |
3024 | + NumberAnimation { exclude: typeSomething; properties: "opacity" } |
3025 | + }, |
3026 | + Transition { |
3027 | + from: "hasText"; to: "" |
3028 | + NumberAnimation { properties: "opacity" } |
3029 | + } |
3030 | + ] |
3031 | +} |
3032 | |
3033 | === added file 'examples/TWC.qml' |
3034 | --- examples/TWC.qml 1970-01-01 00:00:00 +0000 |
3035 | +++ examples/TWC.qml 2013-02-18 17:43:29 +0000 |
3036 | @@ -0,0 +1,24 @@ |
3037 | +import QtQuick 2.0 |
3038 | +import QtWebKit 3.0 |
3039 | +WeatherDelegate{ |
3040 | + property string forTWC: forTWC |
3041 | + id: weatherPasser |
3042 | + width: parent.width |
3043 | + height: parent.height |
3044 | + anchors.fill: parent |
3045 | +Rectangle{ |
3046 | + id: rootangel |
3047 | + color:"black" |
3048 | + width: parent.width |
3049 | + height: parent.height |
3050 | + anchors.fill: parent |
3051 | + |
3052 | +WebView { |
3053 | + url: "http://www.weather.com/search/enhancedlocalsearch?where="+ forTWC |
3054 | + height: rootangel.height |
3055 | + scale: 1 |
3056 | + smooth: true |
3057 | +} MouseArea{anchors.fill: parent; onClicked: console.log(forTWC)} |
3058 | +} |
3059 | + |
3060 | +} |
3061 | |
3062 | === added file 'examples/WeatherDelegate.qml' |
3063 | --- examples/WeatherDelegate.qml 1970-01-01 00:00:00 +0000 |
3064 | +++ examples/WeatherDelegate.qml 2013-02-18 17:43:29 +0000 |
3065 | @@ -0,0 +1,1091 @@ |
3066 | +import QtQuick 2.0 |
3067 | +import QtQuick.XmlListModel 2.0 |
3068 | +import QtQuick.Particles 2.0 |
3069 | +import Ubuntu.Components 0.1 |
3070 | +import QtQuick.LocalStorage 2.0 |
3071 | +import "../common/dbUtils.js" as DataBase |
3072 | +import "../common/Utils.js" as Util |
3073 | +Item { |
3074 | + id: serie |
3075 | + property string name:'' |
3076 | + property string countryName:'' |
3077 | + property string adminName1:'' |
3078 | + // property string south:'' |
3079 | + property string folder: "../artwork" |
3080 | + property string forTWC: cityName.text |
3081 | + |
3082 | + function translateX(x) { |
3083 | + return root.width/10.0 + (x/700*root.width); |
3084 | + } |
3085 | + |
3086 | + function translateY(y) { |
3087 | + var tmp = y+root.height/5.0; |
3088 | + return tmp > 0 ? -20 : tmp; |
3089 | + } |
3090 | + function loadDetails(countryName,adminName1,name) { |
3091 | + serie.name = name |
3092 | + serie.countryName = countryName |
3093 | + serie.adminName1 = adminName1 |
3094 | + serieModel.load(countryName,adminName1,name) |
3095 | + } |
3096 | + |
3097 | + XmlListModel { |
3098 | + id: serieModel |
3099 | + function load(CountryName,AdminName1,Name) { |
3100 | + console.log("Loading Weather For ....... \n "+Name+"\n \n" |
3101 | + + encodeURI("http://www.yr.no/place/" |
3102 | + + CountryName |
3103 | + + "/" |
3104 | + + AdminName1 |
3105 | + + "/" |
3106 | + + Name |
3107 | + + "/forecast.xml")) |
3108 | + source = encodeURI("http://www.yr.no/place/"+CountryName+"/"+AdminName1+"/"+Name+"/forecast.xml") |
3109 | + reload() |
3110 | + } |
3111 | + query: "/weatherdata" |
3112 | + XmlRole { name: "timezone"; query: "location/type/string()"} |
3113 | + |
3114 | + // Right Now |
3115 | + XmlRole { name: "timeFrom"; query: "forecast/tabular/time[1]/@from/string()"} |
3116 | + XmlRole { name: "timeTo"; query: "forecast/tabular/time[1]/@to/string()"} |
3117 | + XmlRole { name: "observationTime"; query: "forecast/tabular/time[1]/string()"} |
3118 | + XmlRole { name: "temperature"; query: "forecast/tabular/time[1]/temperature/@value/string()" } |
3119 | + XmlRole { name: "precipitation"; query: "forecast/tabular/time[1]/precipitation/@value/string()" } |
3120 | + XmlRole { name: "clouds"; query: "forecast/tabular/time[1]/symbol/@name/string()" } |
3121 | + XmlRole { name: "windDirection"; query: "forecast/tabular/time[1]/windDirection/@name/string()" } |
3122 | + XmlRole { name: "windSpeed"; query: "forecast/tabular/time[1]/windSpeed/@name/string()" } |
3123 | + XmlRole { name: "windSpeedMPS"; query: "forecast/tabular/time[1]/windSpeed/@mps/string()" } |
3124 | + XmlRole { name: "pressure"; query: "forecast/tabular/time[1]/pressure/@value/string()" } |
3125 | + XmlRole { name: "sunRise"; query: "sun/@rise/string()" } |
3126 | + XmlRole { name: "sunSet"; query: "sun/@set/string()" } |
3127 | + |
3128 | + |
3129 | + XmlRole { name: "weatherCondition"; query: "forecast/tabular/string()"} |
3130 | + XmlRole { name: "status"; query: "forecast/tabular/string()" } |
3131 | + |
3132 | + |
3133 | + |
3134 | + |
3135 | + // XmlRole { name: "lastupdate"; query: "meta/lastupdate/string()" } |
3136 | + // XmlRole { name: "nextupdate"; query: "meta/nextupdate/string()" } |
3137 | + XmlRole { name:"creditTXT"; query: "credit/link/@text/string()"} |
3138 | + XmlRole { name:"creditURL"; query: "credit/link/@url/string()"} |
3139 | + onStatusChanged: { |
3140 | + if (status == XmlListModel.Ready) console.log("Loaded") |
3141 | + if (status == XmlListModel.Loading) console.log("Loading"); |
3142 | + } |
3143 | + } |
3144 | + |
3145 | + Text { |
3146 | + id: cityName |
3147 | + color: "white" |
3148 | + height:22 |
3149 | + font.bold: true |
3150 | + font.pixelSize: 28 |
3151 | + text: serie.name |
3152 | + anchors{ |
3153 | + top: parent.top |
3154 | + topMargin: 80 |
3155 | + } |
3156 | + } |
3157 | + |
3158 | + Rectangle{ |
3159 | + id: separator1 |
3160 | + color: "#44000000" |
3161 | + height: 3 |
3162 | + width: parent.width |
3163 | + anchors{ |
3164 | + top: cityName.bottom |
3165 | + topMargin: 10 |
3166 | + left: parent.left |
3167 | + } |
3168 | + } |
3169 | + Text { |
3170 | + id: today |
3171 | + text: Qt.formatDate(new Date(), "MMMM dddd"+","+" d yyyy ") |
3172 | + color: "white" |
3173 | + font.pixelSize: 22 |
3174 | + anchors{ |
3175 | + top:separator1.bottom |
3176 | + topMargin: 2 |
3177 | + } |
3178 | + } |
3179 | + ListView { |
3180 | + model: serieModel |
3181 | + delegate: Item{ |
3182 | + property string temp: tempatureTxt.text.toString() |
3183 | + id: topLayout |
3184 | + width: parent.width; |
3185 | + height: parent.height |
3186 | + |
3187 | + Text { |
3188 | + id: timeAroo |
3189 | + text:Qt.formatDateTime(new Date(), "hh"+":"+"mm") |
3190 | + height:22 |
3191 | + state: "Milatary" |
3192 | + x:state === "Milatary" ? separator1.width - 88 : separator1.width - 115 |
3193 | + Behavior on x{NumberAnimation{ |
3194 | + duration: 1200; easing.type: Easing.OutBounce} |
3195 | + } |
3196 | + color: "white" |
3197 | + font.bold: true |
3198 | + font.pixelSize: 22 |
3199 | + anchors{ |
3200 | + top: parent.top |
3201 | + topMargin: 86 |
3202 | + // |
3203 | + } |
3204 | + } |
3205 | + MouseArea{ |
3206 | + anchors.fill: timeAroo |
3207 | + onClicked: if (timeAroo.text === Qt.formatDateTime(new Date(), "hh"+":"+"mm") ){ |
3208 | + timeAroo.text = Qt.formatDateTime(new Date(), "h:mm ap") |
3209 | + timeAroo.state = "12-Hour" |
3210 | + }else{ |
3211 | + timeAroo.text = Qt.formatDateTime(new Date(), "hh"+":"+"mm") |
3212 | + timeAroo.state = "Milatary" |
3213 | + } |
3214 | + } |
3215 | + Image { |
3216 | + id: fahrenheitImg |
3217 | + source: Util.dir+"fahrenheit.png" |
3218 | + width: sourceSize.width / 2 |
3219 | + height: sourceSize.height / 2 |
3220 | + opacity: tempatureTxt.state === "Celcius" ? 0 : 1 |
3221 | + Behavior on opacity {NumberAnimation{duration: 200; easing.type: Easing.InQuad}} |
3222 | + y: tempatureTxt.state === "Celcius" ? separator1.height * 2 : separator1.width |
3223 | + Behavior on y {NumberAnimation{duration: 1200 ; easing.type: Easing.OutBack}} |
3224 | + x: tempatureTxt.width + tempatureTxt.height + 12 |
3225 | + } |
3226 | + Image { |
3227 | + id: celciusImg |
3228 | + source:{if(tempatureTxt.state === "Celcius") |
3229 | + Util.dir+"centigrades.png" |
3230 | + else |
3231 | + Util.dir+"fahrenheit.png" |
3232 | + } |
3233 | + height: sourceSize.height / 2 |
3234 | + width: sourceSize.width / 2 |
3235 | + |
3236 | + opacity: tempatureTxt.state === "Celcius" ? 1 : 0 |
3237 | + Behavior on opacity {NumberAnimation{duration:200; easing.type: Easing.OutQuad}} |
3238 | + x: tempatureTxt.state === "Celcius" ? tempatureTxt.width :tempatureTxt.state === "Fahrenheit"? -separator1.width : tempatureTxt.width |
3239 | + Behavior on x{NumberAnimation{duration: 1200; easing.type: Easing.OutBack}} |
3240 | + anchors{ |
3241 | + top: tempatureTxt.top |
3242 | + } |
3243 | + |
3244 | + } |
3245 | + Text { |
3246 | + id: tempatureTxt |
3247 | + text: temperature |
3248 | + color: "white" |
3249 | + width: separator1.width / 2 |
3250 | + font.pixelSize: 64 |
3251 | + font.bold: true |
3252 | + state: "Celcius" |
3253 | + x: state === "Celcius" ? (separator1.width / 1.22)-width : (separator1.width/1.22)-width |
3254 | + y: page.height / 1.44 |
3255 | + }MouseArea{ |
3256 | + anchors.fill: tempatureTxt |
3257 | + onClicked: { |
3258 | + var f = (temperature * 9 / 5 + 32) |
3259 | + if (tempatureTxt.state === "Celcius"){ |
3260 | + tempatureTxt.text = (temperature * 9 / 5 + 32) |
3261 | + tempatureTxt.state = "Fahrenheit" |
3262 | + }else{ |
3263 | + tempatureTxt.text = temperature |
3264 | + tempatureTxt.state = "Celcius" |
3265 | + |
3266 | + } |
3267 | + } |
3268 | + } |
3269 | + |
3270 | + |
3271 | + Image { |
3272 | + id: hangerSunMoon |
3273 | + height: sourceSize.height |
3274 | + source: "../artwork/na_icon_line.png" |
3275 | + y:mainImage.y - mainImage.sourceSize.height |
3276 | + anchors{ |
3277 | + horizontalCenter: mainImage.horizontalCenter |
3278 | + } |
3279 | + } |
3280 | + |
3281 | + //This is only for MOON and Sun & fallback |
3282 | + Image { |
3283 | + id: mainImage |
3284 | + width: sourceSize.width / 1.04 |
3285 | + height: sourceSize.height |
3286 | + smooth: true |
3287 | + state: "Shown" |
3288 | + x: page.width /2 - (width/2) |
3289 | + y: if (state === "Shown") |
3290 | + page.height / 4.22 |
3291 | + else if (state === "Hidden") |
3292 | + -page.height |
3293 | + else |
3294 | + page.height/ 5.44 |
3295 | + Behavior on y{NumberAnimation{duration: 1200;easing.type: Easing.OutBounce}} |
3296 | + source: { |
3297 | + |
3298 | + if (Util.nightOrDay(new Date(),"hh") === "night" === true ) |
3299 | + Util.dir + "moon.png" |
3300 | + else if (Util.nightOrDay(new Date(),"hh") === "night" !== true && temperature > 5) |
3301 | + Util.dir + "sun.png" |
3302 | + else if (Util.nightOrDay(new Date(),"hh") === "night" !== true && temperature < 5) |
3303 | + Util.dir + "cold_sun.png" |
3304 | + |
3305 | + else if (weatherCondition === "light rain" && Util.nightOrDay(new Date(),"hh") === "night" !== true) |
3306 | + Util.dir+"sun.png" |
3307 | + |
3308 | + |
3309 | + else if (weatherCondition === "mist" && Util.nightOrDay(new Date(),"hh") === "night" !== true) |
3310 | + Util.dir+"cold_sun.png" |
3311 | + |
3312 | + |
3313 | + |
3314 | + else |
3315 | + Util.dir +"na_icon.png" |
3316 | + } |
3317 | + |
3318 | + }MouseArea { |
3319 | + id:mainImageMouseArea |
3320 | + anchors.fill: mainImage |
3321 | + onPressAndHold:{ mainImage.state = "Hidden" } |
3322 | + onReleased:{mainImage.state = "Shown"} |
3323 | + onClicked: { |
3324 | +// observationTime.subString(observationTime.lastIndexOf("T")+1)+observationTime.subString(0,observationTime.indexOf(":")+) |
3325 | +// sunSet) moon |
3326 | +//observationTime.substring(observationTime.lastIndexOf("T")+1)+observationTime.substring(0,observationTime.indexOf(":")) |
3327 | + var isUP = timeFrom.substring(timeFrom.lastIndexOf("T")+1) |
3328 | + var isDown = sunSet.substring(sunSet.lastIndexOf("T")+1) |
3329 | + var isSunUP = sunRise.substring(sunRise.lastIndexOf("T")+1) |
3330 | + console.log(isUP.substring(0,isUP.indexOf(":")) +" ? " + isDown.substring(0,isDown.indexOf(":")) |
3331 | + + "\n" |
3332 | + + isUP.substring(0,isUP.indexOf(":")) +" ? " +isSunUP.substring(0,isSunUP.indexOf(":"))) |
3333 | + } |
3334 | + } |
3335 | + |
3336 | + |
3337 | + //Start to add the clouds |
3338 | + // Ok this is how this works if there condtions call for the cloud then they are shown pelse they are not. |
3339 | + //each item has a string and the string is set to match the item that it is attached to. this makes it so |
3340 | + //so that each time the moon or sun is pressed and held each one will move up with animations and also on different durations |
3341 | + //It is imporant that we keep the states the same as "main Image" aka the sun or moon or cold sun |
3342 | + |
3343 | + //////////////////////////cloudsImage1 |
3344 | + Image { |
3345 | + id: cloudsImage1 |
3346 | + width: sourceSize.width /2 |
3347 | + height: sourceSize.height /2 |
3348 | + opacity:{ |
3349 | + if (clouds === "Cloudy"||clouds ==="Snow") |
3350 | + 1 |
3351 | + else |
3352 | + 0 |
3353 | + } |
3354 | + smooth: true |
3355 | + state: mainImage.state |
3356 | + x: page.width / 20 |
3357 | + y: if (state === "Shown") |
3358 | + page.height / 2 |
3359 | + else if (state === "Hidden") |
3360 | + -page.height |
3361 | + else |
3362 | + page.height / 2 |
3363 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
3364 | + source: Util.dir + "cloud_1.png" |
3365 | + } |
3366 | + Image { |
3367 | + id: hangerCloud1 |
3368 | + height: sourceSize.height /2 |
3369 | + opacity: cloudsImage1.opacity |
3370 | + |
3371 | + source: Util.dir+"cloud_1_line.png" |
3372 | + y: cloudsImage1.y - cloudsImage1.sourceSize.height -(cloudsImage1.sourceSize.height / 1.844) |
3373 | + x:cloudsImage1.width / 1.844 |
3374 | + } |
3375 | + // End cloudsImage1 |
3376 | + |
3377 | + |
3378 | + //cloudsImage2 |
3379 | + Image { |
3380 | + id: cloudsImage2 |
3381 | + width: sourceSize.width / 1.88 |
3382 | + height: sourceSize.height / 1.88 |
3383 | + opacity:{ |
3384 | + if (clouds === "Cloudy"||clouds ==="Snow"|| clouds == "Partly cloudy") |
3385 | + 1 |
3386 | + else |
3387 | + 0 |
3388 | + } |
3389 | + |
3390 | + smooth: true |
3391 | + state: mainImage.state |
3392 | + x: page.width / 2 |
3393 | + y: if (state === "Shown") |
3394 | + page.height / 2 |
3395 | + else if (state === "Hidden") |
3396 | + -page.height |
3397 | + else |
3398 | + page.height / 2 |
3399 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
3400 | + source: Util.dir + "cloud_2.png" |
3401 | + } |
3402 | + Image { |
3403 | + id: hangerCloud2 |
3404 | + opacity: cloudsImage2.opacity |
3405 | + |
3406 | + height: sourceSize.height /2 |
3407 | + source: Util.dir+"cloud_2_line.png" |
3408 | + y: cloudsImage2.y - cloudsImage2.sourceSize.height -(cloudsImage2.sourceSize.height / 1.14) |
3409 | + x:cloudsImage2.x + cloudsImage2.width / 2.25 |
3410 | + } |
3411 | + // End cloudsImage2 |
3412 | + |
3413 | + |
3414 | + |
3415 | + //cloudsImage3 |
3416 | + Image { |
3417 | + id: cloudsImage3 |
3418 | + width: sourceSize.width /2 |
3419 | + height: sourceSize.height /2 |
3420 | + opacity:{ |
3421 | + if (clouds === "Cloudy"||clouds ==="Snow"||clouds == "Partly cloudy") |
3422 | + 1 |
3423 | + else |
3424 | + 0 |
3425 | + } |
3426 | + smooth: true |
3427 | + state: mainImage.state |
3428 | + x: page.width / 50 |
3429 | + y: if (state === "Shown") |
3430 | + page.height / 2.66 |
3431 | + else if (state === "Hidden") |
3432 | + -page.height |
3433 | + else |
3434 | + page.height / 2.66 |
3435 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
3436 | + source: Util.dir + "cloud_3.png" |
3437 | + } |
3438 | + Image { |
3439 | + id: hangerCloud3 |
3440 | + opacity: cloudsImage3.opacity |
3441 | + height: sourceSize.height /2 |
3442 | + source: Util.dir+"cloud_3_line.png" |
3443 | + y: cloudsImage3.y - cloudsImage3.sourceSize.height -(cloudsImage3.sourceSize.height + cloudsImage3.height /2) |
3444 | + x:cloudsImage3.x + cloudsImage3.width / 2.25 |
3445 | + } |
3446 | + // End cloudsImage3 |
3447 | + |
3448 | + |
3449 | +//////////////start rain clouds |
3450 | + //cloudsImageRain1 |
3451 | + Image { |
3452 | + id: cloudsRainImage1 |
3453 | + width: sourceSize.width /2 |
3454 | + height: sourceSize.height /2 |
3455 | + opacity:{ |
3456 | + if (clouds === "Rain") |
3457 | + 1 |
3458 | + else |
3459 | + 0 |
3460 | + } |
3461 | + |
3462 | + smooth: true |
3463 | + state: mainImage.state |
3464 | + x: page.width / 20 |
3465 | + y: if (state === "Shown") |
3466 | + page.height / 2 |
3467 | + else if (state === "Hidden") |
3468 | + -page.height |
3469 | + else |
3470 | + page.height / 2 |
3471 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
3472 | + source: Util.dir + "cloud_rain_1.png" |
3473 | + } |
3474 | + Image { |
3475 | + id: hangerCloudRain1 |
3476 | + opacity: cloudsRainImage1.opacity |
3477 | + |
3478 | + height: sourceSize.height /2 |
3479 | + source: Util.dir+"cloud_rain_1_line.png" |
3480 | + y: cloudsRainImage1.y - cloudsRainImage1.sourceSize.height -(cloudsRainImage1.sourceSize.height / 1.844) |
3481 | + x:cloudsRainImage1.width / 1.844 |
3482 | + } |
3483 | + // End cloudsImageRain1 |
3484 | + |
3485 | + |
3486 | + //cloudsImageRain2 |
3487 | + Image { |
3488 | + id: cloudsImageRain2 |
3489 | + width: sourceSize.width / 1.88 |
3490 | + height: sourceSize.height / 1.88 |
3491 | + smooth: true |
3492 | + state: mainImage.state |
3493 | + x: page.width / 2 |
3494 | + opacity:{ |
3495 | + if (clouds === "Rain") |
3496 | + 1 |
3497 | + else |
3498 | + 0 |
3499 | + } |
3500 | + |
3501 | + y: if (state === "Shown") |
3502 | + page.height / 2 |
3503 | + else if (state === "Hidden") |
3504 | + -page.height |
3505 | + else |
3506 | + page.height / 2 |
3507 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
3508 | + source: Util.dir + "cloud_rain_2.png" |
3509 | + } |
3510 | + Image { |
3511 | + id: hangerCloudRain2 |
3512 | + height: sourceSize.height /2 |
3513 | + source: Util.dir+"cloud_rain_2_line.png" |
3514 | + opacity: cloudsImageRain2.opacity |
3515 | + |
3516 | + y: cloudsImageRain2.y - cloudsImageRain2.sourceSize.height -(cloudsImageRain2.sourceSize.height / 1.14) |
3517 | + x:cloudsImageRain2.x + cloudsImageRain2.width / 2.25 |
3518 | + } |
3519 | + // End cloudsImageRain2 |
3520 | + |
3521 | + |
3522 | + |
3523 | + //cloudsImageRain3 |
3524 | + Image { |
3525 | + id: cloudsImageRain3 |
3526 | + width: sourceSize.width /2 |
3527 | + height: sourceSize.height /2 |
3528 | + smooth: true |
3529 | + opacity:{ |
3530 | + if (clouds === "Rain") |
3531 | + 1 |
3532 | + else |
3533 | + 0 |
3534 | + } |
3535 | + |
3536 | + state: mainImage.state |
3537 | + x: page.width / 50 |
3538 | + y: if (state === "Shown") |
3539 | + page.height / 2.66 |
3540 | + else if (state === "Hidden") |
3541 | + -page.height |
3542 | + else |
3543 | + page.height / 2.66 |
3544 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
3545 | + source: Util.dir + "cloud_rain_3.png" |
3546 | + } |
3547 | + Image { |
3548 | + id: hangerCloudRain3 |
3549 | + height: sourceSize.height /2 |
3550 | + opacity: cloudsImageRain3.opacity |
3551 | + |
3552 | + source: Util.dir+"cloud_rain_3_line.png" |
3553 | + y: cloudsImageRain3.y - cloudsImageRain3.sourceSize.height -(cloudsImageRain3.sourceSize.height + cloudsImageRain3.height /2) |
3554 | + x:cloudsImageRain3.x + cloudsImageRain3.width / 2.25 |
3555 | + } |
3556 | + // End cloudsImageRain3 |
3557 | + |
3558 | + |
3559 | +////////////////////////start Storm Clouds |
3560 | + |
3561 | + //cloudsImageStrom1 |
3562 | + Image { |
3563 | + id: cloudsStormImage1 |
3564 | + width: sourceSize.width /2 |
3565 | + height: sourceSize.height /2 |
3566 | + opacity:{ |
3567 | + if (clouds === "Heavy rain") |
3568 | + 1 |
3569 | + else |
3570 | + 0 |
3571 | + } |
3572 | + smooth: true |
3573 | + state: mainImage.state |
3574 | + x: page.width / 20 |
3575 | + y: if (state === "Shown") |
3576 | + page.height / 2 |
3577 | + else if (state === "Hidden") |
3578 | + -page.height |
3579 | + else |
3580 | + page.height / 2 |
3581 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
3582 | + source: Util.dir + "cloud_storm_1.png" |
3583 | + } |
3584 | + Image { |
3585 | + id: hangerCloudStorm1 |
3586 | + height: sourceSize.height /2 |
3587 | + opacity: cloudsImageTStorm1.opacity |
3588 | + |
3589 | + source: Util.dir+"cloud_storm_1_line.png" |
3590 | + y: cloudsStormImage1.y - cloudsStormImage1.sourceSize.height -(cloudsStormImage1.sourceSize.height / 1.844) |
3591 | + x:cloudsStormImage1.width / 1.844 |
3592 | + } |
3593 | + // End cloudsImageStrom1 |
3594 | + |
3595 | + |
3596 | + //cloudsImageStrom2 |
3597 | + Image { |
3598 | + id: cloudsImageStrom2 |
3599 | + width: sourceSize.width / 1.88 |
3600 | + height: sourceSize.height / 1.88 |
3601 | + opacity:{ |
3602 | + if (clouds === "Heavy rain") |
3603 | + 1 |
3604 | + else |
3605 | + 0 |
3606 | + } |
3607 | + |
3608 | + smooth: true |
3609 | + state: mainImage.state |
3610 | + x: page.width / 2 |
3611 | + y: if (state === "Shown") |
3612 | + page.height / 2 |
3613 | + else if (state === "Hidden") |
3614 | + -page.height |
3615 | + else |
3616 | + page.height / 2 |
3617 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
3618 | + source: Util.dir + "cloud_storm_2.png" |
3619 | + } |
3620 | + Image { |
3621 | + id: hangerCloudStorm2 |
3622 | + height: sourceSize.height /2 |
3623 | + source: Util.dir+"cloud_storm_2_line.png" |
3624 | + opacity: cloudsImageStrom2.opacity |
3625 | + |
3626 | + y: cloudsImageStrom2.y - cloudsImageStrom2.sourceSize.height -(cloudsImageStrom2.sourceSize.height / 1.14) |
3627 | + x:cloudsImageStrom2.x + cloudsImageStrom2.width / 2.25 |
3628 | + } |
3629 | + // End cloudsImageStrom2 |
3630 | + |
3631 | + |
3632 | + |
3633 | + //cloudsImageStrom3 |
3634 | + Image { |
3635 | + id: cloudsImageStrom3 |
3636 | + width: sourceSize.width /2 |
3637 | + height: sourceSize.height /2 |
3638 | + smooth: true |
3639 | + opacity:{ |
3640 | + if (clouds === "Heavy rain") |
3641 | + 1 |
3642 | + else |
3643 | + 0 |
3644 | + } |
3645 | + |
3646 | + state: mainImage.state |
3647 | + x: page.width / 50 |
3648 | + y: if (state === "Shown") |
3649 | + page.height / 2.66 |
3650 | + else if (state === "Hidden") |
3651 | + -page.height |
3652 | + else |
3653 | + page.height / 2.66 |
3654 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
3655 | + source: Util.dir + "cloud_storm_3.png" |
3656 | + } |
3657 | + Image { |
3658 | + id: hangerCloudStorm3 |
3659 | + opacity: cloudsImageStrom3.opacity |
3660 | + height: sourceSize.height /2 |
3661 | + source: Util.dir+"cloud_storm_3_line.png" |
3662 | + y: cloudsImageStrom3.y - cloudsImageStrom3.sourceSize.height -(cloudsImageStrom3.sourceSize.height + cloudsImageStrom3.height /2) |
3663 | + x:cloudsImageStrom3.x + cloudsImageStrom3.width / 2.25 |
3664 | + } |
3665 | + // End cloudsImageStrom3 |
3666 | + |
3667 | + |
3668 | + //cloudsImageTStrom1 |
3669 | + Image { |
3670 | + id: cloudsImageTStorm1 |
3671 | + width: sourceSize.width /2 |
3672 | + height: sourceSize.height /2 |
3673 | + opacity:{ |
3674 | + if(clouds === "Rain showers") |
3675 | + 1 |
3676 | + else |
3677 | + 0 |
3678 | + } smooth: true |
3679 | + state: mainImage.state |
3680 | + x: page.width / 20 |
3681 | + y: if (state === "Shown") |
3682 | + page.height / 2 |
3683 | + else if (state === "Hidden") |
3684 | + -page.height |
3685 | + else |
3686 | + page.height / 2 |
3687 | + Behavior on y{NumberAnimation{duration: 1000;easing.type: Easing.OutBack}} |
3688 | + source: Util.dir + "cloud_tstorm_1.png" |
3689 | + } |
3690 | + Image { |
3691 | + id: hangerCloudTStorm1 |
3692 | + height: sourceSize.height /2 |
3693 | + source: Util.dir+"cloud_tstorm_1_line.png" |
3694 | + opacity: cloudsImageTStorm1.opacity |
3695 | + y: cloudsImageTStorm1.y - cloudsImageTStorm1.sourceSize.height -(cloudsImageTStorm1.sourceSize.height / 1.844) |
3696 | + x:cloudsImageTStorm1.width / 1.844 |
3697 | + } |
3698 | + // End cloudsImageTStorm1 |
3699 | + |
3700 | + |
3701 | + //cloudsImageTStorm2 |
3702 | + Image { |
3703 | + id: cloudsImageTStorm2 |
3704 | + width: sourceSize.width / 1.88 |
3705 | + height: sourceSize.height / 1.88 |
3706 | + smooth: true |
3707 | + opacity:{ |
3708 | + if(clouds === "Rain showers") |
3709 | + 1 |
3710 | + else |
3711 | + 0 |
3712 | + } |
3713 | + state: mainImage.state |
3714 | + x: page.width / 2 |
3715 | + y: if (state === "Shown") |
3716 | + page.height / 2 |
3717 | + else if (state === "Hidden") |
3718 | + -page.height |
3719 | + else |
3720 | + page.height / 2 |
3721 | + Behavior on y{NumberAnimation{duration: 1400;easing.type: Easing.OutBack}} |
3722 | + source: Util.dir + "cloud_tstorm_2.png" |
3723 | + } |
3724 | + Image { |
3725 | + id: hangerCloudTStorm2 |
3726 | + height: sourceSize.height /2 |
3727 | + opacity: cloudsImageTStorm2.opacity |
3728 | + source: Util.dir+"cloud_tstorm_2_line.png" |
3729 | + y: cloudsImageTStorm2.y - cloudsImageTStorm2.sourceSize.height -(cloudsImageTStorm2.sourceSize.height / 1.14) |
3730 | + x:cloudsImageTStorm2.x + cloudsImageTStorm2.width / 2.25 |
3731 | + } |
3732 | + // End cloudsImageTStorm2 |
3733 | + |
3734 | + |
3735 | + |
3736 | + //cloudsImageTStorm3 |
3737 | + Image { |
3738 | + id: cloudsImageTStorm3 |
3739 | + width: sourceSize.width /2 |
3740 | + height: sourceSize.height /2 |
3741 | + opacity:{ |
3742 | + if(clouds === "Rain showers") |
3743 | + 1 |
3744 | + else |
3745 | + 0 |
3746 | + } |
3747 | + smooth: true |
3748 | + state: mainImage.state |
3749 | + x: page.width / 50 |
3750 | + y: if (state === "Shown") |
3751 | + page.height / 2.66 |
3752 | + else if (state === "Hidden") |
3753 | + -page.height |
3754 | + else |
3755 | + page.height / 2.66 |
3756 | + Behavior on y{NumberAnimation{duration: 700;easing.type: Easing.OutBack}} |
3757 | + source: Util.dir + "cloud_storm_3.png" |
3758 | + } |
3759 | + Image { |
3760 | + id: hangerCloudTStorm3 |
3761 | + opacity: cloudsImageTStorm3.opacity |
3762 | + height: sourceSize.height /2 |
3763 | + source: Util.dir+"cloud_storm_3_line.png" |
3764 | + y: cloudsImageTStorm3.y - cloudsImageTStorm3.sourceSize.height -(cloudsImageTStorm3.sourceSize.height + cloudsImageTStorm3.height /2) |
3765 | + x:cloudsImageTStorm3.x + cloudsImageTStorm3.width / 2.25 |
3766 | + } |
3767 | + // End cloudsImageTStorm3 |
3768 | + |
3769 | + |
3770 | + |
3771 | + |
3772 | + |
3773 | + |
3774 | +//////////////// Particals and ShaderEffects for snow and rain |
3775 | + |
3776 | + //Snow |
3777 | + ImageParticle { |
3778 | + id:snowImagePartical |
3779 | + opacity: { |
3780 | + if (clouds === "Snow" && mainImage.state === "Shown" ) |
3781 | + 1 |
3782 | + else |
3783 | + 0 |
3784 | + } |
3785 | + Behavior on opacity{NumberAnimation{duration:400}} |
3786 | + width: page.width |
3787 | + height: page.height |
3788 | + x: page.width / 20 |
3789 | + y: page.height / 1.58 |
3790 | + system: snowSystem |
3791 | + source: Util.dir+"snow_flake_01.png" |
3792 | + color: "#FFFAFA" |
3793 | + clip: true |
3794 | + alpha: 0.8 |
3795 | + } |
3796 | + ParticleSystem { |
3797 | + id: snowSystem |
3798 | +// opacity: rainImagePartical.opacity |
3799 | + } |
3800 | + Emitter { |
3801 | + system: snowSystem |
3802 | + width: page.width |
3803 | + height: page.height |
3804 | + emitRate: 22 |
3805 | + lifeSpan: 9000 |
3806 | + size: page.width / 30 |
3807 | + sizeVariation:page.width / 9 |
3808 | + velocity: AngleDirection { |
3809 | + angleVariation: 90; |
3810 | + magnitude: 9 |
3811 | + } |
3812 | + maximumEmitted: 100 |
3813 | + startTime: 4000 |
3814 | + } |
3815 | + |
3816 | + //////////////////////////Rain |
3817 | + ImageParticle { |
3818 | + id:rainImagePartical |
3819 | + opacity: { |
3820 | + if (clouds === "Rain" && mainImage.state === "Shown" |
3821 | + || clouds === "Rain showers" && mainImage.state === "Shown" |
3822 | + || clouds === "Heavy rain" && mainImage.state === "Shown") |
3823 | + 1 |
3824 | + else |
3825 | + 0 |
3826 | + } |
3827 | + Behavior on opacity{NumberAnimation{duration:400}} |
3828 | + width: page.width |
3829 | + height: page.height / 12 |
3830 | + x: page.width / 20 |
3831 | + y: page.height / 1.58 |
3832 | + system: rainSystem |
3833 | + source: Util.dir+"rain_01.png" |
3834 | + color: "grey" |
3835 | + clip: false |
3836 | + alpha: 0.8 |
3837 | + } |
3838 | + ParticleSystem { |
3839 | + id: rainSystem |
3840 | + } |
3841 | + Emitter { |
3842 | + system: rainSystem |
3843 | + width: page.width |
3844 | + y:page.height / 1.5 |
3845 | + height: page.height / 4 |
3846 | + emitRate:{ |
3847 | + if(clouds === "Rain") |
3848 | + 120 |
3849 | + else if (clouds === "Rain showers") |
3850 | + 140 |
3851 | + else if (clouds === "Heavy rain") |
3852 | + 170 |
3853 | + else |
3854 | + 120 |
3855 | + } |
3856 | + lifeSpan: 900 |
3857 | + size: page.width |
3858 | + sizeVariation:page.width |
3859 | + velocity: AngleDirection { |
3860 | + angleVariation: 90; |
3861 | + magnitude: 9 |
3862 | + } |
3863 | + maximumEmitted: 100 |
3864 | + startTime: 4000 |
3865 | + } |
3866 | + |
3867 | + |
3868 | + |
3869 | + |
3870 | + |
3871 | + |
3872 | + |
3873 | + |
3874 | + |
3875 | +// ImageParticle {anchors.fill: parent ;system: particles1 ;source: "art/" ;color: "gray" ;clip: true; alpha: 0.8} |
3876 | +// ImageParticle {anchors.fill: parent ;system: particles2 ;source: "" ;color: "gray" ;clip: true; alpha: 1} |
3877 | +// ImageParticle {anchors.fill: parent ;system: particles3 ;source: "ar" ;color: "gray" ;clip: true; alpha: 0.8} |
3878 | +// ImageParticle {anchors.fill: parent ;system: particles4 ;source: "a" ;color: "gray" ;clip: true; alpha: 0.8} |
3879 | +// ImageParticle {anchors.fill: parent ;system: particles5 ;source: "a" ;color:"gray"; clip: true; alpha: .5} |
3880 | +// ImageParticle {anchors.fill: parent ;system: particles6 ;source: "art" ;color:"gray"; clip: true; alpha: .5*/} |
3881 | + |
3882 | + |
3883 | + |
3884 | + |
3885 | + |
3886 | + |
3887 | +// ParticleSystem { id: particles1 }Emitter {system: particles1; anchors.fill: parent ;emitRate: 1;lifeSpan: 8000 ;size: 24 ;sizeVariation: 50 ;velocity: AngleDirection { angleVariation: 180; magnitude: 10} maximumEmitted: 10 ;startTime: 2000} |
3888 | +// ParticleSystem { id: particles2 }Emitter {system: particles2; anchors.fill: parent ;emitRate: 3;lifeSpan: 10000 ;size: 24 ;sizeVariation: 50 ;velocity: AngleDirection { angleVariation: 180; magnitude: 12 } maximumEmitted: 9 ;startTime: 5000} |
3889 | +// ParticleSystem { id: particles3 }Emitter {system: particles3; anchors.fill: parent ;emitRate: 15;lifeSpan: 9000 ;size: 24 ;sizeVariation: 50 ;velocity: AngleDirection { angleVariation: 180; magnitude: 7 } maximumEmitted: 20 ;startTime: 5000} |
3890 | +// ParticleSystem { id: particles4 }Emitter {system: particles4; anchors.fill: parent ;emitRate: 2;lifeSpan: 9000 ;size: 24 ;sizeVariation: 25 ;velocity: AngleDirection { angleVariation: 180; magnitude: 7 } maximumEmitted: 20 ;startTime: 5000} |
3891 | +// ParticleSystem { id: particles5 }Emitter {system: particles5; anchors.fill: parent ;emitRate: 2;lifeSpan: 4000 ;size: 32 ;sizeVariation: 40 ;velocity: AngleDirection { angleVariation: 180; magnitude: 12 } maximumEmitted: 17 ;startTime: 5000} |
3892 | +// ParticleSystem { id: particles6 }Emitter {system: particles6; anchors.fill: parent ;emitRate: 2;lifeSpan: 4000 ;size: 32 ;sizeVariation: 40 ;velocity: AngleDirection { angleVariation: 180; magnitude: 12 } maximumEmitted: 4 ;startTime: 5000} |
3893 | + |
3894 | + |
3895 | + |
3896 | + |
3897 | + |
3898 | + |
3899 | + |
3900 | + |
3901 | + |
3902 | + |
3903 | + |
3904 | + |
3905 | + |
3906 | + |
3907 | + |
3908 | + |
3909 | + |
3910 | + |
3911 | + |
3912 | + |
3913 | + |
3914 | + |
3915 | + |
3916 | + |
3917 | + |
3918 | + |
3919 | + |
3920 | + |
3921 | + |
3922 | + |
3923 | + |
3924 | + |
3925 | + |
3926 | + |
3927 | + |
3928 | + |
3929 | + |
3930 | + |
3931 | + |
3932 | + |
3933 | + |
3934 | + |
3935 | +//////////////////////////////////// This is Details |
3936 | + Rectangle{ |
3937 | + id:detailsSlider |
3938 | + width: separator1.width |
3939 | + height: separator1.width * 1.5 |
3940 | + color: "#88000000" |
3941 | + state: "Hidden" |
3942 | + x: state === "Hidden" ? -separator1.width * 2 : 0 |
3943 | + Behavior on x{NumberAnimation{duration: 1200; easing.type: Easing.OutBack}} |
3944 | + Text { |
3945 | + id: conditions |
3946 | + height: 20 |
3947 | + width: separator1.width |
3948 | + text:"<b>Conditions: </b>"+clouds |
3949 | + color: "white" |
3950 | + font.pixelSize: 12 |
3951 | + anchors{ |
3952 | + top:detailsSlider.top |
3953 | + topMargin: detailsSlider.width / 2 |
3954 | + left: parent.left |
3955 | + leftMargin: parent.width / 20 |
3956 | + |
3957 | + } |
3958 | + } |
3959 | + Text { |
3960 | + id: humidityText |
3961 | + height: 20 |
3962 | + width: separator1.width |
3963 | + text:"<b>Wind Speed: </b>" + windSpeed + " \("+ windSpeedMPS +" Miles Per Second \) " |
3964 | + color: "white" |
3965 | + font.pixelSize: 12 |
3966 | + anchors{ |
3967 | + top:conditions.bottom |
3968 | + topMargin: 1 |
3969 | + left: parent.left |
3970 | + leftMargin: parent.width / 20 |
3971 | + |
3972 | + } |
3973 | + }Text { |
3974 | + id: dewPointTxt |
3975 | + height: 20 |
3976 | + width: separator1.width |
3977 | + text:"<b>Wind Direction: </b>" + windDirection |
3978 | + color: "white" |
3979 | + font.pixelSize: 12 |
3980 | + anchors{ |
3981 | + top:humidityText.bottom |
3982 | + topMargin: 1 |
3983 | + left: parent.left |
3984 | + leftMargin: parent.width / 20 |
3985 | + |
3986 | + } |
3987 | + } |
3988 | + |
3989 | + Text { |
3990 | + id: presureTxt |
3991 | + height: 20 |
3992 | + width: separator1.width |
3993 | + text:"<b>Pressure: </b>"+pressure |
3994 | + color: "white" |
3995 | + font.pixelSize: 12 |
3996 | + anchors{ |
3997 | + top:dewPointTxt.bottom |
3998 | + topMargin: 1 |
3999 | + left: parent.left |
4000 | + leftMargin: parent.width / 20 |
4001 | + |
4002 | + } |
4003 | + } Text { |
4004 | + id: timeFromTxt |
4005 | + height: 20 |
4006 | + width: separator1.width |
4007 | + text:"<b>Staring Observation Time: </b>"+timeFrom |
4008 | + color: "white" |
4009 | + font.pixelSize: 12 |
4010 | + anchors{ |
4011 | + top:presureTxt.bottom |
4012 | + topMargin: 1 |
4013 | + left: parent.left |
4014 | + leftMargin: parent.width / 20 |
4015 | + |
4016 | + } |
4017 | + } Text { |
4018 | + id: timeToTxt |
4019 | + height: 20 |
4020 | + width: separator1.width |
4021 | + text:"<b>Ending Observation Time: </b>"+timeTo |
4022 | + color: "white" |
4023 | + font.pixelSize: 12 |
4024 | + anchors{ |
4025 | + top:timeFromTxt.bottom |
4026 | + topMargin: 1 |
4027 | + left: parent.left |
4028 | + leftMargin: parent.width / 20 |
4029 | + |
4030 | + } |
4031 | + } |
4032 | + Text { |
4033 | + id: sunRiseTxt |
4034 | + height: 20 |
4035 | + width: separator1.width |
4036 | + text:"<b>Sun Rise: </b>"+sunRise |
4037 | + color: "white" |
4038 | + font.pixelSize: 12 |
4039 | + anchors{ |
4040 | + top:timeToTxt.bottom |
4041 | + topMargin: 1 |
4042 | + left: parent.left |
4043 | + leftMargin: parent.width / 20 |
4044 | + |
4045 | + } |
4046 | + } |
4047 | + Text { |
4048 | + id: sunSetTxt |
4049 | + height: 20 |
4050 | + width: separator1.width |
4051 | + text:"<b>Sun Set: </b>"+sunSet |
4052 | + color: "white" |
4053 | + font.pixelSize: 12 |
4054 | + anchors{ |
4055 | + top:sunRiseTxt.bottom |
4056 | + topMargin: 1 |
4057 | + left: parent.left |
4058 | + leftMargin: parent.width / 20 |
4059 | + |
4060 | + } |
4061 | + } |
4062 | + UbuntuShape{ |
4063 | + id:saveButton |
4064 | + width: separator1.width / 3 |
4065 | + height: separator1.width / 8 |
4066 | + color:"grey" |
4067 | + x: page.width / 3 |
4068 | + y: page.height / 1.5 |
4069 | + } |
4070 | + MouseArea{ |
4071 | + id:saveButtonMouseArea |
4072 | + anchors.fill: saveButton |
4073 | + onClicked: { |
4074 | + DataBase.createInitHomeTable() |
4075 | + DataBase.truncateHome() |
4076 | + DataBase.insertIntoTable() |
4077 | + savedTXT.opacity = 1 |
4078 | + savedTXT.scale = 1 |
4079 | + console.log( |
4080 | + DataBase.homeCountry() + "\n" |
4081 | + + DataBase.homeState() + "\n" |
4082 | + + DataBase.homeCity() +"\n" |
4083 | + + serie.countryName + "\n" |
4084 | + + serie.adminName1 +"\n" |
4085 | + + serie.name |
4086 | + |
4087 | + ) |
4088 | + } |
4089 | + |
4090 | + } |
4091 | + |
4092 | + Text { |
4093 | + id:detailsSaveButtonTxt |
4094 | + color:"#92FFFFFF" |
4095 | + anchors.centerIn: saveButtonMouseArea |
4096 | + text: "Save" |
4097 | + } |
4098 | + Text { |
4099 | + id: savedTXT |
4100 | + text: qsTr("Saved") |
4101 | + color: "white" |
4102 | + font.bold: true |
4103 | + font.pixelSize: 22 |
4104 | + scale: 0 |
4105 | + Behavior on scale {NumberAnimation{from:1;to:0;duration: 3700;easing.type: Easing.OutQuad}} |
4106 | + opacity: 0 |
4107 | + Behavior on opacity {} |
4108 | + x: (page.width / 2) - (width/2) |
4109 | + anchors{ |
4110 | + top: detailsSaveButtonTxt.bottom |
4111 | + } |
4112 | + } |
4113 | + }//Details Rec |
4114 | + |
4115 | + |
4116 | + |
4117 | + |
4118 | + // Details Button |
4119 | + UbuntuShape{ |
4120 | + id:detailsButton |
4121 | + width: separator1.width / 3 |
4122 | + height: separator1.width / 8 |
4123 | + color:"grey" |
4124 | + x: page.width - width |
4125 | + y: page.height - height |
4126 | + }Text { |
4127 | + id:detailsButtonTxt |
4128 | + color:"#92FFFFFF" |
4129 | + anchors.centerIn: detailsButton |
4130 | + text: "details" |
4131 | + }MouseArea{ |
4132 | + anchors.fill: detailsButtonTxt |
4133 | + onClicked: { |
4134 | + if (detailsSlider.state === "Hidden"){ |
4135 | + detailsSlider.x = 0 |
4136 | + detailsSlider.state = "Shown" |
4137 | + } else{ |
4138 | + detailsSlider.x = -separator1.width * 2 |
4139 | + detailsSlider.state = "Hidden" |
4140 | + } |
4141 | + |
4142 | + |
4143 | + } |
4144 | + } |
4145 | + |
4146 | + |
4147 | + }//Item |
4148 | + |
4149 | + |
4150 | + |
4151 | + |
4152 | + |
4153 | + |
4154 | + }//ListView |
4155 | + |
4156 | +}//Item |
4157 | |
4158 | === added file 'examples/WeatherModel.qml' |
4159 | --- examples/WeatherModel.qml 1970-01-01 00:00:00 +0000 |
4160 | +++ examples/WeatherModel.qml 2013-02-18 17:43:29 +0000 |
4161 | @@ -0,0 +1,21 @@ |
4162 | +import QtQuick 2.0 |
4163 | +import QtQuick.XmlListModel 2.0 |
4164 | +XmlListModel { |
4165 | + id: serieModel |
4166 | + function load(Name,North,South,East,West) { |
4167 | + console.log("Loading Weather For \n") |
4168 | +// source = "http://api.geonames.org/weatherXML?north="+North+"&south="+South+"&east="+East+"&west="+West+"&username=bobweaver12345" |
4169 | + reload() |
4170 | + } |
4171 | + source: '' |
4172 | + query: "//observation" |
4173 | + XmlRole { name: "observationTime"; query: "observationTime/string()" } |
4174 | + XmlRole { name: "temperature"; query: "temperature/string()" } |
4175 | + XmlRole { name: "dewPoint"; query: "dewPoint/string()" } |
4176 | + XmlRole { name: "humidity"; query: "humidity/string()" } |
4177 | + XmlRole { name: "clouds"; query: "clouds/string()" } |
4178 | + XmlRole { name: "weatherCondition"; query: "weatherCondition/string()"} |
4179 | + XmlRole { name: "status"; query: "Status/string()" } |
4180 | + XmlRole { name: "windDirection"; query: "windDirection/string()" } |
4181 | + XmlRole { name: "windSpeed"; query: "windSpeed/string()" } |
4182 | +} |
4183 | |
4184 | === removed directory 'po' |
4185 | === removed file 'po/po.pro' |
4186 | --- po/po.pro 2013-02-12 16:18:48 +0000 |
4187 | +++ po/po.pro 1970-01-01 00:00:00 +0000 |
4188 | @@ -1,48 +0,0 @@ |
4189 | -TEMPLATE = subdirs |
4190 | - |
4191 | -PROJECTNAME = $$system(basename ../*.qmlproject) |
4192 | -PROJECTNAME = $$replace(PROJECTNAME,.qmlproject,) |
4193 | - |
4194 | -SOURCECODE = ../*.qml |
4195 | - |
4196 | -message("") |
4197 | -message(" Project Name: $$PROJECTNAME ") |
4198 | -message(" Source Code: $$SOURCECODE ") |
4199 | -message("") |
4200 | -message(" run 'make pot' to generate the pot file from source code. ") |
4201 | -message(" run 'make translate' to create a new translation (po) based on pot. ") |
4202 | -message(" run 'make mo' to generate the mo files from po files. ") |
4203 | -message(" run 'qmake; make install' to install the mo files. ") |
4204 | -message("") |
4205 | - |
4206 | -## generate pot file 'make pot' |
4207 | -potfile.target = pot |
4208 | -potfile.commands = xgettext -o $${PROJECTNAME}.pot --package-name $${PROJECTNAME} --qt --c++ --add-comments=TRANSLATORS --keyword=tr $${SOURCECODE} |
4209 | -QMAKE_EXTRA_TARGETS += potfile |
4210 | - |
4211 | -## poedit target for new translations 'make translate' |
4212 | -poedit.target = translate |
4213 | -poedit.commands = cp messages.pot new_language.po; poedit new_language.po |
4214 | -QMAKE_EXTRA_TARGETS += poedit |
4215 | - |
4216 | -## generate mo files 'make mo' |
4217 | -mofiles.target = mo |
4218 | -mofiles.commands = msgfmt *.po |
4219 | -QMAKE_EXTRA_TARGETS += mofiles |
4220 | - |
4221 | -## Installation steps for mo files. 'make install' |
4222 | -MO_FILES = $$system(ls *.mo) |
4223 | - |
4224 | -install_mo_commands = |
4225 | -for(mo_file, MO_FILES) { |
4226 | - mo_name = $$replace(mo_file,.mo,) |
4227 | - mo_targetpath = $(INSTALL_ROOT)/usr/share/locale/$${mo_name}/LC_MESSAGES |
4228 | - mo_target = $${mo_targetpath}/$${PROJECTNAME}.mo |
4229 | - !isEmpty(install_mo_commands): install_mo_commands += && |
4230 | - install_mo_commands += test -d $$mo_targetpath || mkdir -p $$mo_targetpath |
4231 | - install_mo_commands += && cp $$mo_file $$mo_target |
4232 | -} |
4233 | - |
4234 | -install.commands = $$install_mo_commands |
4235 | -QMAKE_EXTRA_TARGETS += install |
4236 | - |
4237 | |
4238 | === removed file 'ubuntu-weather-app' |
4239 | --- ubuntu-weather-app 2013-02-12 16:27:32 +0000 |
4240 | +++ ubuntu-weather-app 1970-01-01 00:00:00 +0000 |
4241 | @@ -1,2 +0,0 @@ |
4242 | -#!/bin/bash |
4243 | -qmlscene /usr/share/ubuntu-weather-app/weather.qml |
4244 | |
4245 | === removed file 'ubuntu-weather-app.desktop' |
4246 | --- ubuntu-weather-app.desktop 2013-02-12 16:27:32 +0000 |
4247 | +++ ubuntu-weather-app.desktop 1970-01-01 00:00:00 +0000 |
4248 | @@ -1,8 +0,0 @@ |
4249 | -[Desktop Entry] |
4250 | -Encoding=UTF-8 |
4251 | -Version=1.0 |
4252 | -Type=Application |
4253 | -Terminal=false |
4254 | -Exec=/usr/bin/ubuntu-weather-app |
4255 | -Icon=/usr/share/ubuntu-weather-app/weather64.png |
4256 | -Name=Weather |
4257 | |
4258 | === removed file 'weather.qml' |
4259 | --- weather.qml 2013-02-12 16:27:32 +0000 |
4260 | +++ weather.qml 1970-01-01 00:00:00 +0000 |
4261 | @@ -1,71 +0,0 @@ |
4262 | -import QtQuick 2.0 |
4263 | -import Ubuntu.Components 0.1 |
4264 | - |
4265 | -/*! |
4266 | - \brief MainView with Tabs element. |
4267 | - First Tab has a single Label and |
4268 | - second Tab has a single ToolbarAction. |
4269 | -*/ |
4270 | - |
4271 | -MainView { |
4272 | - // objectName for functional testing purposes (autopilot-qt5) |
4273 | - objectName: "weather" |
4274 | - |
4275 | - width: units.gu(50) |
4276 | - height: units.gu(75) |
4277 | - |
4278 | - Tabs { |
4279 | - id: tabs |
4280 | - anchors.fill: parent |
4281 | - |
4282 | - // First tab begins here |
4283 | - Tab { |
4284 | - objectName: "Tab1" |
4285 | - |
4286 | - title: i18n.tr("Weather") |
4287 | - |
4288 | - // Tab content begins here |
4289 | - page: Page { |
4290 | - Column { |
4291 | - anchors.centerIn: parent |
4292 | - Label { |
4293 | - text: i18n.tr("Swipe from right to left to change tab.") |
4294 | - } |
4295 | - } |
4296 | - } |
4297 | - } |
4298 | - |
4299 | - // Second tab begins here |
4300 | - Tab { |
4301 | - objectName: "Tab2" |
4302 | - |
4303 | - title: i18n.tr("Optional Screen") |
4304 | - page: Page { |
4305 | - anchors.margins: units.gu(2) |
4306 | - |
4307 | - tools: ToolbarActions { |
4308 | - Action { |
4309 | - objectName: "action" |
4310 | - |
4311 | - iconSource: Qt.resolvedUrl("avatar.png") |
4312 | - text: i18n.tr("Tap me!") |
4313 | - |
4314 | - onTriggered: { |
4315 | - label.text = i18n.tr("Toolbar tapped") |
4316 | - } |
4317 | - } |
4318 | - } |
4319 | - |
4320 | - Column { |
4321 | - anchors.centerIn: parent |
4322 | - Label { |
4323 | - id: label |
4324 | - objectName: "label" |
4325 | - |
4326 | - text: i18n.tr("Swipe from bottom to up to reveal the toolbar.") |
4327 | - } |
4328 | - } |
4329 | - } |
4330 | - } |
4331 | - } |
4332 | -} |
4333 | |
4334 | === modified file 'weather.qmlproject' |
4335 | --- weather.qmlproject 2013-02-12 16:27:32 +0000 |
4336 | +++ weather.qmlproject 2013-02-18 17:43:29 +0000 |
4337 | @@ -3,7 +3,7 @@ |
4338 | import QmlProject 1.1 |
4339 | |
4340 | Project { |
4341 | - mainFile: "weather.qml" |
4342 | + mainFile: "Main.qml" |
4343 | |
4344 | /* Include .qml, .js, and image files from current directory and subdirectories */ |
4345 | QmlFiles { |
4346 | |
4347 | === added file 'weather.qmlproject.user' |
4348 | --- weather.qmlproject.user 1970-01-01 00:00:00 +0000 |
4349 | +++ weather.qmlproject.user 2013-02-18 17:43:29 +0000 |
4350 | @@ -0,0 +1,203 @@ |
4351 | +<?xml version="1.0" encoding="UTF-8"?> |
4352 | +<!DOCTYPE QtCreatorProject> |
4353 | +<!-- Written by Qt Creator 2.6.2, 2013-02-18T10:31:37. --> |
4354 | +<qtcreator> |
4355 | + <data> |
4356 | + <variable>ProjectExplorer.Project.ActiveTarget</variable> |
4357 | + <value type="int">1</value> |
4358 | + </data> |
4359 | + <data> |
4360 | + <variable>ProjectExplorer.Project.EditorSettings</variable> |
4361 | + <valuemap type="QVariantMap"> |
4362 | + <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
4363 | + <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
4364 | + <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
4365 | + <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
4366 | + <value type="QString" key="language">Cpp</value> |
4367 | + <valuemap type="QVariantMap" key="value"> |
4368 | + <value type="QString" key="CurrentPreferences">CppGlobal</value> |
4369 | + </valuemap> |
4370 | + </valuemap> |
4371 | + <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
4372 | + <value type="QString" key="language">QmlJS</value> |
4373 | + <valuemap type="QVariantMap" key="value"> |
4374 | + <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
4375 | + </valuemap> |
4376 | + </valuemap> |
4377 | + <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
4378 | + <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> |
4379 | + <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
4380 | + <value type="int" key="EditorConfiguration.IndentSize">4</value> |
4381 | + <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
4382 | + <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
4383 | + <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
4384 | + <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
4385 | + <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
4386 | + <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
4387 | + <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
4388 | + <value type="int" key="EditorConfiguration.TabSize">8</value> |
4389 | + <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
4390 | + <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
4391 | + <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
4392 | + <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
4393 | + <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
4394 | + <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
4395 | + </valuemap> |
4396 | + </data> |
4397 | + <data> |
4398 | + <variable>ProjectExplorer.Project.PluginSettings</variable> |
4399 | + <valuemap type="QVariantMap"/> |
4400 | + </data> |
4401 | + <data> |
4402 | + <variable>ProjectExplorer.Project.Target.0</variable> |
4403 | + <valuemap type="QVariantMap"> |
4404 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">5.0.0 stable</value> |
4405 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">5.0.0 stable</value> |
4406 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">{47354fd8-a5b8-4631-a8c9-ed2cde418720}</value> |
4407 | + <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value> |
4408 | + <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
4409 | + <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
4410 | + <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value> |
4411 | + <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
4412 | + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
4413 | + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
4414 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
4415 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
4416 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
4417 | + </valuemap> |
4418 | + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
4419 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
4420 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
4421 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
4422 | + </valuemap> |
4423 | + <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
4424 | + <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
4425 | + <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
4426 | + <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
4427 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
4428 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
4429 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
4430 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
4431 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
4432 | + <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
4433 | + <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
4434 | + <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
4435 | + <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
4436 | + <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
4437 | + <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
4438 | + <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
4439 | + <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
4440 | + <value type="int">0</value> |
4441 | + <value type="int">1</value> |
4442 | + <value type="int">2</value> |
4443 | + <value type="int">3</value> |
4444 | + <value type="int">4</value> |
4445 | + <value type="int">5</value> |
4446 | + <value type="int">6</value> |
4447 | + <value type="int">7</value> |
4448 | + <value type="int">8</value> |
4449 | + <value type="int">9</value> |
4450 | + <value type="int">10</value> |
4451 | + <value type="int">11</value> |
4452 | + <value type="int">12</value> |
4453 | + <value type="int">13</value> |
4454 | + <value type="int">14</value> |
4455 | + </valuelist> |
4456 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value> |
4457 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value> |
4458 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value> |
4459 | + <value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value> |
4460 | + <value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value> |
4461 | + <valuelist type="QVariantList" key="QmlProjectManager.QmlRunConfiguration.UserEnvironmentChanges"/> |
4462 | + <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
4463 | + <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> |
4464 | + <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
4465 | + <value type="bool" key="RunConfiguration.UseQmlDebugger">true</value> |
4466 | + <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
4467 | + </valuemap> |
4468 | + <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
4469 | + </valuemap> |
4470 | + </data> |
4471 | + <data> |
4472 | + <variable>ProjectExplorer.Project.Target.1</variable> |
4473 | + <valuemap type="QVariantMap"> |
4474 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">5.0.1 </value> |
4475 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">5.0.1 </value> |
4476 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">{85f07aa6-a0b3-43fd-9d37-16ccf05f78b5}</value> |
4477 | + <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value> |
4478 | + <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
4479 | + <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
4480 | + <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value> |
4481 | + <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
4482 | + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
4483 | + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
4484 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
4485 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
4486 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
4487 | + </valuemap> |
4488 | + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
4489 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
4490 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
4491 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
4492 | + </valuemap> |
4493 | + <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
4494 | + <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
4495 | + <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
4496 | + <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
4497 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
4498 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
4499 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
4500 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
4501 | + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
4502 | + <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
4503 | + <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
4504 | + <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
4505 | + <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
4506 | + <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
4507 | + <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
4508 | + <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
4509 | + <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
4510 | + <value type="int">0</value> |
4511 | + <value type="int">1</value> |
4512 | + <value type="int">2</value> |
4513 | + <value type="int">3</value> |
4514 | + <value type="int">4</value> |
4515 | + <value type="int">5</value> |
4516 | + <value type="int">6</value> |
4517 | + <value type="int">7</value> |
4518 | + <value type="int">8</value> |
4519 | + <value type="int">9</value> |
4520 | + <value type="int">10</value> |
4521 | + <value type="int">11</value> |
4522 | + <value type="int">12</value> |
4523 | + <value type="int">13</value> |
4524 | + <value type="int">14</value> |
4525 | + </valuelist> |
4526 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value> |
4527 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value> |
4528 | + <value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value> |
4529 | + <value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value> |
4530 | + <value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value> |
4531 | + <valuelist type="QVariantList" key="QmlProjectManager.QmlRunConfiguration.UserEnvironmentChanges"/> |
4532 | + <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
4533 | + <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> |
4534 | + <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
4535 | + <value type="bool" key="RunConfiguration.UseQmlDebugger">true</value> |
4536 | + <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
4537 | + </valuemap> |
4538 | + <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
4539 | + </valuemap> |
4540 | + </data> |
4541 | + <data> |
4542 | + <variable>ProjectExplorer.Project.TargetCount</variable> |
4543 | + <value type="int">2</value> |
4544 | + </data> |
4545 | + <data> |
4546 | + <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
4547 | + <value type="QString">{014596af-77d7-45e2-86ac-344cb0e4f934}</value> |
4548 | + </data> |
4549 | + <data> |
4550 | + <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
4551 | + <value type="int">12</value> |
4552 | + </data> |
4553 | +</qtcreator> |
4554 | |
4555 | === removed file 'weather64.png' |
4556 | Binary files weather64.png 2013-02-12 16:27:32 +0000 and weather64.png 1970-01-01 00:00:00 +0000 differ |
Thanks a lot Joseph!
While reviewing, one of the first things I've noticed is that there are about 70 lines of commented-out code on Home.qml. If that code is not used, it should be removed. We shouldn't be committing dead code. Do you think you could fix this?
Also, could you make sure that the design conforms to the mockups the design team submitted at:
https:/ /wiki.ubuntu. com/Touch/ CoreApps/ Weather
I'd also recommend coordinating such big changes with the current Weather team on the ubuntu-phone mailing list to avoid duplication of work.
If you could address those issues and re-submit, that'd be great. Thanks again!