-
Notifications
You must be signed in to change notification settings - Fork 11
/
qgamewindow.h
57 lines (43 loc) · 868 Bytes
/
qgamewindow.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
#ifndef __QGAMEWINDOW__
#define __QGAMEWINDOW__
#include <QMainWindow>
#include <QGroupBox>
#include <QSlider>
#include <QMutex>
#include <QLabel>
#include <QPushButton>
#include "qboardc4.h"
#include "qgamethread.h"
#include "board.h"
#include "player.h"
class QPlayer : public QGroupBox {
Q_OBJECT
public:
QPlayer(Token player);
Player *get_player() const;
protected slots:
void update_desc();
private:
QSlider time,iter;
Token player;
QLabel desc;
};
class QGameWindow : public QMainWindow {
Q_OBJECT
public:
QGameWindow();
~QGameWindow();
protected slots:
void start_game();
void game_ended();
private:
QMutex mutex;
QPushButton start;
QLabel winner_label;
QPlayer qplayer_a,qplayer_b;
QBoardC4 *board_widget;
Player *player_a,*player_b;
Board *board;
QGameThread *thread;
};
#endif