-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgameinfomodel.cpp
More file actions
178 lines (143 loc) · 3.41 KB
/
Copy pathgameinfomodel.cpp
File metadata and controls
178 lines (143 loc) · 3.41 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#include "gameinfomodel.h"
GameInfoModel::GameInfoModel(QObject *parent) : QObject(parent) {}
QString GameInfoModel::title() const {
return m_gameInfo.title;
}
QString GameInfoModel::md5hash() const {
return m_gameInfo.md5hash;
}
unsigned int GameInfoModel::id() const {
return m_gameInfo.id;
}
QString GameInfoModel::image_icon() const {
return m_gameInfo.image_icon;
}
QUrl GameInfoModel::image_icon_url() const {
return m_gameInfo.image_icon_url;
}
QUrl GameInfoModel::game_link() const {
return m_gameInfo.game_link;
}
QString GameInfoModel::console() const {
return m_gameInfo.console;
}
QUrl GameInfoModel::console_icon() const {
return m_gameInfo.console_icon;
}
unsigned int GameInfoModel::completion_count() const {
return m_gameInfo.completion_count;
}
int GameInfoModel::achievement_count() const {
return m_gameInfo.achievement_count;
}
bool GameInfoModel::beaten() const {
return m_gameInfo.beaten;
}
bool GameInfoModel::mastered() const {
return m_gameInfo.mastered;
}
int GameInfoModel::point_total() const {
return m_gameInfo.point_total;
}
unsigned int GameInfoModel::missable_count() const {
return m_gameInfo.missable_count;
}
int GameInfoModel::point_count() const {
return m_gameInfo.point_count;
}
QString GameInfoModel::rich_presence() const {
return m_gameInfo.rich_presence;
}
void GameInfoModel::updateCompletionCount() {
m_gameInfo.completion_count++;
emit dataChanged();
}
void GameInfoModel::updatePointCount(unsigned int points) {
m_gameInfo.point_count += points;
emit dataChanged();
}
void GameInfoModel::title(const QString& t)
{
m_gameInfo.title = t;
emit dataChanged();
}
void GameInfoModel::md5hash(const QString& md5)
{
m_gameInfo.md5hash = md5;
emit dataChanged();
}
void GameInfoModel::id(const unsigned int& i)
{
m_gameInfo.id = i;
emit dataChanged();
}
void GameInfoModel::image_icon(const QString& ii)
{
m_gameInfo.image_icon = ii;
emit dataChanged();
}
void GameInfoModel::image_icon_url(const QUrl& iu)
{
m_gameInfo.image_icon_url = iu;
emit dataChanged();
}
void GameInfoModel::game_link(const QUrl& gl)
{
m_gameInfo.game_link = gl;
emit dataChanged();
}
void GameInfoModel::console(const QString& c)
{
m_gameInfo.console = c;
emit dataChanged();
}
void GameInfoModel::console_icon(const QUrl& ci)
{
m_gameInfo.console_icon = ci;
emit dataChanged();
}
void GameInfoModel::completion_count(const unsigned int& cc)
{
m_gameInfo.completion_count = cc;
emit dataChanged();
}
void GameInfoModel::beaten(const bool& b)
{
m_gameInfo.beaten = b;
if(b)
emit beatenGame();
emit dataChanged();
}
void GameInfoModel::mastered(const bool& m)
{
m_gameInfo.mastered = m;
if(m)
emit masteredGame();
emit dataChanged();
}
void GameInfoModel::point_total(const int& pt)
{
m_gameInfo.point_total = pt;
emit dataChanged();
}
void GameInfoModel::missable_count(const unsigned int& mc)
{
m_gameInfo.missable_count = mc;
emit dataChanged();
}
void GameInfoModel::point_count(const int& pc)
{
m_gameInfo.point_count = pc;
emit dataChanged();
}
void GameInfoModel::achievement_count(const int& ac)
{
m_gameInfo.achievement_count = ac;
emit dataChanged();
}
void GameInfoModel::rich_presence(const QString& rp) {
m_gameInfo.rich_presence = rp;
}
void GameInfoModel::clearGame() {
m_gameInfo = GameInfo();
}