2023-06-22 14:05:47 +01:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
/*
|
|
|
|
* Prism Launcher - Minecraft Launcher
|
|
|
|
* Copyright (c) 2023 Trial97 <alexandru.tripon97@gmail.com>
|
|
|
|
*
|
|
|
|
* 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 <QDialog>
|
|
|
|
#include <QList>
|
|
|
|
#include "BaseInstance.h"
|
|
|
|
#include "minecraft/mod/Mod.h"
|
2023-06-25 12:11:41 +01:00
|
|
|
#include "modplatform/helpers/ExportToModList.h"
|
2023-06-22 14:05:47 +01:00
|
|
|
|
|
|
|
namespace Ui {
|
2023-06-25 12:11:41 +01:00
|
|
|
class ExportToModListDialog;
|
2023-06-22 14:05:47 +01:00
|
|
|
}
|
|
|
|
|
2023-06-25 12:11:41 +01:00
|
|
|
class ExportToModListDialog : public QDialog {
|
2023-06-22 14:05:47 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-06-25 12:11:41 +01:00
|
|
|
explicit ExportToModListDialog(InstancePtr instance, QWidget* parent = nullptr);
|
|
|
|
~ExportToModListDialog();
|
|
|
|
|
|
|
|
void done(int result) override;
|
2023-06-22 14:05:47 +01:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void formatChanged(int index);
|
2023-06-22 14:49:19 +01:00
|
|
|
void triggerImp();
|
|
|
|
void trigger(int) { triggerImp(); };
|
2023-06-22 14:05:47 +01:00
|
|
|
|
|
|
|
private:
|
2023-06-25 12:11:41 +01:00
|
|
|
QString extension();
|
2023-06-22 14:05:47 +01:00
|
|
|
QList<Mod*> m_allMods;
|
|
|
|
bool m_template_selected;
|
2023-06-25 12:11:41 +01:00
|
|
|
QString name;
|
|
|
|
ExportToModList::Formats format = ExportToModList::Formats::HTML;
|
|
|
|
Ui::ExportToModListDialog* ui;
|
2023-06-22 14:05:47 +01:00
|
|
|
};
|