ba8199bb318ac9520770f429457de51392ab415a
[apps/thermostat-demo.git] / thermostatwidget.h
1 #ifndef THERMOSTATWIDGET_H\r
2 #define THERMOSTATWIDGET_H\r
3 \r
4 #include <QtGui>\r
5 \r
6 class GlobalSettings;\r
7 \r
8 class ThermostatWidget : public QWidget\r
9 {\r
10     Q_OBJECT\r
11 public:\r
12     explicit ThermostatWidget(QWidget *parent = 0);\r
13     static int currentTempStatic;\r
14     QLabel *currentTemp;\r
15 \r
16 public slots:\r
17     void updateUnit();\r
18     void setCurrentTempPtr(int * currentTemp);\r
19     void increaseTemp();\r
20     void decreaseTemp();\r
21     QHash<QString, QVariant> getCurrentData();\r
22     \r
23 signals:\r
24     void timeout();\r
25     void setpointIsReached(bool);\r
26     \r
27 private slots:\r
28     void update();\r
29     void resizeEvent(QResizeEvent *);\r
30 \r
31 private:\r
32     int *currentTempInt;\r
33     int setpointTempInt;\r
34     QLabel *setpointTemp;\r
35     QPushButton *increaseTempButton;\r
36     QPushButton *decreaseTempButton;\r
37     QTimer *updateTimer;\r
38     bool setpointReached;\r
39     GlobalSettings *m_globalSettings;\r
40 };\r
41 \r
42 #endif // THERMOSTATWIDGET_H\r