#ifndef CLIENTTHREAD_H #define CLIENTTHREAD_H #include #include #include #include class ClientThread : public QThread { Q_OBJECT public: explicit ClientThread(QObject *parent = nullptr); void run(); void stop(); void deviceStatus(); void readData(QTcpSocket *so,QString devCode); void controlData(QString deviceId,int switchStatus); signals: void mqttData(QString msg); void dataListLog(QString log); void responseMsg(QString msg); public slots: private: QTcpSocket *so; bool keep; QList CmdList; QString devCode; int switch_status; }; #endif // CLIENTTHREAD_H