-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlocal_master.h
76 lines (49 loc) · 1.18 KB
/
local_master.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
#ifndef local_master_H
#define local_master_H
#include "chessBoard.h"
#include "cell_label.h"
#include <QMainWindow>
#include <QtNetwork>
namespace Ui {
class local_master;
}
class local_master : public QMainWindow {
Q_OBJECT
public:
explicit local_master(QWidget *parent = nullptr);
~local_master();
signals:
void showmain();
private slots:
void new_client();
void fresh();
void read_data();
void on_chess1_clicked();
void on_chess2_clicked();
void on_chess3_clicked();
void cells_clicked(int i, int j);
private:
QVector<QVector<cell_label *>> cells;
QParallelAnimationGroup *animationGroup;
stack<pair<point, char>> movedChess;
void action(int order);
void refresh_text();
void finger_guess_animation();
void first_second();
void refresh_board(chessboard *chessBoard);
void initialize(int order);
int turns;
Ui::local_master *ui;
QTcpServer *tcpServer;
QTcpSocket *tcpSocket;
chessboard *chessBoard;
QString *picname;
int wait;
int count_rps;
int master_rps;
int slave_rps;
int order;
int *num_chess;
int chesstype;
};
#endif // local_master_H