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