-
Notifications
You must be signed in to change notification settings - Fork 34
/
mainwindow.h
47 lines (35 loc) · 997 Bytes
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QGraphicsView>
#include "minesweepscene.h"
#include <QMouseEvent>
#include "cellitem.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void deleteOldScene();//删除旧场景
void addNewScene();//布置新场景
void adjustWindowsWH();//调整主窗口大小
void block_blank(double px, double py, int x, int y);//一整块为空,全部翻起来,直到边缘为数字或遇到边界
bool JudgeIsWin();//判赢
protected:
void mousePressEvent(QMouseEvent *event);
private slots:
void on_actionNew_game_triggered();
void on_actionConfig_triggered();
void on_actionQuit_triggered();
void on_actionAbout_triggered();
private:
Ui::MainWindow *ui;
QGraphicsView *_view;
mineSweepScene *_scene;
cellItem *_cItem;
};
#endif // MAINWINDOW_H