|
|
- // SPDX-License-Identifier: GPL-3.0-or-later
- /*
- * Qt mutizone MQTT thermostat
- *
- * Copyright (C) 2019 Richard Genoud
- *
- */
-
- #ifndef MAINWINDOW_H
- #define MAINWINDOW_H
-
- #include <QMainWindow>
- #include <QPushButton>
- #include <QtWidgets>
- #include <QVector>
-
- #include "mqttclient.h"
- #include "zoneitem.h"
- #include "backgroundloop.h"
- #include "settings.h"
-
- enum power_states {
- OFF,
- ON,
- AUTO,
- MAX_POWER_STATES
- };
-
- class MainWindow : public QMainWindow
- {
- Q_OBJECT
-
- public:
- explicit MainWindow(QWidget *parent = NULL);
- ~MainWindow();
-
- private:
- QPushButton m_state_btn;
- BackgroundLoop m_backLoop;
- QVector<ZoneItem *> m_zones;
- enum power_states m_pwr_state;
- void update_state_btn(enum power_states st);
-
- private slots:
- void temperature_slot(int idx, double val);
- void hygro_slot(int idx, double val);
- void availability_slot(int idx, bool ok);
- void change_state(void);
- };
-
- #endif // MAINWINDOW_H
-
- /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */
|