Thermostat pour piloter jusqu'à 4 radiateurs avec fil pilote
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
896 B

  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. /*
  3. * Qt mutizone MQTT thermostat
  4. *
  5. * Copyright (C) 2019 Richard Genoud
  6. *
  7. */
  8. #ifndef ZONEITEM_H
  9. #define ZONEITEM_H
  10. #include <QObject>
  11. #include <QLabel>
  12. #include <QElapsedTimer>
  13. #include "boost_dlg.h"
  14. class ZoneItem : public QLabel
  15. {
  16. Q_OBJECT
  17. public:
  18. explicit ZoneItem(const QString &zoneName, QWidget *parent = Q_NULLPTR,
  19. Qt::WindowFlags f = Qt::WindowFlags());
  20. ~ZoneItem();
  21. void refresh(void);
  22. double m_temperature_value;
  23. double m_hygro_value;
  24. double m_target_temperature;
  25. bool m_available;
  26. bool m_heating_on;
  27. QString m_name;
  28. struct boost_data m_boost;
  29. signals:
  30. void clicked();
  31. void long_clicked();
  32. protected:
  33. void mousePressEvent(QMouseEvent* event);
  34. void mouseReleaseEvent(QMouseEvent* event);
  35. QElapsedTimer m_click_chrono;
  36. };
  37. #endif // ZONEITEM_H
  38. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */