• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • weather
BBCParser.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2009 Bastian Holst <bastianholst@gmx.de>
9 //
10 
11 // Self
12 #include "BBCParser.h"
13 
14 // Marble
15 #include "MarbleGlobal.h"
16 #include "WeatherData.h"
17 #include "BBCWeatherItem.h"
18 #include "MarbleDebug.h"
19 
20 // Qt
21 #include <QByteArray>
22 #include <QDateTime>
23 #include <QFile>
24 #include <QMutexLocker>
25 #include <QRegExp>
26 
27 using namespace Marble;
28 
29 BBCParser::BBCParser( QObject *parent ) :
30  AbstractWorkerThread( parent ),
31  m_dayConditions(),
32  m_nightConditions(),
33  m_windDirections(),
34  m_pressureDevelopments(),
35  m_visibilityStates(),
36  m_monthNames()
37 {
38  m_dayConditions["sunny"] = WeatherData::ClearDay;
39  m_dayConditions["clear"] = WeatherData::ClearDay;
40  m_dayConditions["clear sky"] = WeatherData::ClearDay;
41  m_dayConditions["sunny intervals"] = WeatherData::FewCloudsDay;
42  m_dayConditions["partly cloudy"] = WeatherData::PartlyCloudyDay;
43  m_dayConditions["white cloud"] = WeatherData::Overcast;
44  m_dayConditions["grey cloud"] = WeatherData::Overcast;
45  m_dayConditions["cloudy"] = WeatherData::Overcast;
46  m_dayConditions["drizzle"] = WeatherData::LightRain;
47  m_dayConditions["misty"] = WeatherData::Mist;
48  m_dayConditions["mist"] = WeatherData::Mist;
49  m_dayConditions["fog"] = WeatherData::Mist;
50  m_dayConditions["foggy"] = WeatherData::Mist;
51  m_dayConditions["dense fog"] = WeatherData::Mist;
52  m_dayConditions["Thick Fog"] = WeatherData::Mist;
53  m_dayConditions["tropical storm"] = WeatherData::Thunderstorm;
54  m_dayConditions["hazy"] = WeatherData::Mist;
55  m_dayConditions["light shower"] = WeatherData::LightShowersDay;
56  m_dayConditions["light rain shower"] = WeatherData::LightShowersDay;
57  m_dayConditions["light showers"] = WeatherData::LightShowersDay;
58  m_dayConditions["light rain"] = WeatherData::ShowersDay;
59  m_dayConditions["heavy rain"] = WeatherData::Rain;
60  m_dayConditions["heavy showers"] = WeatherData::Rain;
61  m_dayConditions["heavy shower"] = WeatherData::Rain;
62  m_dayConditions["heavy rain shower"] = WeatherData::Rain;
63  m_dayConditions["thundery shower"] = WeatherData::Thunderstorm;
64  m_dayConditions["thunderstorm"] = WeatherData::Thunderstorm;
65  m_dayConditions["thunder storm"] = WeatherData::Thunderstorm;
66  m_dayConditions["cloudy with sleet"] = WeatherData::RainSnow;
67  m_dayConditions["sleet shower"] = WeatherData::RainSnow;
68  m_dayConditions["sleet showers"] = WeatherData::RainSnow;
69  m_dayConditions["sleet"] = WeatherData::RainSnow;
70  m_dayConditions["cloudy with hail"] = WeatherData::Hail;
71  m_dayConditions["hail shower"] = WeatherData::Hail;
72  m_dayConditions["hail showers"] = WeatherData::Hail;
73  m_dayConditions["hail"] = WeatherData::Hail;
74  m_dayConditions["light snow"] = WeatherData::LightSnow;
75  m_dayConditions["light snow shower"] = WeatherData::ChanceSnowDay;
76  m_dayConditions["light snow showers"] = WeatherData::ChanceSnowDay;
77  m_dayConditions["cloudy with light snow"] = WeatherData::LightSnow;
78  m_dayConditions["heavy snow"] = WeatherData::Snow;
79  m_dayConditions["heavy snow shower"] = WeatherData::Snow;
80  m_dayConditions["heavy snow showers"] = WeatherData::Snow;
81  m_dayConditions["cloudy with heavy snow"] = WeatherData::Snow;
82  m_dayConditions["sandstorm"] = WeatherData::SandStorm;
83  m_dayConditions["na"] = WeatherData::ConditionNotAvailable;
84  m_dayConditions["N/A"] = WeatherData::ConditionNotAvailable;
85 
86  m_nightConditions["sunny"] = WeatherData::ClearNight;
87  m_nightConditions["clear"] = WeatherData::ClearNight;
88  m_nightConditions["clear sky"] = WeatherData::ClearNight;
89  m_nightConditions["sunny intervals"] = WeatherData::FewCloudsNight;
90  m_nightConditions["partly cloudy"] = WeatherData::PartlyCloudyNight;
91  m_nightConditions["white cloud"] = WeatherData::Overcast;
92  m_nightConditions["grey cloud"] = WeatherData::Overcast;
93  m_nightConditions["cloudy"] = WeatherData::Overcast;
94  m_nightConditions["drizzle"] = WeatherData::LightRain;
95  m_nightConditions["misty"] = WeatherData::Mist;
96  m_nightConditions["mist"] = WeatherData::Mist;
97  m_nightConditions["fog"] = WeatherData::Mist;
98  m_nightConditions["foggy"] = WeatherData::Mist;
99  m_nightConditions["dense fog"] = WeatherData::Mist;
100  m_nightConditions["Thick Fog"] = WeatherData::Mist;
101  m_nightConditions["tropical storm"] = WeatherData::Thunderstorm;
102  m_nightConditions["hazy"] = WeatherData::Mist;
103  m_nightConditions["light shower"] = WeatherData::LightShowersNight;
104  m_nightConditions["light rain shower"] = WeatherData::LightShowersNight;
105  m_nightConditions["light showers"] = WeatherData::LightShowersNight;
106  m_nightConditions["light rain"] = WeatherData::ShowersNight;
107  m_nightConditions["heavy rain"] = WeatherData::Rain;
108  m_nightConditions["heavy showers"] = WeatherData::Rain;
109  m_nightConditions["heavy shower"] = WeatherData::Rain;
110  m_nightConditions["heavy rain shower"] = WeatherData::Rain;
111  m_nightConditions["thundery shower"] = WeatherData::Thunderstorm;
112  m_nightConditions["thunderstorm"] = WeatherData::Thunderstorm;
113  m_nightConditions["thunder storm"] = WeatherData::Thunderstorm;
114  m_nightConditions["cloudy with sleet"] = WeatherData::RainSnow;
115  m_nightConditions["sleet shower"] = WeatherData::RainSnow;
116  m_nightConditions["sleet showers"] = WeatherData::RainSnow;
117  m_nightConditions["sleet"] = WeatherData::RainSnow;
118  m_nightConditions["cloudy with hail"] = WeatherData::Hail;
119  m_nightConditions["hail shower"] = WeatherData::Hail;
120  m_nightConditions["hail showers"] = WeatherData::Hail;
121  m_nightConditions["hail"] = WeatherData::Hail;
122  m_nightConditions["light snow"] = WeatherData::LightSnow;
123  m_nightConditions["light snow shower"] = WeatherData::ChanceSnowNight;
124  m_nightConditions["light snow showers"] = WeatherData::ChanceSnowNight;
125  m_nightConditions["cloudy with light snow"] = WeatherData::LightSnow;
126  m_nightConditions["heavy snow"] = WeatherData::Snow;
127  m_nightConditions["heavy snow shower"] = WeatherData::Snow;
128  m_nightConditions["heavy snow showers"] = WeatherData::Snow;
129  m_nightConditions["cloudy with heavy snow"] = WeatherData::Snow;
130  m_nightConditions["sandstorm"] = WeatherData::SandStorm;
131  m_nightConditions["na"] = WeatherData::ConditionNotAvailable;
132  m_nightConditions["N/A"] = WeatherData::ConditionNotAvailable;
133 
134  m_windDirections["N"] = WeatherData::N;
135  m_windDirections["NE"] = WeatherData::NE;
136  m_windDirections["ENE"] = WeatherData::ENE;
137  m_windDirections["NNE"] = WeatherData::NNE;
138  m_windDirections["E"] = WeatherData::E;
139  m_windDirections["SSE"] = WeatherData::SSE;
140  m_windDirections["SE"] = WeatherData::SE;
141  m_windDirections["ESE"] = WeatherData::ESE;
142  m_windDirections["S"] = WeatherData::S;
143  m_windDirections["NNW"] = WeatherData::NNW;
144  m_windDirections["NW"] = WeatherData::NW;
145  m_windDirections["WNW"] = WeatherData::WNW;
146  m_windDirections["W"] = WeatherData::W;
147  m_windDirections["SSW"] = WeatherData::SSW;
148  m_windDirections["SW"] = WeatherData::SW;
149  m_windDirections["WSW"] = WeatherData::WSW;
150  m_windDirections["N/A"] = WeatherData::DirectionNotAvailable;
151 
152  m_pressureDevelopments["falling"] = WeatherData::Falling;
153  m_pressureDevelopments["no change"] = WeatherData::NoChange;
154  m_pressureDevelopments["steady"] = WeatherData::NoChange;
155  m_pressureDevelopments["rising"] = WeatherData::Rising;
156  m_pressureDevelopments["N/A"] = WeatherData::PressureDevelopmentNotAvailable;
157 
158  m_visibilityStates["excellent"] = WeatherData::VeryGood;
159  m_visibilityStates["very good"] = WeatherData::VeryGood;
160  m_visibilityStates["good"] = WeatherData::Good;
161  m_visibilityStates["moderate"] = WeatherData::Normal;
162  m_visibilityStates["poor"] = WeatherData::Poor;
163  m_visibilityStates["very poor"] = WeatherData::VeryPoor;
164  m_visibilityStates["fog"] = WeatherData::Fog;
165  m_visibilityStates["n/a"] = WeatherData::VisibilityNotAvailable;
166 
167  m_monthNames["Jan"] = 1;
168  m_monthNames["Feb"] = 2;
169  m_monthNames["Mar"] = 3;
170  m_monthNames["Apr"] = 4;
171  m_monthNames["May"] = 5;
172  m_monthNames["Jun"] = 6;
173  m_monthNames["Jul"] = 7;
174  m_monthNames["Aug"] = 8;
175  m_monthNames["Sep"] = 9;
176  m_monthNames["Oct"] = 10;
177  m_monthNames["Nov"] = 11;
178  m_monthNames["Dec"] = 12;
179 }
180 
181 BBCParser::~BBCParser()
182 {
183 }
184 
185 BBCParser *BBCParser::instance()
186 {
187  static BBCParser parser;
188  return &parser;
189 }
190 
191 void BBCParser::scheduleRead( const QString& path,
192  BBCWeatherItem *item,
193  const QString& type )
194 {
195  ScheduleEntry entry;
196  entry.path = path;
197  entry.item = item;
198  entry.type = type;
199 
200  m_scheduleMutex.lock();
201  m_schedule.push( entry );
202  m_scheduleMutex.unlock();
203 
204  ensureRunning();
205 }
206 
207 bool BBCParser::workAvailable()
208 {
209  QMutexLocker locker( &m_scheduleMutex );
210  return !m_schedule.isEmpty();
211 }
212 
213 void BBCParser::work()
214 {
215  m_scheduleMutex.lock();
216  ScheduleEntry entry = m_schedule.pop();
217  m_scheduleMutex.unlock();
218 
219  QFile file( entry.path );
220  if( !file.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
221  return;
222  }
223 
224  QList<WeatherData> data = read( &file );
225 
226  if( !data.isEmpty() && !entry.item.isNull() ) {
227  if ( entry.type == "bbcobservation" ) {
228  entry.item->setCurrentWeather( data.at( 0 ) );
229  }
230  else if ( entry.type == "bbcforecast" ) {
231  entry.item->addForecastWeather( data );
232  }
233 
234  emit parsedFile();
235  }
236 }
237 
238 QList<WeatherData> BBCParser::read( QIODevice *device )
239 {
240  m_list.clear();
241  setDevice( device );
242 
243  while ( !atEnd() ) {
244  readNext();
245 
246  if ( isStartElement() ) {
247  if ( name() == "rss" )
248  readBBC();
249  else
250  raiseError( QObject::tr("The file is not a valid BBC answer.") );
251  }
252  }
253 
254  return m_list;
255 }
256 
257 void BBCParser::readUnknownElement()
258 {
259  Q_ASSERT( isStartElement() );
260 
261  while ( !atEnd() ) {
262  readNext();
263 
264  if ( isEndElement() )
265  break;
266 
267  if ( isStartElement() )
268  readUnknownElement();
269  }
270 }
271 
272 void BBCParser::readBBC()
273 {
274  Q_ASSERT( isStartElement()
275  && name() == "rss" );
276 
277  while( !atEnd() ) {
278  readNext();
279 
280  if( isEndElement() )
281  break;
282 
283  if( isStartElement() ) {
284  if( name() == "channel" )
285  readChannel();
286  else
287  readUnknownElement();
288  }
289  }
290 }
291 
292 void BBCParser::readChannel()
293 {
294  Q_ASSERT( isStartElement()
295  && name() == "channel" );
296 
297  while( !atEnd() ) {
298  readNext();
299 
300  if( isEndElement() )
301  break;
302 
303  if( isStartElement() ) {
304  if( name() == "item" )
305  readItem();
306  else
307  readUnknownElement();
308  }
309  }
310 }
311 
312 void BBCParser::readItem()
313 {
314  Q_ASSERT( isStartElement()
315  && name() == "item" );
316 
317  WeatherData item;
318 
319  while( !atEnd() ) {
320  readNext();
321 
322  if( isEndElement() )
323  break;
324 
325  if( isStartElement() ) {
326  if( name() == "description" )
327  readDescription( &item );
328  else if( name() == "title" )
329  readTitle( &item );
330  else if( name() == "pubDate" )
331  readPubDate( &item );
332  else
333  readUnknownElement();
334  }
335  }
336 
337  m_list.append( item );
338 }
339 
340 void BBCParser::readDescription( WeatherData *data )
341 {
342  Q_ASSERT( isStartElement()
343  && name() == "description" );
344 
345  while( !atEnd() ) {
346  readNext();
347 
348  if( isEndElement() )
349  break;
350 
351  if( isStartElement() ) {
352  readUnknownElement();
353  }
354 
355  if( isCharacters() ) {
356  QString description = text().toString();
357  QRegExp regExp;
358 
359  // Temperature
360  regExp.setPattern( "(Temperature:\\s*)(-?\\d+)(.C)" );
361  int pos = regExp.indexIn( description );
362  if ( pos > -1 ) {
363  QString value = regExp.cap( 2 );
364  data->setTemperature( value.toDouble(), WeatherData::Celsius );
365  }
366 
367  // Max Temperature
368  regExp.setPattern( "(Max Temp:\\s*)(-?\\d+)(.C)" );
369  pos = regExp.indexIn( description );
370  if ( pos > -1 ) {
371  QString value = regExp.cap( 2 );
372  data->setMaxTemperature( value.toDouble(), WeatherData::Celsius );
373  }
374 
375  // Min Temperature
376  regExp.setPattern( "(Min Temp:\\s*)(-?\\d+)(.C)" );
377  pos = regExp.indexIn( description );
378  if ( pos > -1 ) {
379  QString value = regExp.cap( 2 );
380  data->setMinTemperature( value.toDouble(), WeatherData::Celsius );
381  }
382 
383  // Wind direction
384  regExp.setPattern( "(Wind Direction:\\s*)([NESW]+)(,)" );
385  pos = regExp.indexIn( description );
386  if ( pos > -1 ) {
387  QString wind = regExp.cap( 2 );
388 
389  if ( m_windDirections.contains( wind ) ) {
390  data->setWindDirection( m_windDirections.value( wind ) );
391  }
392  else {
393  mDebug() << "UNHANDLED WIND DIRECTION, PLEASE REPORT: " << wind;
394  }
395  }
396 
397  // Wind speed
398  regExp.setPattern( "(Wind Speed:\\s*)(\\d+)(mph)" );
399  pos = regExp.indexIn( description );
400  if ( pos > -1 ) {
401  QString speed = regExp.cap( 2 );
402  data->setWindSpeed( speed.toFloat(), WeatherData::mph );
403  }
404 
405  // Relative Humidity
406  regExp.setPattern( "(Relative Humidity:\\s*)(\\d+)(.,)" );
407  pos = regExp.indexIn( description );
408  if ( pos > -1 ) {
409  QString humidity = regExp.cap( 2 );
410  data->setHumidity( humidity.toFloat() );
411  }
412 
413  // Pressure
414  regExp.setPattern( "(Pressure:\\s*)(\\d+mB|N/A)(, )([a-z ]+|N/A)(,)" );
415  pos = regExp.indexIn( description );
416  if ( pos > -1 ) {
417  QString pressure = regExp.cap( 2 );
418  if ( pressure != "N/A" ) {
419  pressure.chop( 2 );
420  data->setPressure( pressure.toFloat()/1000, WeatherData::Bar );
421  }
422 
423  QString pressureDevelopment = regExp.cap( 4 );
424 
425  if ( m_pressureDevelopments.contains( pressureDevelopment ) ) {
426  data->setPressureDevelopment( m_pressureDevelopments.value( pressureDevelopment ) );
427  }
428  else {
429  mDebug() << "UNHANDLED PRESSURE DEVELOPMENT, PLEASE REPORT: "
430  << pressureDevelopment;
431  }
432  }
433 
434  // Visibility
435  regExp.setPattern( "(Visibility:\\s*)([^,]+)" );
436  pos = regExp.indexIn( description );
437  if ( pos > -1 ) {
438  QString visibility = regExp.cap( 2 );
439 
440  if ( m_visibilityStates.contains( visibility.toLower() ) ) {
441  data->setVisibilty( m_visibilityStates.value( visibility ) );
442  }
443  else {
444  mDebug() << "UNHANDLED VISIBILITY, PLEASE REPORT: " << visibility;
445  }
446  }
447  }
448  }
449 }
450 
451 void BBCParser::readTitle( WeatherData *data )
452 {
453  Q_ASSERT( isStartElement()
454  && name() == "title" );
455 
456  while( !atEnd() ) {
457  readNext();
458 
459  if( isEndElement() )
460  break;
461 
462  if( isStartElement() ) {
463  readUnknownElement();
464  }
465 
466  if( isCharacters() ) {
467  QString title = text().toString();
468  QRegExp regExp;
469 
470  // Condition
471  regExp.setPattern( "(^.*)(:\\s*)([\\w ]+)([\\,\\.]\\s*)" );
472  int pos = regExp.indexIn( title );
473  if ( pos > -1 ) {
474  QString value = regExp.cap( 3 );
475 
476  if( m_dayConditions.contains( value ) ) {
477  // TODO: Switch for day/night
478  data->setCondition( m_dayConditions.value( value ) );
479  }
480  else {
481  mDebug() << "UNHANDLED BBC WEATHER CONDITION, PLEASE REPORT: " << value;
482  }
483 
484  QString dayString = regExp.cap( 1 );
485  Qt::DayOfWeek dayOfWeek = (Qt::DayOfWeek) 0;
486  if ( dayString.contains( "Monday" ) )
487  dayOfWeek = Qt::Monday;
488  else if ( dayString.contains( "Tuesday" ) )
489  dayOfWeek = Qt::Tuesday;
490  else if ( dayString.contains( "Wednesday" ) )
491  dayOfWeek = Qt::Wednesday;
492  else if ( dayString.contains( "Thursday" ) )
493  dayOfWeek = Qt::Thursday;
494  else if ( dayString.contains( "Friday" ) )
495  dayOfWeek = Qt::Friday;
496  else if ( dayString.contains( "Saturday" ) )
497  dayOfWeek = Qt::Saturday;
498  else if ( dayString.contains( "Sunday" ) )
499  dayOfWeek = Qt::Sunday;
500  QDate date = QDate::currentDate();
501  date = date.addDays( -1 );
502 
503  for ( int i = 0; i < 7; i++ ) {
504  if ( date.dayOfWeek() == dayOfWeek ) {
505  data->setDataDate( date );
506  }
507  date = date.addDays( 1 );
508  }
509  }
510  }
511  }
512 }
513 
514 void BBCParser::readPubDate( WeatherData *data )
515 {
516  Q_ASSERT( isStartElement()
517  && name() == "pubDate" );
518 
519  while( !atEnd() ) {
520  readNext();
521 
522  if( isEndElement() )
523  break;
524 
525  if( isStartElement() ) {
526  readUnknownElement();
527  }
528 
529  if( isCharacters() ) {
530  QString pubDate = text().toString();
531  QRegExp regExp;
532 
533  regExp.setPattern( "([A-Za-z]+,\\s+)(\\d+)(\\s+)([A-Za-z]+)(\\s+)(\\d{4,4})(\\s+)(\\d+)(:)(\\d+)(:)(\\d+)(\\s+)([+-])(\\d{2,2})(\\d{2,2})" );
534  int pos = regExp.indexIn( pubDate );
535  if ( pos > -1 ) {
536  QDateTime dateTime;
537  QDate date;
538  QTime time;
539 
540  dateTime.setTimeSpec( Qt::UTC );
541  date.setDate( regExp.cap( 6 ).toInt(),
542  m_monthNames.value( regExp.cap( 4 ) ),
543  regExp.cap( 2 ).toInt() );
544  time.setHMS( regExp.cap( 8 ).toInt(),
545  regExp.cap( 10 ).toInt(),
546  regExp.cap( 12 ).toInt() );
547 
548  dateTime.setDate( date );
549  dateTime.setTime( time );
550 
551  // Timezone
552  if( regExp.cap( 14 ) == "-" ) {
553  dateTime = dateTime.addSecs( 60*60*regExp.cap( 15 ).toInt() );
554  dateTime = dateTime.addSecs( 60 *regExp.cap( 16 ).toInt() );
555  }
556  else {
557  dateTime = dateTime.addSecs( -60*60*regExp.cap( 15 ).toInt() );
558  dateTime = dateTime.addSecs( -60 *regExp.cap( 16 ).toInt() );
559  }
560 
561  data->setPublishingTime( dateTime );
562  }
563  }
564  }
565 }
566 
567 #include "BBCParser.moc"
Marble::WeatherData::Rain
Definition: WeatherData.h:46
Marble::WeatherData::NW
Definition: WeatherData.h:75
Marble::ScheduleEntry::path
QString path
Definition: BBCParser.h:35
Marble::WeatherData::LightShowersNight
Definition: WeatherData.h:42
Marble::WeatherData::setCondition
void setCondition(WeatherData::WeatherCondition condition)
Definition: WeatherData.cpp:348
Marble::WeatherData::Hail
Definition: WeatherData.h:51
Marble::WeatherData::setPressure
void setPressure(qreal pressure, WeatherData::PressureUnit format=WeatherData::HectoPascal)
Definition: WeatherData.cpp:721
Marble::WeatherData::Normal
Definition: WeatherData.h:94
BBCWeatherItem.h
Marble::WeatherData::setPressureDevelopment
void setPressureDevelopment(WeatherData::PressureDevelopment)
Definition: WeatherData.cpp:780
Marble::WeatherData::SW
Definition: WeatherData.h:79
Marble::WeatherData::LightShowersDay
Definition: WeatherData.h:41
Marble::WeatherData::ConditionNotAvailable
Definition: WeatherData.h:32
Marble::BBCParser::instance
static BBCParser * instance()
Definition: BBCParser.cpp:185
Marble::WeatherData::setMaxTemperature
void setMaxTemperature(qreal temp, WeatherData::TemperatureUnit format=WeatherData::Kelvin)
Definition: WeatherData.cpp:643
Marble::WeatherData::Bar
Definition: WeatherData.h:118
QObject
MarbleDebug.h
Marble::WeatherData::PressureDevelopmentNotAvailable
Definition: WeatherData.h:88
Marble::WeatherData::Mist
Definition: WeatherData.h:57
Marble::WeatherData::WNW
Definition: WeatherData.h:76
Marble::WeatherData
Definition: WeatherData.h:26
Marble::BBCParser::work
void work()
Definition: BBCParser.cpp:213
Marble::BBCWeatherItem
Definition: BBCWeatherItem.h:22
Marble::WeatherData::setWindSpeed
void setWindSpeed(qreal speed, WeatherData::SpeedUnit format=WeatherData::mps)
Definition: WeatherData.cpp:536
Marble::WeatherData::LightRain
Definition: WeatherData.h:45
Marble::WeatherData::SSW
Definition: WeatherData.h:78
Marble::BBCParser::scheduleRead
void scheduleRead(const QString &path, BBCWeatherItem *item, const QString &type)
Definition: BBCParser.cpp:191
Marble::WeatherData::Falling
Definition: WeatherData.h:87
Marble::WeatherData::setDataDate
void setDataDate(const QDate &date)
Set the date the data is meant for.
Definition: WeatherData.cpp:332
BBCParser.h
Marble::WeatherData::setVisibilty
void setVisibilty(WeatherData::Visibility visibility)
Definition: WeatherData.cpp:687
Marble::WeatherData::ClearDay
Definition: WeatherData.h:33
Marble::WeatherData::NE
Definition: WeatherData.h:67
Marble::ScheduleEntry::type
QString type
Definition: BBCParser.h:37
Marble::WeatherData::VeryPoor
Definition: WeatherData.h:96
Marble::WeatherData::ChanceSnowNight
Definition: WeatherData.h:53
Marble::WeatherData::Celsius
Definition: WeatherData.h:110
Marble::WeatherData::Overcast
Definition: WeatherData.h:39
MarbleGlobal.h
Marble::WeatherData::Rising
Definition: WeatherData.h:85
Marble::WeatherData::SandStorm
Definition: WeatherData.h:58
Marble::WeatherData::W
Definition: WeatherData.h:77
Marble::WeatherData::N
Definition: WeatherData.h:65
Marble::ScheduleEntry
Definition: BBCParser.h:33
Marble::WeatherData::PartlyCloudyNight
Definition: WeatherData.h:38
Marble::ScheduleEntry::item
QPointer< BBCWeatherItem > item
Definition: BBCParser.h:36
Marble::WeatherData::ChanceSnowDay
Definition: WeatherData.h:52
Marble::BBCParser
Definition: BBCParser.h:40
Marble::WeatherData::Good
Definition: WeatherData.h:93
Marble::WeatherData::ShowersNight
Definition: WeatherData.h:44
Marble::WeatherData::WSW
Definition: WeatherData.h:80
Marble::WeatherData::setTemperature
void setTemperature(qreal temp, WeatherData::TemperatureUnit format=WeatherData::Kelvin)
Definition: WeatherData.cpp:621
Marble::WeatherData::VisibilityNotAvailable
Definition: WeatherData.h:98
Marble::AbstractWorkerThread::ensureRunning
void ensureRunning()
Definition: AbstractWorkerThread.cpp:59
Marble::WeatherData::Thunderstorm
Definition: WeatherData.h:50
Marble::WeatherData::Poor
Definition: WeatherData.h:95
Marble::WeatherData::mph
Definition: WeatherData.h:103
Marble::WeatherData::ENE
Definition: WeatherData.h:68
Marble::WeatherData::PartlyCloudyDay
Definition: WeatherData.h:37
Marble::BBCParser::parsedFile
void parsedFile()
Marble::WeatherData::SSE
Definition: WeatherData.h:70
Marble::WeatherData::setMinTemperature
void setMinTemperature(qreal temp, WeatherData::TemperatureUnit format=WeatherData::Kelvin)
Definition: WeatherData.cpp:671
Marble::WeatherData::setHumidity
void setHumidity(qreal humidity)
Definition: WeatherData.cpp:810
Marble::WeatherData::DirectionNotAvailable
Definition: WeatherData.h:81
Marble::WeatherData::SE
Definition: WeatherData.h:71
Marble::BBCParser::~BBCParser
~BBCParser()
Definition: BBCParser.cpp:181
Marble::WeatherData::ClearNight
Definition: WeatherData.h:34
Marble::WeatherData::FewCloudsNight
Definition: WeatherData.h:36
Marble::WeatherData::Snow
Definition: WeatherData.h:55
Marble::WeatherData::LightSnow
Definition: WeatherData.h:54
Marble::WeatherData::S
Definition: WeatherData.h:73
Marble::WeatherData::RainSnow
Definition: WeatherData.h:56
Marble::WeatherData::ESE
Definition: WeatherData.h:72
Marble::WeatherData::setPublishingTime
void setPublishingTime(const QDateTime &dateTime)
Set the time when the data was published.
Definition: WeatherData.cpp:316
Marble::WeatherData::ShowersDay
Definition: WeatherData.h:43
Marble::mDebug
QDebug mDebug()
a function to replace qDebug() in Marble library code
Definition: MarbleDebug.cpp:31
Marble::WeatherData::Fog
Definition: WeatherData.h:97
WeatherData.h
Marble::AbstractWorkerThread
The AbstractWorkerThread is a class written for small tasks that have to run multiple times on differ...
Definition: AbstractWorkerThread.h:36
Marble::BBCParser::workAvailable
bool workAvailable()
Definition: BBCParser.cpp:207
Marble::WeatherData::NoChange
Definition: WeatherData.h:86
Marble::WeatherData::VeryGood
Definition: WeatherData.h:92
Marble::WeatherData::NNE
Definition: WeatherData.h:66
Marble::WeatherData::NNW
Definition: WeatherData.h:74
Marble::WeatherData::FewCloudsDay
Definition: WeatherData.h:35
Marble::WeatherData::setWindDirection
void setWindDirection(WeatherData::WindDirection direction)
Definition: WeatherData.cpp:437
Marble::WeatherData::E
Definition: WeatherData.h:69
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal