BuildingEditorEvents.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 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 _BUILDING_EDITOR_EVENTS_HH_
18 #define _BUILDING_EDITOR_EVENTS_HH_
19 
20 #include <string>
21 #include "gazebo/gui/qt.h"
22 #include "gazebo/common/Event.hh"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
29  namespace editor
30  {
31  class GZ_GUI_VISIBLE Events
32  {
36  public: template<typename T>
38  ConnectToggleEditMode(T _subscriber)
39  { return toggleEditMode.Connect(_subscriber); }
40 
44  public: template<typename T>
47  { return createBuildingEditorItem.Connect(_subscriber); }
48 
52  public: template<typename T>
54  ConnectColorSelected(T _subscriber)
55  { return colorSelected.Connect(_subscriber); }
56 
60  public: template<typename T>
62  ConnectTextureSelected(T _subscriber)
63  { return textureSelected.Connect(_subscriber); }
64 
68  public: template<typename T>
70  { return saveBuildingModel.Connect(_subscriber); }
71 
75  public: template<typename T>
78  { return finishBuildingModel.Connect(_subscriber); }
79 
83  public: template<typename T>
85  ConnectNewBuildingModel(T _subscriber)
86  { return newBuildingModel.Connect(_subscriber); }
87 
91  public: template<typename T>
94  { return changeBuildingLevel.Connect(_subscriber); }
95 
99  public: template<typename T>
101  { return addBuildingLevel.Connect(_subscriber); }
102 
106  public: template<typename T>
107  static event::ConnectionPtr
109  { return deleteBuildingLevel.Connect(_subscriber); }
110 
114  public: template<typename T>
116  { return showFloorplan.Connect(_subscriber); }
117 
122  public: template<typename T>
123  static event::ConnectionPtr
125  { return triggerShowFloorplan.Connect(_subscriber); }
126 
130  public: template<typename T>
132  { return showElements.Connect(_subscriber); }
133 
138  public: template<typename T>
139  static event::ConnectionPtr
141  { return triggerShowElements.Connect(_subscriber); }
142 
146  public: template<typename T>
147  static event::ConnectionPtr
149  { return updateLevelWidget.Connect(_subscriber); }
150 
154  public: template<typename T>
155  static event::ConnectionPtr
157  { return changeBuildingEditorZoom.Connect(_subscriber); }
158 
162  public: template<typename T>
164  { return saveBuildingEditor.Connect(_subscriber); }
165 
169  public: template<typename T>
170  static event::ConnectionPtr ConnectSaveAsBuildingEditor
171  (T _subscriber)
172  { return saveAsBuildingEditor.Connect(_subscriber); }
173 
177  public: template<typename T>
178  static event::ConnectionPtr
180  { return newBuildingEditor.Connect(_subscriber); }
181 
185  public: template<typename T>
187  { return exitBuildingEditor.Connect(_subscriber); }
188 
192  public: template<typename T>
193  static event::ConnectionPtr ConnectBuildingNameChanged
194  (T _subscriber)
195  { return buildingNameChanged.Connect(_subscriber); }
196 
199 
201  public: static event::EventT<void (std::string)>
203 
206 
209 
212 
215 
218 
221 
224 
227 
230 
233 
236 
239 
243 
246 
249 
252 
255 
258 
261  };
262  }
263  }
264 }
265 #endif
static event::EventT< void()> finishBuildingModel
A model has been completed and uploaded onto the server.
Definition: BuildingEditorEvents.hh:214
static event::ConnectionPtr ConnectColorSelected(T _subscriber)
Connect a Gazebo event to the color selected signal.
Definition: BuildingEditorEvents.hh:54
Forward declarations for the common classes.
Definition: Animation.hh:26
static event::EventT< void()> deleteBuildingLevel
A level has been deleted.
Definition: BuildingEditorEvents.hh:226
static event::ConnectionPtr ConnectTriggerShowFloorplan(T _subscriber)
Connect a Gazebo event to the trigger show floorplan signal.
Definition: BuildingEditorEvents.hh:124
static event::ConnectionPtr ConnectSaveBuildingModel(T _subscriber)
Connect a Gazebo event to the save model signal.
Definition: BuildingEditorEvents.hh:69
static event::EventT< void()> triggerShowFloorplan
Trigger show floorplan.
Definition: BuildingEditorEvents.hh:232
static event::EventT< void()> showFloorplan
Show or hide floorplan.
Definition: BuildingEditorEvents.hh:229
static event::EventT< void(int, std::string)> updateLevelWidget
The levels have been changed.
Definition: BuildingEditorEvents.hh:242
static event::ConnectionPtr ConnectChangeBuildingEditorZoom(T _subscriber)
Connect a Gazebo event to the change zoom signal.
Definition: BuildingEditorEvents.hh:156
static event::EventT< void(bool)> toggleEditMode
Toggle if the edit mode was checked or not.
Definition: BuildingEditorEvents.hh:198
static event::EventT< void(std::string)> buildingNameChanged
Name was changed in the editor palette.
Definition: BuildingEditorEvents.hh:260
static event::EventT< void(std::string)> saveBuildingModel
A model has been saved with a name and a location.
Definition: BuildingEditorEvents.hh:211
static event::EventT< void()> triggerShowElements
Trigger show elements.
Definition: BuildingEditorEvents.hh:238
static event::EventT< void(QString)> textureSelected
A texture has been selected.
Definition: BuildingEditorEvents.hh:208
static event::ConnectionPtr ConnectTriggerShowElements(T _subscriber)
Connect a Gazebo event to the trigger show elements signal.
Definition: BuildingEditorEvents.hh:140
static event::EventT< void()> exitBuildingEditor
Exit the editor mode with the option to save.
Definition: BuildingEditorEvents.hh:257
static event::EventT< void()> newBuildingModel
A new model has been started.
Definition: BuildingEditorEvents.hh:217
static event::ConnectionPtr ConnectExitBuildingEditor(T _subscriber)
Connect a Gazebo event to the exit signal.
Definition: BuildingEditorEvents.hh:186
static event::ConnectionPtr ConnectTextureSelected(T _subscriber)
Connect a Gazebo event to the texture selected signal.
Definition: BuildingEditorEvents.hh:62
static event::ConnectionPtr ConnectShowElements(T _subscriber)
Connect a Gazebo event to the show elements signal.
Definition: BuildingEditorEvents.hh:131
static event::EventT< void(int)> changeBuildingLevel
The current level has been changed.
Definition: BuildingEditorEvents.hh:220
static event::EventT< void(std::string)> createBuildingEditorItem
An editor item is to be created.
Definition: BuildingEditorEvents.hh:202
static event::EventT< void()> newBuildingEditor
Make a new model.
Definition: BuildingEditorEvents.hh:254
static event::ConnectionPtr ConnectDeleteBuildingLevel(T _subscriber)
Connect a Gazebo event to the delete level signal.
Definition: BuildingEditorEvents.hh:108
static event::ConnectionPtr ConnectCreateBuildingEditorItem(T _subscriber)
Connect a Gazebo event to the create editor item signal.
Definition: BuildingEditorEvents.hh:46
Definition: BuildingEditorEvents.hh:31
static event::EventT< void()> addBuildingLevel
A new level has been added.
Definition: BuildingEditorEvents.hh:223
static event::ConnectionPtr ConnectNewBuildingEditor(T _subscriber)
Connect a Gazebo event to the new signal.
Definition: BuildingEditorEvents.hh:179
static event::ConnectionPtr ConnectUpdateLevelWidget(T _subscriber)
Connect a Gazebo event to the update level widget signal.
Definition: BuildingEditorEvents.hh:148
static event::EventT< void(QColor)> colorSelected
A color has been selected.
Definition: BuildingEditorEvents.hh:205
static event::ConnectionPtr ConnectFinishBuildingModel(T _subscriber)
Connect a Gazebo event to the finish model signal.
Definition: BuildingEditorEvents.hh:77
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
gui
Definition: KeyEventHandler.hh:29
static event::EventT< bool()> saveBuildingEditor
Save the model.
Definition: BuildingEditorEvents.hh:248
static event::ConnectionPtr ConnectToggleEditMode(T _subscriber)
Connect a Gazebo event to the toggle edit mode signal.
Definition: BuildingEditorEvents.hh:38
static event::EventT< bool()> saveAsBuildingEditor
Save the model as.
Definition: BuildingEditorEvents.hh:251
static event::ConnectionPtr ConnectShowFloorplan(T _subscriber)
Connect a Gazebo event to the show floorplan signal.
Definition: BuildingEditorEvents.hh:115
static event::EventT< void(double)> changeBuildingEditorZoom
The current zoom level has been changed.
Definition: BuildingEditorEvents.hh:245
static event::ConnectionPtr ConnectNewBuildingModel(T _subscriber)
Connect a Gazebo event to the new model signal.
Definition: BuildingEditorEvents.hh:85
static event::ConnectionPtr ConnectAddBuildingLevel(T _subscriber)
Connect a Gazebo event to the add level signal.
Definition: BuildingEditorEvents.hh:100
static event::ConnectionPtr ConnectSaveBuildingEditor(T _subscriber)
Connect a Gazebo event to the save signal.
Definition: BuildingEditorEvents.hh:163
static event::EventT< void()> showElements
Show or hide building elements.
Definition: BuildingEditorEvents.hh:235
static event::ConnectionPtr ConnectChangeBuildingLevel(T _subscriber)
Connect a Gazebo event to the change model signal.
Definition: BuildingEditorEvents.hh:93