-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.h
More file actions
79 lines (59 loc) · 1.55 KB
/
MainWindow.h
File metadata and controls
79 lines (59 loc) · 1.55 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
#pragma once
#include <QMainWindow>
#include <QWidget>
#include <QStackedWidget>
#include <QPixmap>
#include <QSettings>
#include <atomic>
#include <QMovie>
#include <QLabel>
#include "HomePage.h"
#include "Homologation.h"
#include "InGame.h"
#include "PreparationMatch.h"
#include "TeamChooser.h"
#include "TestMode.h"
#include "WaintingForTirette.h"
#include "GCMode.h"
#include "tcp/MyTCPClient.h"
enum class DisplayMode
{
FULLSCREEN,
WINDOWED
};
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(const char* address = "127.0.0.1", int port = 8080, QWidget* parent = nullptr);
void setWidgetNb(int index);
void setDisplayMode(DisplayMode mode);
void turnOnTheWindow();
protected slots:
void onHomePressed();
void onHomologationPressed();
void onTeamChooserPressed();
void onTestModePressed();
void onSpawnPointChoose(int nb);
void onWaitingForTirette();
void onStartGame();
void handleMessage(const std::string& message);
private:
QVBoxLayout* mainLayout;
QHBoxLayout* topLayout;
QPushButton* homeBtn;
QWidget* centralWidget;
QStackedWidget* stackedWidget;
QPushButton* quit;
HomePage* home;
Homologation* homologation;
TeamChooser* teamChooser;
PreparationMatch* preparationMatch;
TestMode* testMode;
WaintingForTirette* waintingForTirette;
InGame* inGame;
bool waitingForTiretteValue = false;
DisplayMode displayMode = DisplayMode::WINDOWED;
MyTCPClient* tcpClient;
QSettings* settings;
GCMode* gcMode;
};