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.

42 lines
740 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 BACKGROUNDLOOP_H
  9. #define BACKGROUNDLOOP_H
  10. #include <QThread>
  11. #include "qmqtt.h"
  12. class BackgroundLoop : public QThread
  13. {
  14. Q_OBJECT
  15. public:
  16. BackgroundLoop();
  17. ~BackgroundLoop();
  18. bool connectMQTT();
  19. private:
  20. void run() override;
  21. QMQTT::Client *m_mqtt_client;
  22. private slots:
  23. void mqtt_connected(void);
  24. void mqtt_disconnected(void);
  25. void mqtt_error(const QMQTT::ClientError error);
  26. void mqtt_subscribed(const QString& topic, const quint8 qos);
  27. void mqtt_received(const QMQTT::Message& message);
  28. };
  29. #endif // BACKGROUNDLOOP_H
  30. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */