#ifndef DEALMQTTALARMTHREAD_H #define DEALMQTTALARMTHREAD_H #include #include #include #include #include #include #include #include class MqttAlarmData{ public: explicit MqttAlarmData(QString t = "",QByteArray d = "" ){ topic = t; data = d; } QString topic; QByteArray data; }; class DealMqttAlarmThread : public QThread { Q_OBJECT public: explicit DealMqttAlarmThread(QObject *parent = nullptr); void run(); void stop(); void appendMqttData(MqttAlarmData mqttData); signals: void dmq_log(QString log); void dmqSql(QString sql); void dmqAlarm(QString sql); public slots: private: bool keep; QList mqttDataList; }; #endif // DEALMQTTALARMTHREAD_H