~fginther/ubuntu-weather-app/cmake-plus-weather-channel-2

« back to all changes in this revision

Viewing changes to components/LocationTab.qml

  • Committer: Martin Borho
  • Date: 2014-01-22 22:02:58 UTC
  • Revision ID: martin@borho.net-20140122220258-zmreq3ms4bram24i
TWC, for real this time

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                    dateRel: "",//Tomorrow",
68
68
                    date: formatTimestamp(dailyForecasts[x].date, 'dddd, dd MMMM'),
69
69
                    temp: (dailyForecasts[x]["current"] === undefined) ? dailyForecasts[x][units].tempMax :
70
 
                                                dailyForecasts[x]["current"][units].temp,
71
 
                    tempMin: dailyForecasts[x][units].tempMin,
72
 
                    tempMax: (dailyForecasts[x]["current"] !== undefined) ? dailyForecasts[x][units].tempMax : null,
 
70
                        dailyForecasts[x]["current"][units].temp,
 
71
                    tempMin: dailyForecasts[x][units].tempMin.toString(),
 
72
                    tempMax: (dailyForecasts[x]["current"] !== undefined
 
73
                        && dailyForecasts[x][units].tempMax !== undefined) ? dailyForecasts[x][units].tempMax.toString() : "",
73
74
                    condIcon: dailyForecasts[x].icon,
74
75
                    wind_speed: dailyForecasts[x][wind_units].windSpeed,
75
76
                    wind_dir: dailyForecasts[x].windDir,
76
77
                    humid: dailyForecasts[x].humidity,
77
78
                    precip: +(dailyForecasts[x][precip_units].rain || dailyForecasts[x][precip_units].snow || 0).toFixed(2),
78
79
                    prop_precip: ((dailyForecasts[x].propPrecip !== undefined  && ""+dailyForecasts[x].propPrecip) || ""),
 
80
                    precip_type: dailyForecasts[x].precipType || "",
 
81
                    uv: (dailyForecasts[x].uv !== undefined) ? dailyForecasts[x].uv.toString() : "",
79
82
                    press: dailyForecasts[x].pressure || false,
80
83
                    hours: dailyForecasts[x]["hourly"]
81
84
                });
144
147
                        humidity: humid
145
148
                        precipitation: precip
146
149
                        propPrecip: prop_precip
 
150
                        precipType: precip_type
147
151
                        pressure: press
 
152
                        uvIndex: uv
148
153
                        hourly: hours
149
154
                        anchors.top: dateComponent.bottom
150
155
                        showMaxTemp: (index === 0)