ModelEditorEvents.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 GAZEBO_GUI_MODEL_MODELEDITOREVENTS_HH_
18#define GAZEBO_GUI_MODEL_MODELEDITOREVENTS_HH_
19
20#include <map>
21#include <string>
22#include <sdf/sdf.hh>
23
25
26#include "gazebo/util/system.hh"
27
28namespace gazebo
29{
30 namespace gui
31 {
32 namespace model
33 {
34 class GZ_GUI_VISIBLE Events
35 {
39 public: template<typename T>
41 { return finishModel.Connect(_subscriber); }
42
46 public: template<typename T>
48 { return saveModelEditor.Connect(_subscriber); }
49
53 public: template<typename T>
55 { return saveAsModelEditor.Connect(_subscriber); }
56
60 public: template<typename T>
62 { return newModelEditor.Connect(_subscriber); }
63
67 public: template<typename T>
69 { return exitModelEditor.Connect(_subscriber); }
70
74 public: template<typename T>
76 { return modelChanged.Connect(_subscriber); }
77
81 public: template<typename T>
83 { return modelNameChanged.Connect(_subscriber); }
84
89 public: template<typename T>
92 { return modelPropertiesChanged.Connect(_subscriber); }
93
97 public: template<typename T>
99 { return saveModel.Connect(_subscriber); }
100
104 public: template<typename T>
106 { return newModel.Connect(_subscriber); }
107
112 public: template<typename T>
114 T _subscriber)
115 { return requestNestedModelRemoval.Connect(_subscriber); }
116
121 public: template<typename T>
123 T _subscriber)
124 { return requestNestedModelInsertion.Connect(_subscriber); }
125
129 public: template<typename T>
131 T _subscriber)
132 { return requestLinkScale.Connect(_subscriber); }
133
137 public: template<typename T>
139 T _subscriber)
140 { return requestLinkMove.Connect(_subscriber); }
141
146 public: template<typename T>
148 T _subscriber)
149 { return requestNestedModelMove.Connect(_subscriber); }
150
154 public: template<typename T>
157 { return nestedModelInserted.Connect(_subscriber); }
158
162 public: template<typename T>
164 { return linkInserted.Connect(_subscriber); }
165
169 public: template<typename T>
171 { return jointInserted.Connect(_subscriber); }
172
176 public: template<typename T>
178 { return jointChanged.Connect(_subscriber); }
179
183 public: template<typename T>
185 { return nestedModelRemoved.Connect(_subscriber); }
186
190 public: template<typename T>
192 T _subscriber)
193 { return requestLinkInsertion.Connect(_subscriber); }
194
198 public: template<typename T>
200 T _subscriber)
201 { return requestLinkRemoval.Connect(_subscriber); }
202
206 public: template<typename T>
208 { return linkRemoved.Connect(_subscriber); }
209
213 public: template<typename T>
215 T _subscriber)
216 { return requestJointRemoval.Connect(_subscriber); }
217
221 public: template<typename T>
223 T _subscriber)
224 { return requestJointInsertion.Connect(_subscriber); }
225
229 public: template<typename T>
231 { return jointRemoved.Connect(_subscriber); }
232
236 public: template<typename T>
238 { return openLinkInspector.Connect(_subscriber); }
239
244 public: template<typename T>
246 T _subscriber)
247 { return openModelPluginInspector.Connect(_subscriber); }
248
252 public: template<typename T>
254 { return openJointInspector.Connect(_subscriber); }
255
259 public: template<typename T>
261 { return jointNameChanged.Connect(_subscriber); }
262
266 public: template<typename T> static event::ConnectionPtr
268 { return showLinkContextMenu.Connect(_subscriber); }
269
273 public: template<typename T> static event::ConnectionPtr
275 { return showJointContextMenu.Connect(_subscriber); }
276
281 public: template<typename T> static event::ConnectionPtr
283 { return showModelPluginContextMenu.Connect(_subscriber); }
284
288 public: template<typename T> static event::ConnectionPtr
290 { return setSelectedEntity.Connect(_subscriber); }
291
295 public: template<typename T> static event::ConnectionPtr
297 { return setSelectedJoint.Connect(_subscriber); }
298
303 public: template<typename T> static event::ConnectionPtr
305 { return setSelectedModelPlugin.Connect(_subscriber); }
306
310 public: template<typename T>
312 T _subscriber)
313 { return modelPluginInserted.Connect(_subscriber); }
314
318 public: template<typename T>
320 T _subscriber)
321 { return modelPluginRemoved.Connect(_subscriber); }
322
327 public: template<typename T>
329 T _subscriber)
330 { return requestModelPluginRemoval.Connect(_subscriber); }
331
336 public: template<typename T>
338 T _subscriber)
339 { return requestModelPluginInsertion.Connect(_subscriber); }
340
342 public: static event::EventT<void ()> finishModel;
343
345 public: static event::EventT<bool ()> saveModelEditor;
346
348 public: static event::EventT<bool ()> saveAsModelEditor;
349
351 public: static event::EventT<void ()> newModelEditor;
352
354 public: static event::EventT<void ()> exitModelEditor;
355
357 public: static event::EventT<void ()> modelChanged;
358
360 public: static event::EventT<void (std::string)> modelNameChanged;
361
363 // The properties are: is_static, auto_disable.
364 public: static event::EventT<void (bool, bool)> modelPropertiesChanged;
365
367 public: static event::EventT<void (std::string)> saveModel;
368
370 public: static event::EventT<void ()> newModel;
371
373 public: static event::EventT<void (std::string)> nestedModelInserted;
374
376 public: static event::EventT<void (std::string)> linkInserted;
377
379 public: static event::EventT<void (std::string)> nestedModelRemoved;
380
382 public: static event::EventT<void (std::string)> linkRemoved;
383
385 public: static event::EventT<void (sdf::ElementPtr)>
387
389 public: static event::EventT<void (std::string)>
391
393 public: static event::EventT<void (sdf::ElementPtr)>
395
397 public: static event::EventT<void (std::string)> requestLinkRemoval;
398
400 public: static event::EventT<void (std::string)> requestJointRemoval;
401
403 public: static event::EventT<void (sdf::ElementPtr, std::string)>
405
409 public: static event::EventT<void (std::string, std::string,
410 std::string, std::string, std::string)> jointInserted;
411
413 public: static event::EventT<void (std::string)> jointRemoved;
414
418 public: static event::EventT<void (std::string, std::string,
419 std::string, std::string, std::string)> jointChanged;
420
422 public: static event::EventT<void (std::string)> openLinkInspector;
423
425 public: static event::EventT<void (std::string)> openJointInspector;
426
428 public: static event::EventT<void (std::string)>
430
434 public: static event::EventT<void (std::string, std::string)>
436
438 public: static event::EventT<void (std::string)> showLinkContextMenu;
439
441 public: static event::EventT<void (std::string)> showJointContextMenu;
442
444 public: static event::EventT<void (std::string)>
446
448 public: static event::EventT<void (std::string, bool)>
450
452 public: static event::EventT<void (std::string, bool)> setSelectedJoint;
453
455 public: static event::EventT<void (std::string, bool)>
457
459 public: static event::EventT<void (std::string)> modelPluginInserted;
460
462 public: static event::EventT<void (std::string)> modelPluginRemoved;
463
467 public: static event::EventT<void (std::string, bool)>
469
473 public: static event::EventT<void (std::string, std::string,
474 std::string, bool)> requestModelPluginInsertion;
475
477 public: static event::EventT<void (std::string,
478 std::map<std::string, ignition::math::Vector3d>)> requestLinkScale;
479
481 public: static event::EventT<void (std::string, ignition::math::Pose3d)>
483
485 public: static event::EventT<void (std::string, ignition::math::Pose3d)>
487 };
488 }
489 }
490}
491#endif
gui
Definition KeyEventHandler.hh:29
A class for event processing.
Definition Event.hh:98
Definition ModelEditorEvents.hh:35
static event::ConnectionPtr ConnectSetSelectedEntity(T _subscriber)
Connect a Gazebo event to the set selected entity signal.
Definition ModelEditorEvents.hh:289
static event::ConnectionPtr ConnectModelPluginRemoved(T _subscriber)
Connect a Gazebo event to the model plugin removed signal.
Definition ModelEditorEvents.hh:319
static event::EventT< void(std::string, std::string)> jointNameChanged
Notify that the joint name has been changed.
Definition ModelEditorEvents.hh:435
static event::ConnectionPtr ConnectRequestLinkMove(T _subscriber)
Connect a Gazebo event to the request link move signal.
Definition ModelEditorEvents.hh:138
static event::ConnectionPtr ConnectNestedModelInserted(T _subscriber)
Connect a Gazebo event to the nested model inserted signal.
Definition ModelEditorEvents.hh:156
static event::ConnectionPtr ConnectNestedModelRemoved(T _subscriber)
Connect a Gazebo event to the nested model removed signal.
Definition ModelEditorEvents.hh:184
static event::ConnectionPtr ConnectSetSelectedModelPlugin(T _subscriber)
Connect a Gazebo event to the set selected model plugin signal.
Definition ModelEditorEvents.hh:304
static event::EventT< void(std::string)> requestLinkRemoval
Request to remove a link.
Definition ModelEditorEvents.hh:397
static event::ConnectionPtr ConnectNewModel(T _subscriber)
Connect a Gazebo event to the new model signal.
Definition ModelEditorEvents.hh:105
static event::ConnectionPtr ConnectSaveModelEditor(T _subscriber)
Connect a Gazebo event to the save signal.
Definition ModelEditorEvents.hh:47
static event::ConnectionPtr ConnectRequestModelPluginRemoval(T _subscriber)
Connect a Gazebo event to the request model plugin removal signal.
Definition ModelEditorEvents.hh:328
static event::ConnectionPtr ConnectModelNameChanged(T _subscriber)
Connect a Gazebo event to the name changed signal.
Definition ModelEditorEvents.hh:82
static event::EventT< void(std::string)> openModelPluginInspector
Request to open the model plugin inspector.
Definition ModelEditorEvents.hh:429
static event::ConnectionPtr ConnectNewModelEditor(T _subscriber)
Connect a Gazebo event to the new signal.
Definition ModelEditorEvents.hh:61
static event::ConnectionPtr ConnectShowLinkContextMenu(T _subscriber)
Connect a Gazebo event to the show link context menu signal.
Definition ModelEditorEvents.hh:267
static event::EventT< void(sdf::ElementPtr)> requestNestedModelInsertion
Request to insert a nested model.
Definition ModelEditorEvents.hh:394
static event::ConnectionPtr ConnectRequestNestedModelMove(T _subscriber)
Connect a Gazebo event to the request nested model move signal.
Definition ModelEditorEvents.hh:147
static event::ConnectionPtr ConnectJointInserted(T _subscriber)
Connect a Gazebo event to the joint inserted signal.
Definition ModelEditorEvents.hh:170
static event::ConnectionPtr ConnectOpenLinkInspector(T _subscriber)
Connect a Gazebo event to the open link inspector signal.
Definition ModelEditorEvents.hh:237
static event::ConnectionPtr ConnectRequestLinkInsertion(T _subscriber)
Connect a Gazebo event to the request link insertion signal.
Definition ModelEditorEvents.hh:191
static event::ConnectionPtr ConnectLinkRemoved(T _subscriber)
Connect a Gazebo event to the link removed signal.
Definition ModelEditorEvents.hh:207
static event::EventT< void(std::string)> openLinkInspector
Request to open the link inspector.
Definition ModelEditorEvents.hh:422
static event::ConnectionPtr ConnectModelPluginInserted(T _subscriber)
Connect a Gazebo event to the model plugin inserted signal.
Definition ModelEditorEvents.hh:311
static event::EventT< void(std::string, bool)> setSelectedEntity
Request to select or deselect an entity.
Definition ModelEditorEvents.hh:449
static event::EventT< void(std::string)> modelPluginRemoved
Notify that a model plugin has been removed.
Definition ModelEditorEvents.hh:462
static event::EventT< void(std::string)> showLinkContextMenu
Request to show the link context menu.
Definition ModelEditorEvents.hh:438
static event::EventT< void(std::string)> saveModel
Notify that model has been saved.
Definition ModelEditorEvents.hh:367
static event::ConnectionPtr ConnectSaveAsModelEditor(T _subscriber)
Connect a Gazebo event to the save as signal.
Definition ModelEditorEvents.hh:54
static event::EventT< void()> finishModel
A model has been completed and uploaded onto the server.
Definition ModelEditorEvents.hh:342
static event::EventT< void(std::string)> jointRemoved
Notify that a joint has been removed.
Definition ModelEditorEvents.hh:413
static event::EventT< void()> newModelEditor
Request to start a new model.
Definition ModelEditorEvents.hh:351
static event::EventT< void(std::string, std::string, std::string, std::string, std::string)> jointChanged
Notify that a joint has been changed.
Definition ModelEditorEvents.hh:419
static event::EventT< void(std::string)> linkRemoved
Notify that a link has been removed.
Definition ModelEditorEvents.hh:382
static event::EventT< void(std::string)> modelPluginInserted
Notify that a model plugin has been inserted.
Definition ModelEditorEvents.hh:459
static event::EventT< void(std::string)> nestedModelRemoved
Notify that a nested model has been removed.
Definition ModelEditorEvents.hh:379
static event::ConnectionPtr ConnectShowModelPluginContextMenu(T _subscriber)
Connect a Gazebo event to the show model plugin context menu signal.
Definition ModelEditorEvents.hh:282
static event::ConnectionPtr ConnectSaveModel(T _subscriber)
Connect a Gazebo event to the save model signal.
Definition ModelEditorEvents.hh:98
static event::EventT< bool()> saveAsModelEditor
Request to save the model as.
Definition ModelEditorEvents.hh:348
static event::ConnectionPtr ConnectRequestJointRemoval(T _subscriber)
Connect a Gazebo event to the request joint removal signal.
Definition ModelEditorEvents.hh:214
static event::ConnectionPtr ConnectOpenJointInspector(T _subscriber)
Connect a Gazebo event to the open joint inspector signal.
Definition ModelEditorEvents.hh:253
static event::EventT< void(std::string)> openJointInspector
Request to open the joint inspector.
Definition ModelEditorEvents.hh:425
static event::EventT< void(bool, bool)> modelPropertiesChanged
Notify that model properties have been changed.
Definition ModelEditorEvents.hh:364
static event::EventT< void(std::string)> nestedModelInserted
Notify that a nested model has been inserted.
Definition ModelEditorEvents.hh:373
static event::ConnectionPtr ConnectRequestNestedModelInsertion(T _subscriber)
Connect a Gazebo event to the request nested model insertion signal.
Definition ModelEditorEvents.hh:122
static event::EventT< void(std::string)> requestJointRemoval
Request to remove a joint.
Definition ModelEditorEvents.hh:400
static event::EventT< void()> modelChanged
Model has been changed.
Definition ModelEditorEvents.hh:357
static event::EventT< void(std::string)> showJointContextMenu
Request to show the joint context menu.
Definition ModelEditorEvents.hh:441
static event::EventT< void(std::string)> linkInserted
Notify that a link has been inserted.
Definition ModelEditorEvents.hh:376
static event::ConnectionPtr ConnectRequestLinkRemoval(T _subscriber)
Connect a Gazebo event to the request link removal signal.
Definition ModelEditorEvents.hh:199
static event::EventT< void(std::string, std::string, std::string, bool)> requestModelPluginInsertion
Request to insert a model plugin.
Definition ModelEditorEvents.hh:474
static event::EventT< void(std::string, bool)> requestModelPluginRemoval
Request to remove a model plugin.
Definition ModelEditorEvents.hh:468
static event::ConnectionPtr ConnectFinishModel(T _subscriber)
Connect a boost::slot to the finish model signal.
Definition ModelEditorEvents.hh:40
static event::EventT< void(std::string)> requestNestedModelRemoval
Request to remove a nested model.
Definition ModelEditorEvents.hh:390
static event::ConnectionPtr ConnectRequestModelPluginInsertion(T _subscriber)
Connect a Gazebo event to the request model plugin insertion signal.
Definition ModelEditorEvents.hh:337
static event::ConnectionPtr ConnectExitModelEditor(T _subscriber)
Connect a Gazebo event to the exit signal.
Definition ModelEditorEvents.hh:68
static event::ConnectionPtr ConnectSetSelectedJoint(T _subscriber)
Connect a Gazebo event to the set selected joint signal.
Definition ModelEditorEvents.hh:296
static event::EventT< void(std::string)> showModelPluginContextMenu
Request to show the model plugin context menu.
Definition ModelEditorEvents.hh:445
static event::EventT< void(std::string)> modelNameChanged
Name was changed in the editor palette.
Definition ModelEditorEvents.hh:360
static event::EventT< void(std::string, bool)> setSelectedJoint
Request to select or deselect a joint.
Definition ModelEditorEvents.hh:452
static event::ConnectionPtr ConnectLinkInserted(T _subscriber)
Connect a Gazebo event to the link inserted signal.
Definition ModelEditorEvents.hh:163
static event::ConnectionPtr ConnectRequestLinkScale(T _subscriber)
Connect a Gazebo event to the request link scale signal.
Definition ModelEditorEvents.hh:130
static event::EventT< void()> exitModelEditor
Request to exit the editor.
Definition ModelEditorEvents.hh:354
static event::EventT< void(std::string, ignition::math::Pose3d)> requestLinkMove
Request to move a link.
Definition ModelEditorEvents.hh:482
static event::EventT< void(std::string, ignition::math::Pose3d)> requestNestedModelMove
Request to move a nestedModel.
Definition ModelEditorEvents.hh:486
static event::EventT< void(sdf::ElementPtr, std::string)> requestJointInsertion
Request to insert a joint.
Definition ModelEditorEvents.hh:404
static event::EventT< void(std::string, std::string, std::string, std::string, std::string)> jointInserted
Notify that a joint has been inserted.
Definition ModelEditorEvents.hh:410
static event::ConnectionPtr ConnectModelPropertiesChanged(T _subscriber)
Connect a Gazebo event to the model properties changed signal.
Definition ModelEditorEvents.hh:91
static event::ConnectionPtr ConnectRequestJointInsertion(T _subscriber)
Connect a Gazebo event to the request joint insertion signal.
Definition ModelEditorEvents.hh:222
static event::EventT< void(sdf::ElementPtr)> requestLinkInsertion
Request to insert a link.
Definition ModelEditorEvents.hh:386
static event::ConnectionPtr ConnectShowJointContextMenu(T _subscriber)
Connect a Gazebo event to the show joint context menu signal.
Definition ModelEditorEvents.hh:274
static event::EventT< void(std::string, bool)> setSelectedModelPlugin
Request to select or deselect a model plugin.
Definition ModelEditorEvents.hh:456
static event::ConnectionPtr ConnectOpenModelPluginInspector(T _subscriber)
Connect a Gazebo event to the open model plugin inspector signal.
Definition ModelEditorEvents.hh:245
static event::EventT< bool()> saveModelEditor
Request to save the model.
Definition ModelEditorEvents.hh:345
static event::ConnectionPtr ConnectRequestNestedModelRemoval(T _subscriber)
Connect a Gazebo event to the request nested model removal signal.
Definition ModelEditorEvents.hh:113
static event::ConnectionPtr ConnectJointChanged(T _subscriber)
Connect a Gazebo event to the joint changed signal.
Definition ModelEditorEvents.hh:177
static event::ConnectionPtr ConnectModelChanged(T _subscriber)
Connect a Gazebo event to the model changed signal.
Definition ModelEditorEvents.hh:75
static event::EventT< void(std::string, std::map< std::string, ignition::math::Vector3d >)> requestLinkScale
Request to scale a link.
Definition ModelEditorEvents.hh:478
static event::ConnectionPtr ConnectJointRemoved(T _subscriber)
Connect a Gazebo event to the joint removed signal.
Definition ModelEditorEvents.hh:230
static event::ConnectionPtr ConnectJointNameChanged(T _subscriber)
Connect a Gazebo event to the joint name changed signal.
Definition ModelEditorEvents.hh:260
static event::EventT< void()> newModel
Notify that model has been newed.
Definition ModelEditorEvents.hh:370
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