diff options
author | flow <flowlnlnln@gmail.com> | 2022-11-10 08:08:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 08:08:44 -0800 |
commit | 46a8e18841f398a3735e7ca4310c317e3dacc474 (patch) | |
tree | 1ff73f35a35f8d8707481c5c29adc7b0d4e9481e /launcher/ui/dialogs/ModDownloadDialog.h | |
parent | 6c53e68a523c1b9b9d19014a975958788c484108 (diff) | |
parent | 99ed0b6c2ca67733a574a13cd215ec5c46c4dcfa (diff) | |
download | PrismLauncher-46a8e18841f398a3735e7ca4310c317e3dacc474.tar.gz PrismLauncher-46a8e18841f398a3735e7ca4310c317e3dacc474.tar.bz2 PrismLauncher-46a8e18841f398a3735e7ca4310c317e3dacc474.zip |
Merge pull request #367 from TheKodeToad/linkjumping
fix https://github.com/PrismLauncher/PrismLauncher/issues/363
Diffstat (limited to 'launcher/ui/dialogs/ModDownloadDialog.h')
-rw-r--r-- | launcher/ui/dialogs/ModDownloadDialog.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/launcher/ui/dialogs/ModDownloadDialog.h b/launcher/ui/dialogs/ModDownloadDialog.h index 18a5f0f3..fcf6f4fc 100644 --- a/launcher/ui/dialogs/ModDownloadDialog.h +++ b/launcher/ui/dialogs/ModDownloadDialog.h @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> + * Copyright (C) 2022 TheKodeToad <TheKodeToad@proton.me> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,13 +33,14 @@ class ModDownloadDialog; class PageContainer; class QDialogButtonBox; +class ModPage; class ModrinthModPage; class ModDownloadDialog final : public QDialog, public BasePageProvider { Q_OBJECT -public: + public: explicit ModDownloadDialog(const std::shared_ptr<ModFolderModel>& mods, QWidget* parent, BaseInstance* instance); ~ModDownloadDialog() override = default; @@ -51,22 +53,26 @@ public: bool isModSelected(QString name) const; const QList<ModDownloadTask*> getTasks(); - const std::shared_ptr<ModFolderModel> &mods; + const std::shared_ptr<ModFolderModel>& mods; -public slots: + bool selectPage(QString pageId); + ModPage* getSelectedPage(); + + public slots: void confirm(); void accept() override; void reject() override; -private slots: + private slots: void selectedPageChanged(BasePage* previous, BasePage* selected); -private: - Ui::ModDownloadDialog *ui = nullptr; - PageContainer * m_container = nullptr; - QDialogButtonBox * m_buttons = nullptr; - QVBoxLayout *m_verticalLayout = nullptr; + private: + Ui::ModDownloadDialog* ui = nullptr; + PageContainer* m_container = nullptr; + QDialogButtonBox* m_buttons = nullptr; + QVBoxLayout* m_verticalLayout = nullptr; + ModPage* m_selectedPage = nullptr; QHash<QString, ModDownloadTask*> modTask; - BaseInstance *m_instance; + BaseInstance* m_instance; }; |