mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 12:22:05 +08:00
补齐缺少的文件
This commit is contained in:
39
inc/page/spkpagedownloads.h
Normal file
39
inc/page/spkpagedownloads.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef SPKPAGEDOWNLOADS_H
|
||||
#define SPKPAGEDOWNLOADS_H
|
||||
|
||||
#include "spkdownload.h"
|
||||
#include "spkdownloadentry.h"
|
||||
#include "page/spkpagebase.h"
|
||||
|
||||
namespace SpkUi
|
||||
{
|
||||
class SpkPageDownloads : public SpkPageBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SpkPageDownloads(QWidget *parent = nullptr);
|
||||
~SpkPageDownloads();
|
||||
|
||||
public slots:
|
||||
void AddDownloadTask(QString name, QString pkgName, QString path);
|
||||
|
||||
private:
|
||||
// Logic
|
||||
SpkDownloadMgr *mDownloadMgr;
|
||||
QMap<uint, SpkDownloadEntry*> mEntries;
|
||||
uint mNextDownloadId;
|
||||
QQueue<QPair<int, QString>> mWaitingDownloads;
|
||||
enum { Idle, Waiting, Downloading } mCurrentStatus;
|
||||
|
||||
// UI
|
||||
QVBoxLayout *mLayEntries, *mMainLay;
|
||||
QWidget *mScrollWidget;
|
||||
QScrollArea *mScrollArea;
|
||||
|
||||
private slots:
|
||||
void DownloadProgress(qint64 downloadedBytes, qint64 totalBytes, int id);
|
||||
void DownloadStopped(SpkDownloadMgr::TaskResult status, int id);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // SPKPAGEDOWNLOADS_H
|
||||
Reference in New Issue
Block a user