-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathblock.h
More file actions
41 lines (29 loc) · 823 Bytes
/
Copy pathblock.h
File metadata and controls
41 lines (29 loc) · 823 Bytes
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
#ifndef BLOCK_H
#define BLOCK_H
#include <QLabel>
#include <QMouseEvent>
#include <QMessageBox>
class Block : public QLabel
{
Q_OBJECT
public:
bool mine_Flag; //雷的标记
int mine_Num; //雷的数目
bool visible_Flag; //可见标记 //槽
bool mark_Flag; //插旗标记 //槽
Block(QWidget *parent = 0);
~Block();
void setMine_Flag(bool flag); //设置是否为雷
void setMine_Num(int num); //计算并设置周围雷的数目
void GameOver();
private slots:
void setVisible_Flag(void); //设置是否可见
void setMark_Flag(void); //设置是否插旗
protected:
void mousePressEvent(QMouseEvent* event);
private:
signals:
void Restart();
void FlagChange();
};
#endif // BLOCK_H