2018-03-25 20:17:47 -06:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
2021-07-04 19:22:19 -06:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-03-25 20:17:47 -06:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-10-03 16:17:45 -06:00
|
|
|
#include <functional>
|
2018-03-25 20:17:47 -06:00
|
|
|
#include <memory>
|
2021-08-21 23:13:00 -06:00
|
|
|
#include <optional>
|
2018-03-25 20:17:47 -06:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2019-01-17 15:28:07 -07:00
|
|
|
#include "DolphinQt/GameList/GameListModel.h"
|
2018-03-25 20:17:47 -06:00
|
|
|
|
2021-08-21 23:13:00 -06:00
|
|
|
#include "Core/CheatSearch.h"
|
|
|
|
|
2018-03-25 20:17:47 -06:00
|
|
|
class ARCodeWidget;
|
2021-08-21 23:13:00 -06:00
|
|
|
class GeckoCodeWidget;
|
|
|
|
class CheatSearchFactoryWidget;
|
2018-03-25 20:17:47 -06:00
|
|
|
class QDialogButtonBox;
|
2021-08-21 23:13:00 -06:00
|
|
|
class PartiallyClosableTabWidget;
|
2018-03-25 20:17:47 -06:00
|
|
|
|
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
enum class State;
|
|
|
|
}
|
|
|
|
|
|
|
|
class CheatsManager : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2021-06-06 13:56:34 -06:00
|
|
|
explicit CheatsManager(QWidget* parent = nullptr);
|
2018-07-10 12:29:17 -06:00
|
|
|
~CheatsManager();
|
2018-03-25 20:17:47 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
void OnStateChanged(Core::State state);
|
2021-08-21 23:13:00 -06:00
|
|
|
void OnNewSessionCreated(const Cheats::CheatSearchSessionBase& session);
|
|
|
|
void OnTabCloseRequested(int index);
|
2018-03-25 20:17:47 -06:00
|
|
|
|
2021-06-06 13:56:34 -06:00
|
|
|
std::string m_game_id;
|
|
|
|
std::string m_game_tdb_id;
|
|
|
|
u16 m_revision = 0;
|
|
|
|
|
2018-03-25 20:17:47 -06:00
|
|
|
QDialogButtonBox* m_button_box;
|
2021-08-21 23:13:00 -06:00
|
|
|
PartiallyClosableTabWidget* m_tab_widget = nullptr;
|
2018-03-25 20:17:47 -06:00
|
|
|
|
|
|
|
ARCodeWidget* m_ar_code = nullptr;
|
2021-08-21 23:13:00 -06:00
|
|
|
GeckoCodeWidget* m_gecko_code = nullptr;
|
|
|
|
CheatSearchFactoryWidget* m_cheat_search_new = nullptr;
|
2018-03-25 20:17:47 -06:00
|
|
|
};
|