diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-03-19 02:36:12 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-03-27 09:25:36 +0200 |
commit | 8e44ab2338f4ca63d58de4b3329c384df9d6c053 (patch) | |
tree | 60b915ec620221656d1c3a42f40124b15e9e69f0 /api/logic/modplatform/ftb/FtbPackDownloader.h | |
parent | 4c7ea0f99a23f73fd3cae87f7dfaab89922a2311 (diff) | |
download | MultiMC-8e44ab2338f4ca63d58de4b3329c384df9d6c053.tar MultiMC-8e44ab2338f4ca63d58de4b3329c384df9d6c053.tar.gz MultiMC-8e44ab2338f4ca63d58de4b3329c384df9d6c053.tar.lz MultiMC-8e44ab2338f4ca63d58de4b3329c384df9d6c053.tar.xz MultiMC-8e44ab2338f4ca63d58de4b3329c384df9d6c053.zip |
NOISSUE redo new instance dialog
Diffstat (limited to 'api/logic/modplatform/ftb/FtbPackDownloader.h')
-rw-r--r-- | api/logic/modplatform/ftb/FtbPackDownloader.h | 49 |
1 files changed, 12 insertions, 37 deletions
diff --git a/api/logic/modplatform/ftb/FtbPackDownloader.h b/api/logic/modplatform/ftb/FtbPackDownloader.h index c5cc9bd2..cf7eb567 100644 --- a/api/logic/modplatform/ftb/FtbPackDownloader.h +++ b/api/logic/modplatform/ftb/FtbPackDownloader.h @@ -11,54 +11,29 @@ #pragma once -class FtbPackDownloader; -class MULTIMC_LOGIC_EXPORT FtbPackDownloader : public QObject { - +class MULTIMC_LOGIC_EXPORT FtbPackDownloader : public QObject +{ Q_OBJECT -private: - QMap<QString, FtbModpack> fetchedPacks; - bool fetching = false; - bool done = false; - - FtbModpack selected; - QString selectedVersion; - QString downloadPath; - - FtbPackFetchTask *fetchTask = 0; - NetJobPtr netJobContainer; - - void _downloadSucceeded(); - void _downloadFailed(QString reason); - void _downloadProgress(qint64 current, qint64 total); - -private slots: - void fetchSuccess(FtbModpackList modlist); - void fetchFailed(QString reason); - public: FtbPackDownloader(); - ~FtbPackDownloader(); - - bool isValidPackSelected(); - void selectPack(FtbModpack modpack, QString version); - - FtbModpack getSelectedPack(); + virtual ~FtbPackDownloader(); void fetchModpacks(bool force); - void downloadSelected(MetaEntryPtr cache); - - QString getSuggestedInstanceName(); - FtbModpackList getModpacks(); - NetJobPtr getNetJob(); signals: void ready(); void packFetchFailed(); - void downloadSucceded(QString archivePath); - void downloadFailed(QString reason); - void downloadProgress(qint64 current, qint64 total); +private slots: + void fetchSuccess(FtbModpackList modlist); + void fetchFailed(QString reason); +private: + QMap<QString, FtbModpack> fetchedPacks; + bool fetching = false; + bool done = false; + + FtbPackFetchTask *fetchTask = 0; }; |