进度更新

This commit is contained in:
RigoLigo
2021-07-05 23:35:50 +08:00
parent 8991043127
commit 4df8bf7d0a
24 changed files with 835 additions and 134 deletions

View File

@@ -1,11 +1,11 @@
//
// Created by rigoligo on 2021/5/12.
//
#pragma once
#include <QMap>
#include <QString>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkAccessManager>
#include "spklogging.h"
#include "spkmainwindow.h"
@@ -23,10 +23,32 @@ class SpkStore : public QObject
SpkStore(bool aCli, QString &aLogPath);
~SpkStore();
SpkMainWindow* GetRootWindow() { return mMainWindow; };
SpkMainWindow* GetRootWindow() { return mMainWindow; }
private:
SpkLogger *mLogger;
SpkMainWindow *mMainWindow = nullptr;
QNetworkAccessManager *mNetMgr = nullptr;
// Following are stationary signal-slot bindings between UI and Store, mostly for handling
// API calls and resource downloading.
public slots:
// void RequestStoreMetadata(); ///< All required metadata the store needs when launched
// void RequestCategoryPage(int aCategoryId);
// void RequestApplicationMetadata(int aAppId);
// void RequestRefreshApiUrls(QString aCustomUrl);
signals:
void StatusStoreMetadata(QNetworkReply::NetworkError, QString);
void StatusCategoryPage(QNetworkReply::NetworkError, QString);
void StatusApplicationMetadata(QNetworkReply::NetworkError, QString);
void StatusRefreshApiUrls(QNetworkReply::NetworkError, QString);
private:
// Store manages all kinds of possible replies, and the caller can only get JSON they need
QNetworkReply *mReplyStoreMetadata = nullptr,
*mReplyCategory = nullptr,
*mReplyAppMetadata = nullptr,
*mReplyApiUrls = nullptr;
};