author | sudonix <sudonix> | 2004-02-15 00:16:06 (UTC) |
---|---|---|
committer | sudonix <sudonix> | 2004-02-15 00:16:06 (UTC) |
commit | a69419579abfd56b8b3fd7bd600e46267f09d1ce (patch) (unidiff) | |
tree | af3169cb21baac87307a3085f3dd030bc8626ccb | |
parent | 69e24ece89e6ec530bb5e5614a2e2125e76525a9 (diff) | |
download | opie-a69419579abfd56b8b3fd7bd600e46267f09d1ce.zip opie-a69419579abfd56b8b3fd7bd600e46267f09d1ce.tar.gz opie-a69419579abfd56b8b3fd7bd600e46267f09d1ce.tar.bz2 |
A small typo fixed
-rw-r--r-- | noncore/todayplugins/weather/weatherpluginwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp index 8440f20..4491b91 100644 --- a/noncore/todayplugins/weather/weatherpluginwidget.cpp +++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp | |||
@@ -213,97 +213,97 @@ void WeatherPluginWidget::getWind( const QString &data ) | |||
213 | dataStr = tr( "SW " ); | 213 | dataStr = tr( "SW " ); |
214 | else if ( value >= 248 && value < 294 ) | 214 | else if ( value >= 248 && value < 294 ) |
215 | dataStr = tr( "S " ); | 215 | dataStr = tr( "S " ); |
216 | else if ( value >= 294 && value < 238 ) | 216 | else if ( value >= 294 && value < 238 ) |
217 | dataStr = tr( "SE " ); | 217 | dataStr = tr( "SE " ); |
218 | } | 218 | } |
219 | if ( data.mid( pos + 5, 1) == "G" || | 219 | if ( data.mid( pos + 5, 1) == "G" || |
220 | data.mid( pos + 5, 1) == "K" ) | 220 | data.mid( pos + 5, 1) == "K" ) |
221 | { | 221 | { |
222 | value = data.mid( pos + 3, 2 ).toInt( &ok ); | 222 | value = data.mid( pos + 3, 2 ).toInt( &ok ); |
223 | } | 223 | } |
224 | else | 224 | else |
225 | { | 225 | { |
226 | value = data.mid( pos + 3, 3 ).toInt( &ok ); | 226 | value = data.mid( pos + 3, 3 ).toInt( &ok ); |
227 | } | 227 | } |
228 | if ( useMetric ) | 228 | if ( useMetric ) |
229 | { | 229 | { |
230 | value = value * 3.6 / 1.94; | 230 | value = value * 3.6 / 1.94; |
231 | dataStr.append( QString::number( value ) ); | 231 | dataStr.append( QString::number( value ) ); |
232 | dataStr.append( tr( " KPH" ) ); | 232 | dataStr.append( tr( " KPH" ) ); |
233 | } | 233 | } |
234 | else | 234 | else |
235 | { | 235 | { |
236 | value = value * 2.24 / 1.94; | 236 | value = value * 2.24 / 1.94; |
237 | dataStr.append( QString::number( value ) ); | 237 | dataStr.append( QString::number( value ) ); |
238 | dataStr.append( tr( " MPH" ) ); | 238 | dataStr.append( tr( " MPH" ) ); |
239 | } | 239 | } |
240 | } | 240 | } |
241 | else | 241 | else |
242 | { | 242 | { |
243 | dataStr = tr( "n/a" ); | 243 | dataStr = tr( "n/a" ); |
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
247 | void WeatherPluginWidget::getPressure( const QString &data ) | 247 | void WeatherPluginWidget::getPressure( const QString &data ) |
248 | { | 248 | { |
249 | float value; | 249 | float value; |
250 | bool ok; | 250 | bool ok; |
251 | 251 | ||
252 | int pos = data.find( QRegExp( "[AQ][0-9]+" ), 20 ); | 252 | int pos = data.find( QRegExp( "[AQ][0-9]+" ), 20 ); |
253 | if ( pos > -1 ) | 253 | if ( pos > -1 ) |
254 | { | 254 | { |
255 | value = data.mid( pos + 1, 4 ).toFloat( &ok ); | 255 | value = data.mid( pos + 1, 4 ).toFloat( &ok ); |
256 | if ( useMetric ) | 256 | if ( useMetric ) |
257 | { | 257 | { |
258 | if ( data.mid( pos, 1 ) == "A" ) | 258 | if ( data.mid( pos, 1 ) == "A" ) |
259 | value *= 33.8639 / 100; | 259 | value *= 33.8639 / 100; |
260 | dataStr = QString::number( value, 'f', 2 ); | 260 | dataStr = QString::number( value, 'f', 2 ); |
261 | dataStr.append( tr( " hPa" ) ); | 261 | dataStr.append( tr( " kPa" ) ); |
262 | } | 262 | } |
263 | else | 263 | else |
264 | { | 264 | { |
265 | if ( data.mid( pos, 1 ) == "Q" ) | 265 | if ( data.mid( pos, 1 ) == "Q" ) |
266 | value /= 33.8639; | 266 | value /= 33.8639; |
267 | else | 267 | else |
268 | value /= 100; | 268 | value /= 100; |
269 | dataStr = QString::number( value, 'f', 2 ); | 269 | dataStr = QString::number( value, 'f', 2 ); |
270 | dataStr.append( tr( " Hg" ) ); | 270 | dataStr.append( tr( " Hg" ) ); |
271 | } | 271 | } |
272 | } | 272 | } |
273 | else | 273 | else |
274 | { | 274 | { |
275 | dataStr = tr( "n/a" ); | 275 | dataStr = tr( "n/a" ); |
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||
279 | void WeatherPluginWidget::getIcon(const QString &data ) | 279 | void WeatherPluginWidget::getIcon(const QString &data ) |
280 | { | 280 | { |
281 | dataStr = "psunny"; | 281 | dataStr = "psunny"; |
282 | if ( data.find( "CLR ", 20 ) > -1 || | 282 | if ( data.find( "CLR ", 20 ) > -1 || |
283 | data.find( "SKC ", 20 ) > -1 || | 283 | data.find( "SKC ", 20 ) > -1 || |
284 | data.find( "CAVOK ", 20 ) > -1 ) | 284 | data.find( "CAVOK ", 20 ) > -1 ) |
285 | { | 285 | { |
286 | dataStr = "sunny"; | 286 | dataStr = "sunny"; |
287 | } | 287 | } |
288 | else if ( data.find( "SH ", 20 ) > -1 || | 288 | else if ( data.find( "SH ", 20 ) > -1 || |
289 | data.find( "DZ ", 20 ) > -1 || | 289 | data.find( "DZ ", 20 ) > -1 || |
290 | data.find( "RA ", 20 ) > -1 || | 290 | data.find( "RA ", 20 ) > -1 || |
291 | data.find( "UP ", 20 ) > -1 || | 291 | data.find( "UP ", 20 ) > -1 || |
292 | data.find( "BR ", 20 ) > -1 ) | 292 | data.find( "BR ", 20 ) > -1 ) |
293 | { | 293 | { |
294 | dataStr = "shower"; | 294 | dataStr = "shower"; |
295 | } | 295 | } |
296 | else if ( data.find( "TS ", 20 ) > -1 ) | 296 | else if ( data.find( "TS ", 20 ) > -1 ) |
297 | { | 297 | { |
298 | dataStr = "tstorm"; | 298 | dataStr = "tstorm"; |
299 | } | 299 | } |
300 | else if ( data.find( "SN ", 20 ) > -1 || | 300 | else if ( data.find( "SN ", 20 ) > -1 || |
301 | data.find( "SG ", 20 ) > -1 ) | 301 | data.find( "SG ", 20 ) > -1 ) |
302 | { | 302 | { |
303 | dataStr = "snow"; | 303 | dataStr = "snow"; |
304 | } | 304 | } |
305 | else if ( data.find( "FZ ", 20 ) > -1 || | 305 | else if ( data.find( "FZ ", 20 ) > -1 || |
306 | data.find( "GR ", 20 ) > -1 || | 306 | data.find( "GR ", 20 ) > -1 || |
307 | data.find( "GS ", 20 ) > -1 || | 307 | data.find( "GS ", 20 ) > -1 || |
308 | data.find( "PE ", 20 ) > -1 || | 308 | data.find( "PE ", 20 ) > -1 || |
309 | data.find( "IC ", 20 ) > -1 ) | 309 | data.find( "IC ", 20 ) > -1 ) |