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.

69 lines
1.5 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 <QStackedWidget>
  11. #include <QMainWindow>
  12. #include <QPushButton>
  13. #include <QtWidgets>
  14. #include <QVector>
  15. #include <QTimer>
  16. #include <QDate>
  17. #include "mqttclient.h"
  18. #include "zoneitem.h"
  19. #include "boost_dlg.h"
  20. #include "menu_dlg.h"
  21. #include "settings.h"
  22. class MainWindow : public QMainWindow
  23. {
  24. Q_OBJECT
  25. public:
  26. explicit MainWindow(QWidget *parent = NULL);
  27. ~MainWindow();
  28. private:
  29. MQTTClient *m_mqtt;
  30. QPushButton m_state_btn;
  31. QVector<ZoneItem *> m_zones;
  32. QTimer *m_timer;
  33. BoostDlg *m_boost;
  34. MenuDlg *m_menu;
  35. QDate m_end_holiday;
  36. QStackedWidget m_central_widget;
  37. void update_state_btn(enum power_states st);
  38. double get_target_temperature(int room_idx);
  39. bool get_heater_order(int room_idx);
  40. void apply_automatic_state(void);
  41. private slots:
  42. void temperature_slot(int idx, double val);
  43. void hygro_slot(int idx, double val);
  44. void availability_slot(int idx, bool ok);
  45. void change_state(void);
  46. void apply_order_to_heaters(void);
  47. void show_boost(void);
  48. void show_main(void);
  49. void show_menu(void);
  50. void boost_slot(int idx, struct boost_data &data);
  51. void do_show_holiday_dlg(void);
  52. void do_close_holiday_dlg(void);
  53. void set_holiday_mode(QDate end_date);
  54. signals:
  55. void setAllHeatersOn(bool on);
  56. };
  57. #endif // MAINWINDOW_H
  58. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */