editor.h
Go to the documentation of this file.
00001 #ifndef MAINWINDOW_H
00002 #define MAINWINDOW_H
00003 
00004 #include <QMainWindow>
00005 #include <QDomElement>
00006 
00007 namespace Ui {
00008     class MainWindow;
00009 }
00010 
00011 class QGraphicsScene;
00012 class QCloseEvent;
00013 
00014 class Arena;
00015 class ArenaController;
00016 class ArenaElement;
00017 class ArenaScene;
00018 class ArenaView;
00019 class ArenaElementTypeRegistry;
00020 class ArenaElementTypeScene;
00021 
00022 class Editor : public QMainWindow
00023 {
00024     Q_OBJECT
00025 
00026 public:
00027     Editor(QWidget *parent = 0);
00028     ~Editor();
00029 
00030     void loadConfig(const QString& configFile);
00031 
00032     bool loadingSuccessful() { return m_loadingSuccessful; }
00033 
00034 public slots:
00035     // -- Element Operations --
00036     void slotRotateClockwise();
00037     void slotRotateCounterClockwise();
00038     void slotRemove();
00039     void slotItemMountPointChanged(int index);
00040 
00041     // -- File Operations --
00042     void slotNew();
00043     void slotOpen();
00044     void slotSave();
00045     void slotSaveAs();
00046     void slotExport();
00047     void slotExportSdf();
00048     void slotSelectionChanged();
00049 
00050     // -- Help Menu --
00051     void slotShowDocumentation();
00052 
00053     // -- Views --
00054     void slotElementTypeHovered(ArenaElement *element);
00055 
00056 private slots:
00057     void slotModified();
00058 
00059 private:
00062     QString findRosPackage(const QString& name);
00065     bool parseRosPackageDirsFromCommandLineArguments();
00066     void askToSaveChangesIfModified();
00067     void setCurrentArenaFile(QString fileName);
00068     void closeEvent(QCloseEvent *event);
00069 
00070     Ui::MainWindow *m_ui;
00071 
00072     bool m_loadingSuccessful;
00073     // Loaded from config.xml
00074     QString m_exportDir;
00075     QString m_openSaveDir;
00076     QString m_currentArenaFile;
00077     Arena *m_arena;
00078     ArenaController *m_controller;
00079     ArenaElementTypeScene *m_typeScene;
00080     ArenaScene *m_arenaScene;
00081     ArenaView *m_arenaView;
00082     ArenaElementTypeRegistry *m_typeRegistry;
00083 
00084     QString m_hector_arena_gui_package_dir;
00085     QString m_hector_arena_elements_package_dir;
00086     QString m_hector_arena_worlds_package_dir;
00087 
00088     // Default window title set in UI file
00089     QString m_windowTitlePrefix;
00090 };
00091 
00092 #endif // MAINWINDOW_H


hector_nist_arena_designer
Author(s): Johannes Simon, Stefan Kohlbrecher
autogenerated on Mon Oct 6 2014 00:26:31