diff options
author | swirl <swurl@swurl.xyz> | 2022-02-03 13:53:30 -0500 |
---|---|---|
committer | swirl <swurl@swurl.xyz> | 2022-02-03 13:53:30 -0500 |
commit | e8a4902a3dddd08d65bd1284951ae5954439d1f5 (patch) | |
tree | b5936e950cf149366366db156f90e51c25f2257a /launcher/ui/dialogs/ModDownloadDialog.h | |
parent | fcc4420cfec3fcd970ff1f35b8848559c7b5b6ef (diff) | |
parent | e2952061af24e0b9a4639d5ff1eb24c57f65830a (diff) | |
download | PrismLauncher-e8a4902a3dddd08d65bd1284951ae5954439d1f5.tar.gz PrismLauncher-e8a4902a3dddd08d65bd1284951ae5954439d1f5.tar.bz2 PrismLauncher-e8a4902a3dddd08d65bd1284951ae5954439d1f5.zip |
Merge branch 'feature/download_mods' into develop
Diffstat (limited to 'launcher/ui/dialogs/ModDownloadDialog.h')
-rw-r--r-- | launcher/ui/dialogs/ModDownloadDialog.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/launcher/ui/dialogs/ModDownloadDialog.h b/launcher/ui/dialogs/ModDownloadDialog.h new file mode 100644 index 00000000..ece8e328 --- /dev/null +++ b/launcher/ui/dialogs/ModDownloadDialog.h @@ -0,0 +1,54 @@ +#pragma once + +#include <QDialog> +#include <QVBoxLayout> + +#include "BaseVersion.h" +#include "ui/pages/BasePageProvider.h" +#include "minecraft/mod/ModFolderModel.h" +#include "ModDownloadTask.h" +#include "ui/pages/modplatform/flame/FlameModPage.h" + +namespace Ui +{ +class ModDownloadDialog; +} + +class PageContainer; +class QDialogButtonBox; +class ModrinthPage; + +class ModDownloadDialog : public QDialog, public BasePageProvider +{ + Q_OBJECT + +public: + explicit ModDownloadDialog(const std::shared_ptr<ModFolderModel> &mods, QWidget *parent, BaseInstance *instance); + ~ModDownloadDialog(); + + QString dialogTitle() override; + QList<BasePage *> getPages() override; + + void setSuggestedMod(const QString & name = QString(), ModDownloadTask * task = nullptr); + + ModDownloadTask * getTask(); + const std::shared_ptr<ModFolderModel> &mods; + +public slots: + void accept() override; + void reject() override; + +//private slots: + +private: + Ui::ModDownloadDialog *ui = nullptr; + PageContainer * m_container = nullptr; + QDialogButtonBox * m_buttons = nullptr; + QVBoxLayout *m_verticalLayout = nullptr; + + + ModrinthPage *modrinthPage = nullptr; + FlameModPage *flameModPage = nullptr; + std::unique_ptr<ModDownloadTask> modTask; + BaseInstance *m_instance; +}; |