2024-07-30 11:42:36 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
|
|
|
// SPDX-License-Identifier: GPL-3.0+
|
2023-05-25 16:24:01 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QtWidgets/QWidget>
|
|
|
|
|
|
|
|
#include "ui_GamePatchDetailsWidget.h"
|
|
|
|
#include "ui_GamePatchSettingsWidget.h"
|
|
|
|
|
|
|
|
#include "pcsx2/Patch.h"
|
|
|
|
|
|
|
|
namespace GameList
|
|
|
|
{
|
|
|
|
struct Entry;
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
class SettingsWindow;
|
2023-05-25 16:24:01 +00:00
|
|
|
|
|
|
|
class GamePatchDetailsWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GamePatchDetailsWidget(std::string name, const std::string& author, const std::string& description, bool enabled,
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow* dialog, QWidget* parent);
|
2023-05-25 16:24:01 +00:00
|
|
|
~GamePatchDetailsWidget();
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void onEnabledStateChanged(int state);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::GamePatchDetailsWidget m_ui;
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow* m_dialog;
|
2023-05-25 16:24:01 +00:00
|
|
|
std::string m_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
class GamePatchSettingsWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-10-14 08:45:09 +00:00
|
|
|
GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
2024-01-01 02:40:14 +00:00
|
|
|
void disableAllPatches();
|
2023-05-25 16:24:01 +00:00
|
|
|
~GamePatchSettingsWidget();
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void onReloadClicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void reloadList();
|
2023-11-26 05:17:41 +00:00
|
|
|
void setUnlabeledPatchesWarningVisibility(bool visible);
|
2023-05-25 16:24:01 +00:00
|
|
|
|
|
|
|
Ui::GamePatchSettingsWidget m_ui;
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow* m_dialog;
|
2023-05-25 16:24:01 +00:00
|
|
|
};
|