f59d9923f47afebd19d96f679eaa89ad1888729c
[apps/thermostat-demo.git] / mainwindow.h
1 #ifndef MAINWINDOW_H\r
2 #define MAINWINDOW_H\r
3 \r
4 #include <QtGui>\r
5 #include "webdata.h"\r
6 \r
7 \r
8 class GlobalSettings;\r
9 class OptionsWidget;\r
10 class ThermostatWidget;\r
11 class WeatherWidget;\r
12 \r
13 class MainWindow : public QWidget\r
14 {\r
15     Q_OBJECT\r
16 public:\r
17     explicit MainWindow(QWidget *parent = 0);\r
18 \r
19     int m_currentThermostatTemp;\r
20 protected:\r
21     void paintEvent(QPaintEvent *);\r
22     \r
23 signals:\r
24     \r
25 public slots:\r
26     void loadWebData();\r
27     void closeEvent(QCloseEvent *);\r
28     void setWebData(WeatherData* weatherData);\r
29     void webDataFailed();\r
30     QHash<QString, QVariant> processCommand(QHash<QString, QVariant> command);\r
31 \r
32 private:\r
33     WebData *webData;\r
34     QPushButton *energyButton;\r
35     QPushButton *timeButton;\r
36     QPushButton *dateButton;\r
37     QPushButton *closeButton;\r
38     QTimer *clockTimer;\r
39     QDateTime dateTime;\r
40     void setBackground(QString, QTime);\r
41     WeatherWidget *weatherWidget;\r
42     OptionsWidget *optionsWidget;\r
43     ThermostatWidget *thermostatWidget;\r
44 \r
45     GlobalSettings* m_globalSettings;\r
46 \r
47     void createScreenLayout();\r
48 \r
49 private slots:\r
50     void updateClock();\r
51     void energySaving(bool);\r
52     \r
53 };\r
54 \r
55 #endif // MAINWINDOW_H\r