Map Matching
controller.cpp
Go to the documentation of this file.
1 #include "controller.h"
2 
4 {
5 
7  m_qMapWidget->resize(1000, 800);
9 }
10 
12 {
13  m_solver = solver;
14 }
15 
17 {
18  // signals between process processViewer and solver / map
19  QObject::connect(m_qProcessViewer->closeButton, SIGNAL(pressed()), m_qMapWidget, SLOT(close()));
20  QObject::connect(m_solver, SIGNAL(signalMessage(QString)), m_qProcessViewer, SLOT(onSignalMessage(QString)));
21  QObject::connect(&(m_solver->track), SIGNAL(signalMessage(QString)), m_qProcessViewer, SLOT(onSignalMessage(QString)));
22  QObject::connect(&(m_solver->grid), SIGNAL(signalMessage(QString)), m_qProcessViewer, SLOT(onSignalMessage(QString)));
23  QObject::connect(m_qProcessViewer->startSolver, SIGNAL(clicked()), m_solver, SLOT(onSignalStart()));
24 
25  // signal between solver and map
26  QObject::connect(m_solver, SIGNAL(signalDimension(double, double, double, double)), m_qMapWidget, SLOT(onSignalDimension(double, double, double, double)));
27  QObject::connect(m_solver, SIGNAL(signalAllPoints(std::vector<PointGPS*>*)), m_qMapWidget->m_scene, SLOT(onSignalAllPoints(std::vector<PointGPS*>*)));
28  QObject::connect(m_solver, SIGNAL(signalAllRoads(std::unordered_map<long, Road>*, std::vector<PointRoad>*)), m_qMapWidget->m_scene, SLOT(onSignalAllRoads(std::unordered_map<long, Road>*, std::vector<PointRoad>*)));
29  QObject::connect(m_solver, SIGNAL(signalCurrentPoint(int)), m_qMapWidget->m_scene, SLOT(onSignalCurrentPoint(int)));
30 
31  QObject::connect(m_qMapWidget->m_scene, SIGNAL(signalNeighboursId(std::vector<long>*)), m_solver, SLOT(onSignalNeighbours(std::vector<long>*)));
32  QObject::connect(m_qMapWidget->m_next, SIGNAL(released()), m_solver, SLOT(onSignalNextStep()));
33  connect(m_solver, SIGNAL(signalCurrentPoint(int)), m_qMapWidget->m_scene, SLOT(onSignalCurrentPoint(int)));
34  connect(m_solver, SIGNAL(signalRoadPath(std::vector<long>*)), m_qMapWidget->m_scene, SLOT(onSignalRoadPath(std::vector<long>*)));
35 
36  /*QObject::connect(m_qMapWidget->m_qMapViewer, SIGNAL(signalTrackCompleted(QString)), m_qMapWidget, SLOT(onSignalShow()));
37  QObject::connect(m_qMapWidget->m_qMapViewer, SIGNAL(signalTrackCompleted(QString)), m_qProcessViewer, SLOT(onSignalMessage(QString)));
38  */
39 }
QPushButton * closeButton
QPushButton * m_next
Definition: qmapwidget.h:21
QProcessViewer * m_qProcessViewer
Definition: controller.h:18
Track track
Definition: solver.h:57
Grid grid
Definition: solver.h:58
Definition: solver.h:16
QPushButton * startSolver
Solver * m_solver
Definition: controller.h:17
QMapWidget * m_qMapWidget
Definition: controller.h:19
QMapScene * m_scene
Definition: qmapwidget.h:20
void addSolver(Solver *solver)
Definition: controller.cpp:11
void connectSignals()
Definition: controller.cpp:16