-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtitle.h
83 lines (57 loc) · 1.66 KB
/
title.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
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
#ifndef TITLE_H
#define TITLE_H
#include <QWidget>
#include <QMap>
#include "usersettings.h"
#include "buttonrelay.h"
#include "gameproperties.h"
#include "mainwindow.h"
namespace Ui {
class Title;
}
class MainWindow;
class Title : public QWidget
{
Q_OBJECT
public:
explicit Title(QWidget *parent = 0, bool isUserSelected = false);
~Title();
signals:
void startGame(int);
void startLineFind();
private slots:
void userButtonClicked(QVariant userName);
void gameButtonClicked(QVariant gameID);
void shopButtonClicked(QVariant gameID);
void on_titleToLogin_clicked();
void on_AddUser_clicked();
void removeUser_clicked();
void removeMenu();
void on_shopButton_clicked();
void on_backToUserGames_clicked();
void on_backToUserList_clicked();
private:
bool addUser(QString newUser);
bool removeUser(QString userName);
void makeAllUserButtons();
void makeUserButton(QString name);
void removeAllUserButtons();
void makeAllGameButtons();
void makeGameButton(GameProperties* gameProps);
void removeAllGameButtons();
void makeAllShopButtons();
void makeShopButton(GameProperties* gameProps);
void removeShopButton(GameProperties* gameProps);
void removeAllShopButtons();
void addMenu();
QList<ButtonRelay*> m_userButtonRelays;
QList<QPushButton*> m_userPushButtons;
QList<ButtonRelay*> m_gameButtonRelays;
QList<QPushButton*> m_gamePushButtons;
QList<ButtonRelay*> m_shopButtonRelays;
QList<QPushButton*> m_shopPushButtons;
QMap<int, GameProperties*> m_gameProperties;
MainWindow* m_mainWindow;
Ui::Title *ui;
};
#endif // TITLE_H