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.

57 lines
1.1 KiB

  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. /*
  3. * Qt mutizone MQTT thermostat
  4. *
  5. * Copyright (C) 2020 Richard Genoud
  6. *
  7. */
  8. #ifndef EDITDLG_H
  9. #define EDITDLG_H
  10. #include <QVector>
  11. #include <QWidget>
  12. #include <QObject>
  13. #include <QSpinBox>
  14. #include <QDateTime>
  15. #include <QVBoxLayout>
  16. #include <QPushButton>
  17. #include <QDoubleSpinBox>
  18. #include "settings.h"
  19. class EditDlg : public QWidget
  20. {
  21. Q_OBJECT
  22. public:
  23. EditDlg(int idx, QWidget *parent = Q_NULLPTR,
  24. Qt::WindowFlags f = Qt::WindowFlags());
  25. ~EditDlg();
  26. void refresh_progs(void);
  27. private:
  28. void set_font(QWidget *widget);
  29. QHBoxLayout *add_prog_layout(int idx);
  30. QPushButton *m_add_btn;
  31. QDoubleSpinBox m_default_temperature;
  32. QVBoxLayout *m_progsLayout;
  33. QVector<struct Program> m_progs;
  34. int m_idx; // room index
  35. private slots:
  36. void save(void);
  37. void add(void);
  38. void reject(void);
  39. void delete_prog_clicked(void);
  40. void edit_prog_clicked(void);
  41. signals:
  42. void close_edit_dlg(void);
  43. void show_edit_prog_dlg(struct Program &p);
  44. };
  45. #endif // EDITDLG_H
  46. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */