-
Notifications
You must be signed in to change notification settings - Fork 14
/
cheats.h
55 lines (47 loc) · 1.11 KB
/
cheats.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef CHEATS_H
#define CHEATS_H
#include <QDialog>
#include <QGridLayout>
#include <QCheckBox>
#include <QJsonObject>
#include <QButtonGroup>
#include <QPlainTextEdit>
class CheatsTextEdit : public QPlainTextEdit
{
public:
explicit CheatsTextEdit(QString _game, QWidget *parent = 0);
private:
QString m_game = "";
};
class CheatsCheckBox : public QCheckBox
{
public:
explicit CheatsCheckBox(QString _game, QString _cheat, QWidget *parent = 0);
void loadState();
void setGroup(QButtonGroup *group)
{
m_group = group;
}
void setOptionName(QString name)
{
m_optionName = name;
}
private:
QButtonGroup *m_group = nullptr;
QString m_cheatName = "";
QString m_optionName = "";
QString m_game = "";
};
class CheatsDialog : public QDialog
{
Q_OBJECT
public:
CheatsDialog(QString gameName, QWidget *parent = nullptr);
private:
QGridLayout *m_layout;
};
QJsonObject getCheatsFromSettings(QString gameName, QJsonObject gameData);
bool loadCheats(QJsonObject cheatsData);
QString getCheatGameName();
QJsonObject loadCheatData(QString gameName);
#endif