diff options
author | TheKodeToad <freezingma1l@outlook.com> | 2023-03-02 10:10:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 10:10:46 +0000 |
commit | 5c913149c84c121523a1ae403848d3e0926de244 (patch) | |
tree | 3789176d454bd988b7e572e5f411151efc2cb7e2 /launcher/ui/dialogs/ResourceDownloadDialog.h | |
parent | cbe6eff2fa917401b913a96c551429caad852b3b (diff) | |
parent | 9265c319a96b3dd5681767c196a397fbbae9164a (diff) | |
download | PrismLauncher-5c913149c84c121523a1ae403848d3e0926de244.tar.gz PrismLauncher-5c913149c84c121523a1ae403848d3e0926de244.tar.bz2 PrismLauncher-5c913149c84c121523a1ae403848d3e0926de244.zip |
Merge branch 'PrismLauncher:develop' into modrinth-token
Diffstat (limited to 'launcher/ui/dialogs/ResourceDownloadDialog.h')
-rw-r--r-- | launcher/ui/dialogs/ResourceDownloadDialog.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.h b/launcher/ui/dialogs/ResourceDownloadDialog.h index 19843532..5678dc8b 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.h +++ b/launcher/ui/dialogs/ResourceDownloadDialog.h @@ -35,6 +35,9 @@ class QVBoxLayout; class QDialogButtonBox; class ResourceDownloadTask; class ResourceFolderModel; +class ResourcePackFolderModel; +class TexturePackFolderModel; +class ShaderPackFolderModel; namespace ResourceDownload { @@ -108,4 +111,61 @@ class ModDownloadDialog final : public ResourceDownloadDialog { BaseInstance* m_instance; }; +class ResourcePackDownloadDialog final : public ResourceDownloadDialog { + Q_OBJECT + + public: + explicit ResourcePackDownloadDialog(QWidget* parent, + const std::shared_ptr<ResourcePackFolderModel>& resource_packs, + BaseInstance* instance); + ~ResourcePackDownloadDialog() override = default; + + //: String that gets appended to the resource pack download dialog title ("Download " + resourcesString()) + [[nodiscard]] QString resourcesString() const override { return tr("resource packs"); } + [[nodiscard]] QString geometrySaveKey() const override { return "RPDownloadGeometry"; } + + QList<BasePage*> getPages() override; + + private: + BaseInstance* m_instance; +}; + +class TexturePackDownloadDialog final : public ResourceDownloadDialog { + Q_OBJECT + + public: + explicit TexturePackDownloadDialog(QWidget* parent, + const std::shared_ptr<TexturePackFolderModel>& resource_packs, + BaseInstance* instance); + ~TexturePackDownloadDialog() override = default; + + //: String that gets appended to the texture pack download dialog title ("Download " + resourcesString()) + [[nodiscard]] QString resourcesString() const override { return tr("texture packs"); } + [[nodiscard]] QString geometrySaveKey() const override { return "TPDownloadGeometry"; } + + QList<BasePage*> getPages() override; + + private: + BaseInstance* m_instance; +}; + +class ShaderPackDownloadDialog final : public ResourceDownloadDialog { + Q_OBJECT + + public: + explicit ShaderPackDownloadDialog(QWidget* parent, + const std::shared_ptr<ShaderPackFolderModel>& shader_packs, + BaseInstance* instance); + ~ShaderPackDownloadDialog() override = default; + + //: String that gets appended to the shader pack download dialog title ("Download " + resourcesString()) + [[nodiscard]] QString resourcesString() const override { return tr("shader packs"); } + [[nodiscard]] QString geometrySaveKey() const override { return "ShaderDownloadGeometry"; } + + QList<BasePage*> getPages() override; + + private: + BaseInstance* m_instance; +}; + } // namespace ResourceDownload |