GuiEvents.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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_GUIEVENTS_HH_
18 #define GAZEBO_GUI_GUIEVENTS_HH_
19 
20 #include <string>
21 #include <ignition/math/Pose3.hh>
22 #include <ignition/math/Vector3.hh>
23 
24 #include "gazebo/common/Event.hh"
25 #include "gazebo/msgs/msgs.hh"
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
30  namespace gui
31  {
32  class GZ_GUI_VISIBLE Events
33  {
36  public: template<typename T>
38  { return createEntity.Connect(_subscriber); }
39 
42  public: template<typename T>
43  static event::ConnectionPtr ConnectMoveMode(T _subscriber)
44  { return moveMode.Connect(_subscriber); }
45 
48  public: template<typename T>
49  static event::ConnectionPtr ConnectManipMode(T _subscriber)
50  {return manipMode.Connect(_subscriber);}
51 
54  public: template<typename T>
55  static event::ConnectionPtr ConnectAlignMode(T _subscriber)
56  {return alignMode.Connect(_subscriber);}
57 
60  public: template<typename T>
62  { return fullScreen.Connect(_subscriber); }
63 
66  public: template<typename T>
68  { return showToolbars.Connect(_subscriber); }
69 
72  public: template<typename T>
73  static event::ConnectionPtr ConnectFPS(T _subscriber)
74  { return fps.Connect(_subscriber); }
75 
78  public: template<typename T>
79  static event::ConnectionPtr ConnectOrbit(T _subscriber)
80  { return orbit.Connect(_subscriber); }
81 
84  public: template<typename T>
85  static event::ConnectionPtr ConnectKeyPress(T _subscriber)
86  { return keyPress.Connect(_subscriber); }
87 
90  public: template<typename T>
92  { return lightUpdate.Connect(_subscriber); }
93 
96  public: template<typename T>
98  { return modelUpdate.Connect(_subscriber); }
99 
102  public: template<typename T>
104  { return inputStepSize.Connect(_subscriber); }
105 
108  public: template<typename T>
109  static event::ConnectionPtr ConnectFollow(T _subscriber)
110  { return follow.Connect(_subscriber); }
111 
114  public: template<typename T>
116  { return editModel.Connect(_subscriber); }
117 
120  public: template<typename T>
122  { return windowMode.Connect(_subscriber); }
123 
126  public: template<typename T>
128  { return mainWindowReady.Connect(_subscriber); }
129 
132  public: template<typename T>
133  static event::ConnectionPtr ConnectLeftPaneVisibility
134  (T _subscriber)
135  { return leftPaneVisibility.Connect(_subscriber); }
136 
139  public: template<typename T>
141  { return scaleEntity.Connect(_subscriber); }
142 
145  public: template<typename T>
147  { return moveEntity.Connect(_subscriber); }
148 
151 
154 
156  public: static event::EventT<void (std::string,
157  std::string, std::string, bool, bool)> alignMode;
158 
160  public: static event::EventT<void (std::string,
161  std::string)> createEntity;
162 
165 
168 
171 
174 
176  public: static event::EventT<void ()> fps;
177 
180 
184 
188 
192 
195 
198 
201 
204 
206  public: static event::EventT<void (const std::string &,
207  const ignition::math::Vector3d &)> scaleEntity;
208 
211  public: static event::EventT<void (const std::string &,
212  const ignition::math::Pose3d &, const bool)> moveEntity;
213  };
214  }
215 }
216 #endif
static event::EventT< void()> fps
An event to enable first-person-shooter view control.
Definition: GuiEvents.hh:176
static event::EventT< void(std::string, std::string, std::string, bool, bool)> alignMode
indicates the user is aligning objects
Definition: GuiEvents.hh:157
static event::EventT< void(std::string)> keyPress
Event triggered when a key is pressed.
Definition: GuiEvents.hh:194
static event::ConnectionPtr ConnectScaleEntity(T _subscriber)
Connect a signal to the scale entity signal.
Definition: GuiEvents.hh:140
static event::ConnectionPtr ConnectManipMode(T _subscriber)
Connect a signal to the manip mode signal.
Definition: GuiEvents.hh:49
static event::EventT< void(bool)> showToolbars
An event to trigger show toolbars.
Definition: GuiEvents.hh:173
static event::EventT< void(const msgs::Model &)> modelUpdate
indicates a model has been updated
Definition: GuiEvents.hh:164
static event::ConnectionPtr ConnectWindowMode(T _subscriber)
Connect a signal to the window mode signal.
Definition: GuiEvents.hh:121
static event::EventT< void(int)> inputStepSize
Step size changed event.
Definition: GuiEvents.hh:197
static event::ConnectionPtr ConnectModelUpdate(T _subscriber)
Connect a signal to the model update signal.
Definition: GuiEvents.hh:97
static event::EventT< void(std::string)> manipMode
indicates the user is manipulating an object
Definition: GuiEvents.hh:153
static event::EventT< void(bool)> leftPaneVisibility
Used to set whether the GUI's left pane is visible.
Definition: GuiEvents.hh:200
static event::ConnectionPtr ConnectShowToolbars(T _subscriber)
Connect a signal to the show toolbars signal.
Definition: GuiEvents.hh:67
static event::ConnectionPtr ConnectMainWindowReady(T _subscriber)
Connect a signal to the main window ready signal.
Definition: GuiEvents.hh:127
static event::EventT< void(const std::string &)> follow
Event triggered when the user follows a model.
Definition: GuiEvents.hh:183
static event::ConnectionPtr ConnectOrbit(T _subscriber)
Connect a signal to the view Orbit signal.
Definition: GuiEvents.hh:79
static event::EventT< void(bool)> moveMode
Indicates the user is moving the camera.
Definition: GuiEvents.hh:150
static event::ConnectionPtr ConnectEditModel(T _subscriber)
Connect a signal to the edit model signal.
Definition: GuiEvents.hh:115
static event::EventT< void()> orbit
An event to enable orbit view control.
Definition: GuiEvents.hh:179
static event::ConnectionPtr ConnectMoveEntity(T _subscriber)
Connect a signal to the move entity event.
Definition: GuiEvents.hh:146
static event::EventT< void(const std::string &)> windowMode
Event triggered when changing window mode.
Definition: GuiEvents.hh:191
static event::EventT< void(const std::string &)> editModel
Event triggered when the user selects edit a model.
Definition: GuiEvents.hh:187
static event::EventT< void(bool)> fullScreen
An event to trigger full screen mode.
Definition: GuiEvents.hh:170
static event::EventT< void(const std::string &, const ignition::math::Pose3d &, const bool)> moveEntity
Move entity event.
Definition: GuiEvents.hh:212
static event::ConnectionPtr ConnectFullScreen(T _subscriber)
Connect a signal to the fullscreen signal.
Definition: GuiEvents.hh:61
static event::ConnectionPtr ConnectAlignMode(T _subscriber)
Connect a signal to the align mode signal.
Definition: GuiEvents.hh:55
static event::ConnectionPtr ConnectCreateEntity(T _subscriber)
Connect a signal the add entity signal.
Definition: GuiEvents.hh:37
static event::EventT< void(const std::string &, const ignition::math::Vector3d &)> scaleEntity
Scale entity event.
Definition: GuiEvents.hh:207
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
static event::ConnectionPtr ConnectInputStepSize(T _subscriber)
Connect a signal to the input step size signal.
Definition: GuiEvents.hh:103
static event::EventT< void(std::string, std::string)> createEntity
indicates an entity has been created
Definition: GuiEvents.hh:161
static event::ConnectionPtr ConnectLightUpdate(T _subscriber)
Connect a signal to the light update signal.
Definition: GuiEvents.hh:91
static event::ConnectionPtr ConnectFollow(T _subscriber)
Connect a signal to the follow signal.
Definition: GuiEvents.hh:109
Definition: GuiEvents.hh:32
static event::ConnectionPtr ConnectKeyPress(T _subscriber)
Connect a signal to the view KeyPress signal.
Definition: GuiEvents.hh:85
static event::ConnectionPtr ConnectFPS(T _subscriber)
Connect a signal to the view FPS signal.
Definition: GuiEvents.hh:73
static event::EventT< void()> mainWindowReady
Main window ready event.
Definition: GuiEvents.hh:203
static event::EventT< void(const msgs::Light &)> lightUpdate
An event to notify light updates.
Definition: GuiEvents.hh:167
static event::ConnectionPtr ConnectMoveMode(T _subscriber)
Connect a signal to the move mode signal.
Definition: GuiEvents.hh:43