2.0.1新建文件夹

This commit is contained in:
2022-08-20 13:35:31 +08:00
parent fa87419c71
commit aac498bf7d
45 changed files with 2767 additions and 87 deletions

View File

@@ -0,0 +1,37 @@
/*
* 重写 QThread 以实现多线程下载功能
*/
#ifndef DOWNLOADTHREAD_H
#define DOWNLOADTHREAD_H
#include <QObject>
#include <QThread>
#include <QProgressDialog>
#include <QListView>
#include <QJsonArray>
class DownloadThread : public QThread // 继承 QThread
{
public:
DownloadThread(QProgressDialog *dialog, QString url, QString save, QString fileName, QListView *view, bool deleteZip, bool unzip, QJsonArray *localList);
void SettingVirtualMachine(QString savePath);
QProgressDialog *dialog;
QString fileUrl;
QString fileSaveName;
QString fileSavePath;
QListView *localView;
QJsonArray *localJsonList;
bool downloadDeleteZip;
bool downloadUnzip;
protected:
void run(); // 核心
void ReadLocalInformation();
signals:
// 防止非主线程刷新控件导致程序退出
void MessageBoxInfo(QString info);
void MessageBoxError(QString info);
};
#endif // DOWNLOADTHREAD_H