qt/LedOK/wProgramManager/sendprogthread.h

36 lines
682 B
C
Raw Normal View History

2022-08-25 18:37:24 +08:00
#ifndef SENDPROGTHREAD_H
#define SENDPROGTHREAD_H
#include <tcpsocket.h>
#include <QThread>
#include <QFileInfo>
#include <QJsonValue>
#include <QJsonObject>
#include <QJsonDocument>
#include <QAbstractSocket>
#include <QSemaphore>
#include <QDataStream>
class SendProgThread : public QThread {
Q_OBJECT
public:
SendProgThread(const QString &progDir, const QString &ip, int port = 3333);
protected:
void run();
signals:
void emErr(QString);
void emProgress(int);
public slots:
void stop() {
stoped = true;
}
private:
QString prog_dir;
QString ip;
int port = 3333;
std::atomic_bool stoped{false};
};
#endif // SENDPROGTHREAD_H