-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyWidget.h
49 lines (43 loc) · 922 Bytes
/
MyWidget.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
#pragma once
#include <Segment.h>
class MyWidget:public QWidget
{
Q_OBJECT
QVector<QVector<Segment> > Box;
QPixmap Pic[7];
QTimer* Timer1;
QTimer* Timer2;
QTimer* TimerWin;
int ListIter;
QVector<QVector<Segment*> > WinArrays;
MyEnum Action;
int Last[2];
int Turn;
QPoint oldPos;
QString* StrPoint1;
QString* StrPoint2;
QPoint Point1;
QPoint Point2;
QPushButton* BTNPoint1;
QPushButton* BTNPoint2;
public:
MyWidget(QWidget*parent=0);
~MyWidget();
void paintEvent(QPaintEvent*p);
void mousePressEvent(QMouseEvent*p);
void mouseReleaseEvent(QMouseEvent*p);
void closeEvent(QCloseEvent*p){
p->ignore();
}
int Win();
void SetCoord();
bool CheckWin();
friend class MainWidget;
friend class MyApplication;
signals:
void GameOver();
void WriteSett();
void Save();
public slots:
void TimerWinOut();
};