-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
42 lines (36 loc) · 889 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QTimer>
#include <QPushButton>
#include <QCheckBox>
#include <vector>
#include <qapplication.h>
#include <qmessagebox.h>
#include "gamecontroller.h"
#include "constant.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
void askUser();
void initGamecontroller(Mode mode);
void initMonitor();
void initFunction();
void switchNightMode(){
if(scene->backgroundBrush()==QBrush(Qt::black))
scene->setBackgroundBrush(QPixmap("d.jpg"));
else scene->setBackgroundBrush(QBrush(Qt::black));
}
void newGame();
QGraphicsScene *scene;
QGraphicsView *view;
Gamecontroller *ctrl;
Mode mode;
};
#endif // MAINWINDOW_H