18 #ifndef _EDITOR_VIEW_HH_
19 #define _EDITOR_VIEW_HH_
39 class LevelInspectorDialog;
88 public:
void Create3DVisual(
EditorItem *_item);
96 private:
void resizeEvent(QResizeEvent *_event);
101 private:
void scrollContentsBy(
int _dx,
int _dy);
105 private:
void contextMenuEvent(QContextMenuEvent *_event);
109 private:
void wheelEvent(QWheelEvent *_event);
113 private:
void mouseMoveEvent(QMouseEvent *_event);
117 private:
void mousePressEvent(QMouseEvent *_event);
121 private:
void mouseReleaseEvent(QMouseEvent *_event);
125 private:
void mouseDoubleClickEvent(QMouseEvent *_event);
129 private:
void keyPressEvent(QKeyEvent *_event);
133 private:
void DrawWall(
const QPoint &_pos);
138 private:
void DrawWindow(
const QPoint &_pos);
143 private:
void DrawDoor(
const QPoint &_pos);
148 private:
void DrawStairs(
const QPoint &_pos);
153 private:
void OnCreateEditorItem(
const std::string &_type);
160 private:
void OnFinishModel();
163 private:
void OnDiscardModel();
166 private slots:
void OnAddLevel();
170 private slots:
void OnDeleteLevel();
173 private slots:
void OnLevelApply();
176 private slots:
void OnOpenLevelInspector();
180 private:
void OnChangeLevel(
int _level);
184 private:
void DeleteLevel(
int _level);
187 private:
void CancelDrawMode();
190 private:
int drawMode;
193 private:
bool drawInProgress;
196 private: std::vector<WallItem*> wallList;
199 private: std::vector<WindowItem*> windowList;
202 private: std::vector<DoorItem*> doorList;
205 private: std::vector<StairsItem*> stairsList;
208 private: std::vector<FloorItem*> floorList;
211 private: std::map<EditorItem *, std::string> itemToVisualMap;
214 private: std::vector<event::ConnectionPtr> connections;
218 private: QGraphicsItem *currentMouseItem;
221 private: QGraphicsItem *currentSelectedItem;
229 private:
int currentLevel;
232 private: std::vector<Level *> levels;
236 private:
int levelCounter;
239 private: QAction *openLevelInspectorAct;
242 private: QAction *addLevelAct;
245 private: QAction *deleteLevelAct;
249 private:
double mousePressRotation;
258 private:
double viewScale;
262 private:
bool snapToCloseWall;
Base class of an item in the editor.
Definition: EditorItem.hh:34
Wall mode.
Definition: EditorView.hh:71
Window mode.
Definition: EditorView.hh:73
Door mode.
Definition: EditorView.hh:75
DrawModes
Unique identifiers for all drawing modes within the editor.
Definition: EditorView.hh:67
Create and manage 3D visuals of a building.
Definition: BuildingMaker.hh:51
A convenient structure for storing level information.
Definition: EditorView.hh:44
Dialog for configuring a building level.
Definition: LevelInspectorDialog.hh:34
Control the editor view and manage contents in the editor scene.
Definition: EditorView.hh:61
std::string name
Level name.
Definition: EditorView.hh:50
2D grid lines.
Definition: GridLines.hh:33
int level
Level number.
Definition: EditorView.hh:47
None mode.
Definition: EditorView.hh:69
double height
Level height from ground.
Definition: EditorView.hh:53
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48