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