36 lines
682 B
C++
36 lines
682 B
C++
#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
|