editor.h
Go to the documentation of this file.
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 #include <QMainWindow>
5 #include <QDomElement>
6 
7 namespace Ui {
8  class MainWindow;
9 }
10 
11 class QGraphicsScene;
12 class QCloseEvent;
13 
14 class Arena;
15 class ArenaController;
16 class ArenaElement;
17 class ArenaScene;
18 class ArenaView;
21 
22 class Editor : public QMainWindow
23 {
24  Q_OBJECT
25 
26 public:
27  Editor(QWidget *parent = 0);
28  ~Editor();
29 
30  void loadConfig(const QString& configFile);
31 
32  bool loadingSuccessful() { return m_loadingSuccessful; }
33 
34 public slots:
35  // -- Element Operations --
36  void slotRotateClockwise();
37  void slotRotateCounterClockwise();
38  void slotRemove();
39  void slotItemMountPointChanged(int index);
40 
41  // -- File Operations --
42  void slotNew();
43  void slotOpen();
44  void slotSave();
45  void slotSaveAs();
46  void slotExport();
47  void slotExportSdf();
48  void slotSelectionChanged();
49 
50  // -- Help Menu --
51  void slotShowDocumentation();
52 
53  // -- Views --
54  void slotElementTypeHovered(ArenaElement *element);
55 
56 private slots:
57  void slotModified();
58 
59 private:
62  QString findRosPackage(const QString& name);
65  bool parseRosPackageDirsFromCommandLineArguments();
66  void askToSaveChangesIfModified();
67  void setCurrentArenaFile(QString fileName);
68  void closeEvent(QCloseEvent *event);
69 
70  Ui::MainWindow *m_ui;
71 
73  // Loaded from config.xml
74  QString m_exportDir;
75  QString m_openSaveDir;
83 
87 
88  // Default window title set in UI file
90 };
91 
92 #endif // MAINWINDOW_H
ArenaView * m_arenaView
Definition: editor.h:81
Definition: editor.h:7
QString m_hector_arena_gui_package_dir
Definition: editor.h:84
Ui::MainWindow * m_ui
Definition: editor.h:70
ArenaScene * m_arenaScene
Definition: editor.h:80
ArenaElementTypeScene * m_typeScene
Definition: editor.h:79
QString m_exportDir
Definition: editor.h:74
bool loadingSuccessful()
Definition: editor.h:32
Arena * m_arena
Definition: editor.h:77
Definition: arena.h:10
QString m_currentArenaFile
Definition: editor.h:76
QString m_openSaveDir
Definition: editor.h:75
bool m_loadingSuccessful
Definition: editor.h:72
QString m_windowTitlePrefix
Definition: editor.h:89
Definition: editor.h:22
QString m_hector_arena_worlds_package_dir
Definition: editor.h:86
ArenaElementTypeRegistry * m_typeRegistry
Definition: editor.h:82
ArenaController * m_controller
Definition: editor.h:78
QString m_hector_arena_elements_package_dir
Definition: editor.h:85


hector_nist_arena_designer
Author(s): Stefan Kohlbrecher , Johannes Simon
autogenerated on Fri Aug 21 2020 10:45:27