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.

47 lines
689 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 SETTINGS_H
  9. #define SETTINGS_H
  10. #include <QSettings>
  11. #include <QVector>
  12. #define MAX_NB_ZONES 4
  13. struct Heater {
  14. QString ctrl_topic;
  15. };
  16. struct Room {
  17. QString name;
  18. QString sensor_topic;
  19. QString availability_topic;
  20. QVector<struct Heater> heaters;
  21. };
  22. class Settings : public QSettings
  23. {
  24. Q_OBJECT
  25. public:
  26. static Settings *getInstance(void);
  27. int nbZones();
  28. QVector<struct Room> m_rooms;
  29. private:
  30. Settings();
  31. ~Settings();
  32. static Settings *_singleton;
  33. };
  34. #endif // SETTINGS_H
  35. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */