-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gameuiview.h
85 lines (72 loc) · 1.55 KB
/
Gameuiview.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
#pragma once
#include <QWidget>
#include "ui_Gameuiview.h"
#include "Gamemodel.h"
#include"msgwin.h"
#include <windows.h>
#include "Invatewin.h"
#include "osapi/Mutex.h"
#include "QMediaPlayer"
class Gameuiview : public QWidget
{
Q_OBJECT
public:
Gameuiview(QWidget *parent = Q_NULLPTR);
void paintEvent(QPaintEvent *event);
int r_, c_;
void mouseMoveEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
bool ispressed;
bool isfastmode;
void Oncheckright();
void Login();
void Reset();
void Starecvinvt()
{
tm_recvinvt = startTimer(500);
}
void Stprecvinvt()
{
killTimer(tm_recvinvt);
tm_recvinvt = -1;
}
void Stpgetinvtans()
{
killTimer(tm_ansinvt);
tm_ansinvt = -1;
}
void recvinvt();
void getinvtans();
void startnewgame(int n);
void bangdown(int r,int c);
void refreshpeer();
void refreshself();
Invatewin invtw;
msgwin gmsg;
OS_Mutex mutex_msg;
char state;
int tm_ansinvt, tm_recvinvt,tm_start,tm_rest;
private:
Ui::Gameuiview ui;
QPixmap pm_bg, black, white, red,green;
QMediaPlayer* bangdownmu;
Gamemodel* model;
void timerEvent(QTimerEvent *event);
public slots:
void Onexitlogin();
void Reconn();
void Invate();
void acptinvt();
void rjtinvt();
void Newgame();
void qtrm();
void msgwinok();
void msgwincancel();
void surrend();
void chat();
void gameover();
void Ongameover(bool iswin);
void Onchangefastmode();
void onFriendSelected(QListWidgetItem *item);
void Stagetinvtans(const char* invtname);
};