MRXT: The Multi-Robot eXploration Tool
Multi-Robot autonomous exploration and mapping simulator.
|
00001 00002 #ifndef MAINWINDOW_H 00003 #define MAINWINDOW_H 00004 00005 #include "ui_mainWindow.h" 00006 #include "ConfigFile.h" 00007 #include "simulatedModel.h" 00008 #include "team.h" 00009 #include <QPixmap> 00010 #include <QActionGroup> 00011 #include <QGraphicsScene> 00012 #include <QGraphicsView> 00013 #include <QThread> 00014 00015 00016 /** 00017 * @brief Class used to attend the stop button 00018 * 00019 */ 00020 class waitEnding : public QThread{ 00021 Q_OBJECT; 00022 public: 00023 team* t; 00024 waitEnding(team* theteam): t(theteam){}; 00025 void run(); 00026 00027 signals: 00028 void simulationFinished(bool); 00029 00030 }; 00031 00032 00033 /** 00034 * @brief QT main window. Implements the slots for the events. 00035 * 00036 */ 00037 class MainWindow : public QMainWindow, public Ui::MainWindow 00038 { 00039 Q_OBJECT 00040 private: 00041 00042 int numrobots; 00043 ConfigFile* expConf; 00044 ConfigFile* scenarioConf; 00045 ConfigFile* slamConf; 00046 ConfigFile* appConf; 00047 simulatedModel* scene; 00048 team* myteam; 00049 slamInterface* slam; 00050 bool mapLoaded; 00051 QActionGroup* strategiesGroup; 00052 QGraphicsScene qscene; 00053 QGraphicsView view; 00054 double scale; 00055 bool scaleInitialized; 00056 std::vector<QGraphicsItemGroup*> robotShapes; 00057 waitEnding* waitTh; 00058 00059 void drawRobots(); 00060 void drawScene(); 00061 00062 00063 public: 00064 00065 MainWindow(QWidget *parent = 0); 00066 00067 ~MainWindow(); 00068 00069 public slots: 00070 00071 void randomPoses(bool checked); 00072 void openScenario(bool checked); 00073 void saveOmap(bool checked); 00074 void saveVmap(bool checked); 00075 void saveSLAMlog(bool checked); 00076 void saveGTlog(bool checked); 00077 void changeNumRobots(int n); 00078 void updatePoses(rposes poses); 00079 void updateSlam(); 00080 void startSimulation(bool); 00081 void stopSimulation(bool); 00082 void openScenePropDiag(bool=true); 00083 void openRobotSetDiag(bool=true); 00084 void openStrategyOptDiag(bool=true); 00085 void openSLAMOptSetDiag(bool=true); 00086 void openAboutDiag(bool); 00087 void openAppConfigDiag(bool); 00088 void changeStrategy(bool=true); 00089 void changeSlam(bool=true); 00090 void sceneZoom(int newscale); 00091 00092 }; 00093 #endif