| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <string> |
| 7 |
#include <vector> |
| 8 |
|
| 9 |
#include <QWidget> |
| 10 |
|
| 11 |
#include "Common/CommonTypes.h" |
| 12 |
#include "Core/PatchEngine.h" |
| 13 |
|
| 14 |
#ifdef USE_RETRO_ACHIEVEMENTS |
| 15 |
class HardcoreWarningWidget; |
| 16 |
#endif |
| 17 |
class QListWidget; |
| 18 |
class QListWidgetItem; |
| 19 |
class QPushButton; |
| 20 |
|
| 21 |
namespace UICommon |
| 22 |
{ |
| 23 |
class GameFile; |
| 24 |
} |
| 25 |
|
| 26 |
class PatchesWidget : public QWidget |
| 27 |
{ |
| 28 |
Q_OBJECT |
| 29 |
public: |
| 30 |
explicit PatchesWidget(const UICommon::GameFile& game); |
| 31 |
|
| 32 |
#ifdef USE_RETRO_ACHIEVEMENTS |
| 33 |
signals: |
| 34 |
void OpenAchievementSettings(); |
| 35 |
#endif |
| 36 |
|
| 37 |
private: |
| 38 |
void CreateWidgets(); |
| 39 |
void ConnectWidgets(); |
| 40 |
void SavePatches(); |
| 41 |
void Update(); |
| 42 |
void UpdateActions(); |
| 43 |
|
| 44 |
void OnItemChanged(QListWidgetItem*); |
| 45 |
void OnAdd(); |
| 46 |
void OnRemove(); |
| 47 |
void OnEdit(); |
| 48 |
|
| 49 |
#ifdef USE_RETRO_ACHIEVEMENTS |
| 50 |
HardcoreWarningWidget* m_hc_warning; |
| 51 |
#endif |
| 52 |
QListWidget* m_list; |
| 53 |
QPushButton* m_add_button; |
| 54 |
QPushButton* m_edit_button; |
| 55 |
QPushButton* m_remove_button; |
| 56 |
|
| 57 |
std::vector<PatchEngine::Patch> m_patches; |
| 58 |
std::string m_game_id; |
| 59 |
u16 m_game_revision; |
| 60 |
}; |