All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GuiEvents.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 _GUI_EVENTS_HH_
18 #define _GUI_EVENTS_HH_
19 
20 #include <string>
21 #include "gazebo/common/Event.hh"
22 #include "gazebo/msgs/msgs.hh"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
30  {
33  public: template<typename T>
35  { return createEntity.Connect(_subscriber); }
36  public: static void DisconnectCreateEntity(
37  event::ConnectionPtr _subscriber)
38  { createEntity.Disconnect(_subscriber); }
39 
42  public: template<typename T>
43  static event::ConnectionPtr ConnectMoveMode(T _subscriber)
44  { return moveMode.Connect(_subscriber); }
45  public: static void DisconnectMoveMode(event::ConnectionPtr _subscriber)
46  { moveMode.Disconnect(_subscriber); }
47 
50  public: template<typename T>
51  static event::ConnectionPtr ConnectManipMode(T _subscriber)
52  {return manipMode.Connect(_subscriber);}
53  public: static void DisconnectManipMode(event::ConnectionPtr _subscriber)
54  {manipMode.Disconnect(_subscriber);}
55 
58  public: template<typename T>
60  { return fullScreen.Connect(_subscriber); }
61  public: static void DisconnectFullScreen(event::ConnectionPtr _subscriber)
62  { fullScreen.Disconnect(_subscriber); }
65  public: template<typename T>
66  static event::ConnectionPtr ConnectFPS(T _subscriber)
67  { return fps.Connect(_subscriber); }
68  public: static void DisconnectFPS(event::ConnectionPtr _subscriber)
69  { fps.Disconnect(_subscriber); }
72  public: template<typename T>
73  static event::ConnectionPtr ConnectOrbit(T _subscriber)
74  { return orbit.Connect(_subscriber); }
75  public: static void DisconnectOrbit(event::ConnectionPtr _subscriber)
76  { orbit.Disconnect(_subscriber); }
79  public: template<typename T>
80  static event::ConnectionPtr ConnectKeyPress(T _subscriber)
81  { return keyPress.Connect(_subscriber); }
82  public: static void DisconnectKeyPress(event::ConnectionPtr _subscriber)
83  { keyPress.Disconnect(_subscriber); }
84 
87  public: template<typename T>
89  { return lightUpdate.Connect(_subscriber); }
90  public: static void DisconnectLightUpdate(
91  event::ConnectionPtr _subscriber)
92  { lightUpdate.Disconnect(_subscriber); }
93 
95  public: template<typename T>
97  { return modelUpdate.Connect(_subscriber); }
98  public: static void DisconnectModelUpdate(
99  event::ConnectionPtr _subscriber)
100  { modelUpdate.Disconnect(_subscriber); }
101 
104  public: template<typename T>
106  { return inputStepSize.Connect(_subscriber); }
107  public: static void DisconnectInputStepSize(
108  event::ConnectionPtr _subscriber)
109  { inputStepSize.Disconnect(_subscriber); }
110 
113  public: template<typename T>
114  static event::ConnectionPtr ConnectFollow(T _subscriber)
115  { return follow.Connect(_subscriber); }
116  public: static void DisconnectFollow(
117  event::ConnectionPtr _subscriber)
118  { follow.Disconnect(_subscriber); }
119 
122 
125 
126  public: static event::EventT<void (std::string,
127  std::string)> createEntity;
128 
130 
133 
135  public: static event::EventT<void ()> fps;
137 
141 
143 
146  };
147  }
148 }
149 #endif
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:144
static event::ConnectionPtr ConnectManipMode(T _subscriber)
Connect a boost::slot to the manip mode signal.
Definition: GuiEvents.hh:51
static event::ConnectionPtr ConnectInputStepSize(T _subscriber)
Connect a boost::slot to the input step size signal.
Definition: GuiEvents.hh:105
static event::ConnectionPtr ConnectOrbit(T _subscriber)
Connect a boost::slot to the view Orbit signal.
Definition: GuiEvents.hh:73
static void DisconnectFollow(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:116
static void DisconnectFullScreen(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:61
static event::EventT< void()> fps
Definition: GuiEvents.hh:135
static void DisconnectCreateEntity(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:36
static event::EventT< void()> orbit
Definition: GuiEvents.hh:136
static void DisconnectManipMode(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:53
static event::ConnectionPtr ConnectFullScreen(T _subscriber)
Connect a boost::slot to the fullscreen signal.
Definition: GuiEvents.hh:59
static event::EventT< void(const msgs::Model &)> modelUpdate
Definition: GuiEvents.hh:129
static event::ConnectionPtr ConnectLightUpdate(T _subscriber)
Connect a boost::slot to the light update signal.
Definition: GuiEvents.hh:88
static event::EventT< void(const std::string &)> follow
Event triggered when the user follows a model.
Definition: GuiEvents.hh:140
static event::ConnectionPtr ConnectCreateEntity(T _subscriber)
Connect a boost::slot the add entity signal.
Definition: GuiEvents.hh:34
static event::EventT< void(std::string)> keyPress
Definition: GuiEvents.hh:142
static event::EventT< void(int)> inputStepSize
Step size changed event.
Definition: GuiEvents.hh:145
static void DisconnectInputStepSize(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:107
static event::ConnectionPtr ConnectModelUpdate(T _subscriber)
Definition: GuiEvents.hh:96
static void DisconnectMoveMode(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:45
static event::EventT< void(std::string, std::string)> createEntity
Definition: GuiEvents.hh:127
static void DisconnectOrbit(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:75
static event::EventT< void(bool)> fullScreen
Definition: GuiEvents.hh:134
static void DisconnectLightUpdate(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:90
static event::ConnectionPtr ConnectKeyPress(T _subscriber)
Connect a boost::slot to the view KeyPress signal.
Definition: GuiEvents.hh:80
static void DisconnectFPS(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:68
static void DisconnectModelUpdate(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:98
static event::EventT< void(std::string)> manipMode
that indicates the user is manipulating an object
Definition: GuiEvents.hh:124
static event::EventT< void(const msgs::Light &)> lightUpdate
A event to notify light updates.
Definition: GuiEvents.hh:132
static event::ConnectionPtr ConnectMoveMode(T _subscriber)
Connect a boost::slot to the move mode signal.
Definition: GuiEvents.hh:43
Definition: GuiEvents.hh:29
static event::ConnectionPtr ConnectFPS(T _subscriber)
Connect a boost::slot to the view FPS signal.
Definition: GuiEvents.hh:66
static event::EventT< void(bool)> moveMode
that indicates the user is moving the camera
Definition: GuiEvents.hh:121
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
static event::ConnectionPtr ConnectFollow(T _subscriber)
Connect a boost::slot to the follow signal.
Definition: GuiEvents.hh:114
static void DisconnectKeyPress(event::ConnectionPtr _subscriber)
Definition: GuiEvents.hh:82