BuildingMakerPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_GUI_BUILDING_BUILDINGMAKERPRIVATE_HH_
18 #define _GAZEBO_GUI_BUILDING_BUILDINGMAKERPRIVATE_HH_
19 
20 #include <map>
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
25 #include <sdf/sdf.hh>
26 
28 
29 #include "gazebo/gui/qt.h"
31 
33 
35 
36 namespace gazebo
37 {
38  namespace gui
39  {
40  class BuildingModelManip;
41  class SaveDialog;
42 
46  {
49  public: enum SaveState
50  {
51  // NEVER_SAVED: The building has never been saved.
53 
54  // ALL_SAVED: All changes have been saved.
56 
57  // UNSAVED_CHANGES: Has been saved before, but has unsaved changes.
59  };
60 
63  public: std::map<std::string, BuildingModelManip *> allItems;
64 
67  public: std::map<std::string, std::vector<std::string>> attachmentMap;
68 
70  public: sdf::SDFPtr modelSDF;
71 
73  public: sdf::SDFPtr modelTemplateSDF;
74 
76  public: std::string modelName;
77 
79  public: std::string folderName;
80 
82  public: std::string buildingDefaultName;
83 
85  public: std::string previewName;
86 
89 
91  public: int wallCounter;
92 
94  public: int windowCounter;
95 
97  public: int doorCounter;
98 
100  public: int stairsCounter;
101 
103  public: int floorCounter;
104 
107 
109  public: std::vector<event::ConnectionPtr> connections;
110 
112  public: std::unique_ptr<SaveDialog> saveDialog;
113 
116 
119  public: QColor selectedColor;
120 
123  public: QString selectedTexture;
124 
126  public: int currentLevel;
127 
130 
133  };
134  }
135 }
136 
137 #endif
Definition: BuildingMakerPrivate.hh:45
sdf::SDFPtr modelTemplateSDF
A template SDF of a simple box model.
Definition: BuildingMakerPrivate.hh:73
rendering::VisualPtr previewVisual
The root visual of the building model preview.
Definition: BuildingMakerPrivate.hh:88
rendering::VisualPtr hoverVis
Visual that is currently hovered over by the mouse.
Definition: BuildingMakerPrivate.hh:115
Forward declarations for transport.
int currentLevel
The current level that is being edited.
Definition: BuildingMakerPrivate.hh:126
SaveState
Save states for the building editor.
Definition: BuildingMakerPrivate.hh:49
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:112
Definition: BuildingMakerPrivate.hh:58
std::string previewName
Name of the building model preview.
Definition: BuildingMakerPrivate.hh:85
Definition: BuildingMakerPrivate.hh:52
std::string buildingDefaultName
Default name of building model.
Definition: BuildingMakerPrivate.hh:82
std::vector< event::ConnectionPtr > connections
A list of gui editor events connected to the building maker.
Definition: BuildingMakerPrivate.hh:109
sdf::SDFPtr modelSDF
The building model in SDF format.
Definition: BuildingMakerPrivate.hh:70
int windowCounter
Counter for the number of windows in the model.
Definition: BuildingMakerPrivate.hh:94
Definition: BuildingMakerPrivate.hh:55
transport::NodePtr node
Node used to publish messages.
Definition: BuildingMakerPrivate.hh:129
std::unique_ptr< SaveDialog > saveDialog
A dialog for setting building model name and save location.
Definition: BuildingMakerPrivate.hh:112
transport::PublisherPtr makerPub
Publisher for factory messages.
Definition: BuildingMakerPrivate.hh:132
int wallCounter
Counter for the number of walls in the model.
Definition: BuildingMakerPrivate.hh:91
std::string modelName
Name of the building model.
Definition: BuildingMakerPrivate.hh:76
int stairsCounter
Counter for the number of staircases in the model.
Definition: BuildingMakerPrivate.hh:100
QColor selectedColor
The color currently selected.
Definition: BuildingMakerPrivate.hh:119
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
int doorCounter
Counter for the number of doors in the model.
Definition: BuildingMakerPrivate.hh:97
enum SaveState currentSaveState
Store the current save state of the model.
Definition: BuildingMakerPrivate.hh:106
std::string folderName
Folder name, which is the model name without spaces.
Definition: BuildingMakerPrivate.hh:79
std::map< std::string, std::vector< std::string > > attachmentMap
A map of building part names to model manip objects which manage the visuals representing the buildin...
Definition: BuildingMakerPrivate.hh:67
std::map< std::string, BuildingModelManip * > allItems
A map of building part names to model manip objects which manage the visuals representing the buildin...
Definition: BuildingMakerPrivate.hh:63
int floorCounter
Counter for the number of floors in the model.
Definition: BuildingMakerPrivate.hh:103
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
QString selectedTexture
The texture currently selected.
Definition: BuildingMakerPrivate.hh:123