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.

56 lines
1.1 KiB

  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 "boost_dlg.h"
  17. #include "settings.h"
  18. class MainWindow : public QMainWindow
  19. {
  20. Q_OBJECT
  21. public:
  22. explicit MainWindow(QWidget *parent = NULL);
  23. ~MainWindow();
  24. private:
  25. MQTTClient *m_mqtt;
  26. QPushButton m_state_btn;
  27. QVector<ZoneItem *> m_zones;
  28. QTimer *m_timer;
  29. void update_state_btn(enum power_states st);
  30. double get_target_temperature(int room_idx);
  31. bool get_heater_order(int room_idx);
  32. void apply_automatic_state(void);
  33. private slots:
  34. void temperature_slot(int idx, double val);
  35. void hygro_slot(int idx, double val);
  36. void availability_slot(int idx, bool ok);
  37. void change_state(void);
  38. void apply_order_to_heaters(void);
  39. void show_boost(void);
  40. void boost_slot(int idx, struct boost_data &data);
  41. signals:
  42. void setAllHeatersOn(bool on);
  43. };
  44. #endif // MAINWINDOW_H
  45. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */