-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
177 lines (139 loc) · 3.49 KB
/
mainwindow.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
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#pragma once
#include "GameState.h"
#include "logger.h"
#include <QWidget>
#include <QMainWindow>
#include <QtGui>
#include <QPushButton>
#include <QLabel>
#include <QTableView>
#include <QList>
#include <QRadioButton>
#include <QLayout>
#include <QGraphicsSceneEvent>
#include <QSpinBox>
#include <typeinfo>
QT_BEGIN_NAMESPACE
class QGraphicsScene;
class QSplitter;
QT_END_NAMESPACE
namespace Ui {
class MainWindow;
}
class MainWindow : public QWidget //QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void populateScene(int x, int y);
void reColorScene();
void reDrawMenus();
GameState *getGameState();
void loadGame();
void initGameState();
void quitGame();
public slots:
void redrawEverything();
private slots:
void open();
void quit();
void but1();
void but2();
void but3();
void but4();
void but5();
void but6();
void but7();
void but8();
void but9();
void but10();
void but11();
void but12();
void endTurn();
void cancelAction();
void showCredits();
void loadCBTeam1_0(int index);
void loadCBTeam1_1(int index);
void loadCBTeam1_2(int index);
void loadCBTeam1_3(int index);
void loadCBTeam1_4(int index);
void loadCBTeam1_5(int index);
void loadCBTeam1_6(int index);
void loadCBTeam1_7(int index);
void loadCBTeam2_0(int index);
void loadCBTeam2_1(int index);
void loadCBTeam2_2(int index);
void loadCBTeam2_3(int index);
void loadCBTeam2_4(int index);
void loadCBTeam2_5(int index);
void loadCBTeam2_6(int index);
void loadCBTeam2_7(int index);
void loadCBTeam1(int index);
void loadCBTeam2(int index);
void loadAscLvl(int index);
void loadFieldWidth(int index);
void loadFieldLength(int index);
private:
Ui::MainWindow *ui;
void setupMatrix();
void startGameState();
void restartGameState(vector<string> team1, vector<string> team2,
Team t1, Team t2, int ascensionLvl, int fX, int fY);
void mainSetup();
void initialSetup();
// If num is less than 0, returns 0. Otherwise, returns num.
int capZero(int num);
void clearLayout(QLayout *l);
void clearSelections();
void setStringLists();
void buttonProcess();
bool isTeamEmpty(vector<string> team);
void printErrorLog();
void printEventLog();
int eventLogSize;
QGraphicsScene *scene;
QAction *openAction;
QAction *exitAction;
QPushButton *quitButton;
QMenu *fileMenu;
QLabel *errorLabel;
QLabel *name;
QLabel *teamName;
QLabel *icon;
QLabel *nextServ;
QLabel *nextServTeam;
QRadioButton *button1;
QRadioButton *button2;
QRadioButton *button3;
QRadioButton *button4;
QRadioButton *button5;
QRadioButton *button6;
QRadioButton *button7;
QRadioButton *button8;
QRadioButton *button9;
QRadioButton *button10;
QRadioButton *button11;
QRadioButton *button12;
QTableView *statsTable1;
QTableView *statsTable2;
QTableView *statsTable3;
QTableView *debuffTable;
QHBoxLayout *mainLayout;
GameState *gs;
Logger *log;
// Stuff for the loading dialog
vector<string> teamOne;
vector<string> teamTwo;
QStringList servantNames;
Team tOne;
Team tTwo;
QStringList teamNames;
QStringList ascLevelNames;
int ascLevel;
int fieldWid;
int fieldLen;
};
#endif // MAINWINDOW_H