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.

55 lines
998 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 MAINWINDOW_H
  9. #define MAINWINDOW_H
  10. #include <QMainWindow>
  11. #include <QPushButton>
  12. #include <QtWidgets>
  13. #include <QVector>
  14. #include "mqttclient.h"
  15. #include "zoneitem.h"
  16. #include "backgroundloop.h"
  17. #include "settings.h"
  18. enum power_states {
  19. OFF,
  20. ON,
  21. AUTO,
  22. MAX_POWER_STATES
  23. };
  24. class MainWindow : public QMainWindow
  25. {
  26. Q_OBJECT
  27. public:
  28. explicit MainWindow(QWidget *parent = NULL);
  29. ~MainWindow();
  30. MQTTSubcriber *mqttclient;
  31. private:
  32. QPushButton m_state_btn;
  33. BackgroundLoop m_backLoop;
  34. QVector<ZoneItem *> m_zones;
  35. enum power_states m_pwr_state;
  36. void update_state_btn(enum power_states st);
  37. private slots:
  38. void temperature_slot(int idx, double val);
  39. void hygro_slot(int idx, double val);
  40. void availability_slot(int idx, bool ok);
  41. void change_state(void);
  42. };
  43. #endif // MAINWINDOW_H
  44. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */