-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphicmaze.h
63 lines (44 loc) · 1.39 KB
/
graphicmaze.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
#ifndef GRAPHICMAZE_H
#define GRAPHICMAZE_H
#include <QMainWindow>
#include <QGraphicsView>
#include "Maze.h"
#include "mazesolver.h"
//#include "mythread.h"
namespace Ui {
class GraphicMaze;
}
class GraphicMaze : public QMainWindow
{
Q_OBJECT
public:
explicit GraphicMaze(Maze *, unsigned int scene_width, unsigned int scene_height, QWidget *parent = nullptr);
~GraphicMaze();
void drawMaze(const Maze*);
// void timeElapsed(int);
private slots:
void on_first_comb_currentIndexChanged(const QString &arg1);
void on_second_comb_currentIndexChanged(const QString &arg1);
void on_third_comb_currentIndexChanged(const QString &arg1);
void on_fourth_comb_currentIndexChanged(const QString &arg1);
void on_dfs_sol_pb_clicked();
std::stack<std::string> getOrder();
void on_delay_hS_valueChanged(int value);
void on_bfs_sol_pb_clicked();
void on_reset_pb_clicked();
private:
void makeWindowTidy();
Ui::GraphicMaze *ui;
Maze* myMaze;
QGraphicsView* gView;
QGraphicsScene* scene;
unsigned int scene_width;
unsigned int scene_height;
std::vector<std::vector<std::pair<Maze::cell*,QGraphicsRectItem*>>> gCells;
std::pair<Maze::cell*,QGraphicsRectItem*> gStart;
std::pair<Maze::cell*,QGraphicsRectItem*> gEnd;
MazeSolver* myMazeSolver;
//myThread solveMazeDFS;
unsigned int delay;
};
#endif // GRAPHICMAZE_H