-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.hpp
79 lines (64 loc) · 1.98 KB
/
mainwindow.hpp
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
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QObject>
#include "errcodes.hpp"
#include "linefinder.hpp"
#include "play.hpp"
#include <QMessageBox>
#include "settingsdialog.hpp"
#include "selectplayersprite.h"
/*! This namespaces contains the GUI (Ui = user interface). */
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
/*!
* \brief Executes when the 'select' button is clicked.
*
* Lets the user select a file via a file dialog (provided by Qt), tells the
* LineFinder object about it and displays it in the GUI.
*
*/
void on_selection_clicked();
/*!
* \brief Executes when the 'convert' button is clicked.
*
* First makes sure there has been an image selected, when not, it aborts.
* Then the magic happens, the lines are extracted, the information about their
* locations is stored in the std::vector<std::vector<int> > levelMap and at last
* the extracted lines are displayed in the GUI.
*/
void on_conversion_clicked();
/*!
* \brief Executes when the 'play' button is clicked.
*
* Makes sure there has been an image selected AND that it has been converted,
* then builds a level out of the calculated data and creates the game.
*/
void on_game_clicked();
/*!
* \brief When the 'exit' button is clicked this function is executed and
* terminates the application.
*/
void on_exit_clicked();
void on_action_about_triggered();
void on_action_Configure_image_analysis_settings_triggered();
void on_actionSelect_player_sprite_triggered();
private:
Ui::MainWindow *ui;
settingsDialog sD;
selectPlayerSprite sPS;
QWidget about;
QWidget configImage;
bool selected;
bool converted;
QMessageBox message;
};
#endif // MAINWINDOW_H