0f08abd614d32a5db3e4a5f68d345329939854e0
[apps/thermostat-demo.git] / weatherdata.h
1 #ifndef WEATHERDATA_H
2 #define WEATHERDATA_H
4 #include <QDateTime>
6 class ForecastData;
8 class WeatherData
9 {
10 public:
11     WeatherData();
13     void setCurrentCity(QString city);
14     QString currentCity();
16     void setCurrentTemp(int temp);
17     int currentTemp();
19     void setIcon(QString icon);
20     QString icon();
22     void setLastUpdated(QDateTime lastUpdated);
23     QDateTime lastUpdated();
25     void addForecastDay(ForecastData* day);
26     void removeForecastDay(ForecastData* day);
27     QList<ForecastData * > forecastData();
29     void setLocalTime(QDateTime localTime);
30     QDateTime localTime();
32     void setCachedDataFlag();
33     bool cachedData();
35 private:
36     QString m_city;
37     int m_currentTemp;
38     QString m_icon;
39     QDateTime m_lastUpdated;
40     QDateTime m_localTime;
41     QList<ForecastData *> m_forecastList;
42     bool m_cached;
43 };
47 #endif // WEATHERDATA_H