]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - apps/thermostat-demo.git/blob - weatherdata.h
thermostat_demo_qt5.desktop: add WinType as null
[apps/thermostat-demo.git] / weatherdata.h
1 #ifndef WEATHERDATA_H
2 #define WEATHERDATA_H
4 #include <qglobal.h>
5 #include <QDateTime>
7 #if QT_VERSION >= 0x050000
9 #include <QPushButton>
10 #include <QLabel>
11 #include <QHBoxLayout>
12 #include <QVBoxLayout>
14 #endif
16 class ForecastData;
18 class WeatherData
19 {
20 public:
21     WeatherData();
23     void setCurrentCity(QString city);
24     QString currentCity();
26     void setCurrentTemp(int temp);
27     int currentTemp();
29     void setIcon(QString icon);
30     QString icon();
32     void setLastUpdated(QDateTime lastUpdated);
33     QDateTime lastUpdated();
35     void addForecastDay(ForecastData* day);
36     void removeForecastDay(ForecastData* day);
37     QList<ForecastData * > forecastData();
39     void setLocalTime(QDateTime localTime);
40     QDateTime localTime();
42     void setCachedDataFlag();
43     bool cachedData();
45 private:
46     QString m_city;
47     int m_currentTemp;
48     QString m_icon;
49     QDateTime m_lastUpdated;
50     QDateTime m_localTime;
51     QList<ForecastData *> m_forecastList;
52     bool m_cached;
53 };
57 #endif // WEATHERDATA_H