Data pack management

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2023-11-28 12:30:13 +00:00
parent 40cfa145ee
commit 284e536e81
29 changed files with 943 additions and 15 deletions

View File

@@ -0,0 +1,39 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
* Copyright (C) 2023 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
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "ExternalResourcesPage.h"
#include "minecraft/mod/DataPackFolderModel.h"
#include "ui_ExternalResourcesPage.h"
class DataPackPage : public ExternalResourcesPage {
Q_OBJECT
public:
explicit DataPackPage(MinecraftInstance* instance, std::shared_ptr<DataPackFolderModel> model, QWidget* parent = 0);
QString displayName() const override { return tr("Data packs"); }
QIcon icon() const override { return APPLICATION->getThemedIcon("datapacks"); }
QString id() const override { return "datapacks"; }
QString helpPage() const override { return "Data-packs"; }
bool shouldDisplay() const override { return true; }
public slots:
bool onSelectionChanged(const QModelIndex& current, const QModelIndex& previous) override;
void downloadDataPacks();
};