-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
66 lines (53 loc) · 1.22 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QCloseEvent>
#include "game.h"
class ChessBoard;
class QSettings;
class QWidget;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
void update();
void initialize_game();
VisualOptions getOptions() {return options;}
private:
ChessBoard *scene;
Game g;
VisualOptions options = VisualOptions(false, false, false);
private slots:
void clicked(int x, int y);
void newGame();
void open();
void save();
void undo();
void redo();
void visualizationChange();
// De volgende lijnen kunnen genegeerd worden voor de opdracht
void on_actionExit_triggered();
void closeEvent (QCloseEvent *event)
{
on_actionExit_triggered();
event->ignore();
}
private:
void createActions();
void createMenus();
QMenu *fileMenu;
QMenu *gameMenu;
QMenu *visualizeMenu;
QAction *newAct;
QAction *openAct;
QAction *saveAct;
QAction *undoAct;
QAction *redoAct;
QAction *exitAct;
QAction* display_moves;
QAction* display_kills;
QAction* display_threats;
QWidget* parent;
};
#endif // MAINWINDOW_H