feat(RD): add shader pack downloader
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
		| @@ -36,6 +36,7 @@ class QDialogButtonBox; | ||||
| class ResourceDownloadTask; | ||||
| class ResourceFolderModel; | ||||
| class ResourcePackFolderModel; | ||||
| class ShaderPackFolderModel; | ||||
|  | ||||
| namespace ResourceDownload { | ||||
|  | ||||
| @@ -128,4 +129,23 @@ class ResourcePackDownloadDialog final : public ResourceDownloadDialog { | ||||
|     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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 flow
					flow