dolphin/Source/Core/DolphinQt/CheatsManager.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.6 KiB
C
Raw Normal View History

2018-03-25 20:17:47 -06:00
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2018-03-25 20:17:47 -06:00
#pragma once
#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"
2021-08-21 23:13:00 -06:00
#include "Core/CheatSearch.h"
#include "DolphinQt/GameList/GameListModel.h"
#include "VideoCommon/VideoEvents.h"
2021-08-21 23:13:00 -06:00
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;
class QHideEvent;
class QShowEvent;
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:
explicit CheatsManager(QWidget* parent = nullptr);
~CheatsManager();
2018-03-25 20:17:47 -06:00
signals:
void OpenGeneralSettings();
void ShowMemory(u32 address);
void RequestWatch(QString name, u32 address);
protected:
void hideEvent(QHideEvent* event) override;
void showEvent(QShowEvent* event) override;
2018-03-25 20:17:47 -06:00
private:
void CreateWidgets();
void ConnectWidgets();
void OnStateChanged(Core::State state);
void OnFrameEnd();
void RegisterAfterFrameEventCallback();
void RemoveAfterFrameEventCallback();
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
void RefreshCodeTabs(Core::State state, bool force);
void UpdateAllCheatSearchWidgetCurrentValues();
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;
Common::EventHook m_VI_end_field_event;
2018-03-25 20:17:47 -06:00
};