添加文件夹传输进度更新。
This commit is contained in:
@@ -123,7 +123,7 @@ public:
|
||||
LocalFile localFile_;
|
||||
};
|
||||
|
||||
// Socket Worker Thread
|
||||
// 工作线程。
|
||||
class SocketWorker : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -139,7 +139,7 @@ private:
|
||||
ClientCore* core_{};
|
||||
};
|
||||
|
||||
// HeatBeat to Server
|
||||
// 心跳包线程。
|
||||
class HeatBeat : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -159,6 +159,7 @@ private:
|
||||
ClientCore* core_{};
|
||||
};
|
||||
|
||||
// 耗时操作线程基本框架。
|
||||
class WaitThread : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -183,4 +184,48 @@ protected:
|
||||
ClientCore* cli_{};
|
||||
};
|
||||
|
||||
// 等待对方应答的等待线程。
|
||||
class WaitOper : public WaitThread
|
||||
{
|
||||
public:
|
||||
WaitOper(QObject* parent = nullptr);
|
||||
|
||||
public:
|
||||
void run() override;
|
||||
void SetType(const QString& sendType, const QString& ansType);
|
||||
void SetPath(const QString& stra, const QString& strb, const QString& type);
|
||||
InfoMsg GetMsg() const;
|
||||
void interrupCheck() override;
|
||||
void recvFrame(QSharedPointer<FrameBuffer> frame) override;
|
||||
|
||||
private:
|
||||
bool recvMsg_{};
|
||||
InfoMsg infoMsg_{};
|
||||
QString sendStrType_{};
|
||||
QString ansStrType_{};
|
||||
QString stra_;
|
||||
QString strb_;
|
||||
QString type_;
|
||||
};
|
||||
|
||||
// 等待自己耗时操作的线程。
|
||||
class WaitOperOwn : public WaitThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
WaitOperOwn(QObject* parent = nullptr);
|
||||
|
||||
signals:
|
||||
void sigOver();
|
||||
|
||||
public:
|
||||
void run() override;
|
||||
void recvFrame(QSharedPointer<FrameBuffer> frame) override;
|
||||
|
||||
public:
|
||||
InfoMsg infoMsg_{};
|
||||
std::function<void()> func_;
|
||||
};
|
||||
|
||||
#endif // CLIENTCORE_H
|
||||
Reference in New Issue
Block a user