##

GuiEvents.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_GUI_GUIEVENTS_HH_
#define GAZEBO_GUI_GUIEVENTS_HH_
#include <string>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Vector3.hh>
#include "gazebo/common/Event.hh"
#include "gazebo/msgs/msgs.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class GZ_GUI_VISIBLE Events
{
public: template<typename T>
static event::ConnectionPtr ConnectCreateEntity(T _subscriber)
{ return createEntity.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectMoveMode(T _subscriber)
{ return moveMode.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectManipMode(T _subscriber)
{return manipMode.Connect(_subscriber);}
public: template<typename T>
static event::ConnectionPtr ConnectAlignMode(T _subscriber)
{return alignMode.Connect(_subscriber);}
public: template<typename T>
static event::ConnectionPtr ConnectFullScreen(T _subscriber)
{ return fullScreen.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectShowToolbars(T _subscriber)
{ return showToolbars.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectFPS(T _subscriber)
{ return fps.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectOrbit(T _subscriber)
{ return orbit.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectKeyPress(T _subscriber)
{ return keyPress.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectLightUpdate(T _subscriber)
{ return lightUpdate.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectModelUpdate(T _subscriber)
{ return modelUpdate.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectInputStepSize(T _subscriber)
{ return inputStepSize.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectFollow(T _subscriber)
{ return follow.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectEditModel(T _subscriber)
{ return editModel.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectWindowMode(T _subscriber)
{ return windowMode.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectMainWindowReady(T _subscriber)
{ return mainWindowReady.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectLeftPaneVisibility
(T _subscriber)
{ return leftPaneVisibility.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectScaleEntity(T _subscriber)
{ return scaleEntity.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectMoveEntity(T _subscriber)
{ return moveEntity.Connect(_subscriber); }
public: static event::EventT<void (bool)> moveMode;
public: static event::EventT<void (std::string)> manipMode;
public: static event::EventT<void (std::string,
std::string, std::string, bool, bool)> alignMode;
public: static event::EventT<void (std::string,
std::string)> createEntity;
public: static event::EventT<void (const msgs::Model &)> modelUpdate;
public: static event::EventT<void (const msgs::Light &)> lightUpdate;
public: static event::EventT<void (bool)> fullScreen;
public: static event::EventT<void (bool)> showToolbars;
public: static event::EventT<void ()> fps;
public: static event::EventT<void ()> orbit;
public: static event::EventT<void (const std::string &)> follow;
public: static event::EventT<void (const std::string &)> editModel;
public: static event::EventT<void (const std::string &)> windowMode;
public: static event::EventT<void (std::string)> keyPress;
public: static event::EventT<void (int)> inputStepSize;
public: static event::EventT<void (bool)> leftPaneVisibility;
public: static event::EventT<void ()> mainWindowReady;
public: static event::EventT<void (const std::string &,
const ignition::math::Vector3d &)> scaleEntity;
public: static event::EventT<void (const std::string &,
const ignition::math::Pose3d &, const bool)> moveEntity;
};
}
}
#endif
gazebo::gui::Events::mainWindowReady
static event::EventT< void()> mainWindowReady
Main window ready event.
Definition: GuiEvents.hh:203
gazebo::gui::Events::lightUpdate
static event::EventT< void(const msgs::Light &)> lightUpdate
An event to notify light updates.
Definition: GuiEvents.hh:167
gazebo::gui::Events::ConnectManipMode
static event::ConnectionPtr ConnectManipMode(T _subscriber)
Connect a signal to the manip mode signal.
Definition: GuiEvents.hh:49
gazebo::gui::Events::modelUpdate
static event::EventT< void(const msgs::Model &)> modelUpdate
indicates a model has been updated
Definition: GuiEvents.hh:164
gazebo::gui::Events::ConnectMoveMode
static event::ConnectionPtr ConnectMoveMode(T _subscriber)
Connect a signal to the move mode signal.
Definition: GuiEvents.hh:43
gazebo::gui::Events::alignMode
static event::EventT< void(std::string, std::string, std::string, bool, bool)> alignMode
indicates the user is aligning objects
Definition: GuiEvents.hh:157
gazebo::gui::Events::ConnectWindowMode
static event::ConnectionPtr ConnectWindowMode(T _subscriber)
Connect a signal to the window mode signal.
Definition: GuiEvents.hh:121
gazebo::gui::Events::ConnectLeftPaneVisibility
static event::ConnectionPtr ConnectLeftPaneVisibility(T _subscriber)
Connect a signal to toggle the GUI's left hand pane signal.
Definition: GuiEvents.hh:134
gazebo::gui::Events::keyPress
static event::EventT< void(std::string)> keyPress
Event triggered when a key is pressed.
Definition: GuiEvents.hh:194
gazebo::gui::Events::ConnectModelUpdate
static event::ConnectionPtr ConnectModelUpdate(T _subscriber)
Connect a signal to the model update signal.
Definition: GuiEvents.hh:97
gazebo::gui::Events::manipMode
static event::EventT< void(std::string)> manipMode
indicates the user is manipulating an object
Definition: GuiEvents.hh:153
gazebo::gui::Events::ConnectScaleEntity
static event::ConnectionPtr ConnectScaleEntity(T _subscriber)
Connect a signal to the scale entity signal.
Definition: GuiEvents.hh:140
gazebo::gui::Events
Definition: GuiEvents.hh:32
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::gui::Events::showToolbars
static event::EventT< void(bool)> showToolbars
An event to trigger show toolbars.
Definition: GuiEvents.hh:173
gazebo::gui::Events::inputStepSize
static event::EventT< void(int)> inputStepSize
Step size changed event.
Definition: GuiEvents.hh:197
gazebo::gui::Events::leftPaneVisibility
static event::EventT< void(bool)> leftPaneVisibility
Used to set whether the GUI's left pane is visible.
Definition: GuiEvents.hh:200
gazebo::gui::Events::follow
static event::EventT< void(const std::string &)> follow
Event triggered when the user follows a model.
Definition: GuiEvents.hh:183
system.hh
gazebo::gui::Events::ConnectEditModel
static event::ConnectionPtr ConnectEditModel(T _subscriber)
Connect a signal to the edit model signal.
Definition: GuiEvents.hh:115
gazebo::gui::Events::moveMode
static event::EventT< void(bool)> moveMode
Indicates the user is moving the camera.
Definition: GuiEvents.hh:150
msgs.hh
gazebo::gui::Events::ConnectMainWindowReady
static event::ConnectionPtr ConnectMainWindowReady(T _subscriber)
Connect a signal to the main window ready signal.
Definition: GuiEvents.hh:127
gazebo::gui::Events::ConnectShowToolbars
static event::ConnectionPtr ConnectShowToolbars(T _subscriber)
Connect a signal to the show toolbars signal.
Definition: GuiEvents.hh:67
gazebo::gui::Events::ConnectOrbit
static event::ConnectionPtr ConnectOrbit(T _subscriber)
Connect a signal to the view Orbit signal.
Definition: GuiEvents.hh:79
gazebo::event::EventT
A class for event processing.
Definition: Event.hh:97
gazebo::gui::Events::orbit
static event::EventT< void()> orbit
An event to enable orbit view control.
Definition: GuiEvents.hh:179
gazebo::gui::Events::moveEntity
static event::EventT< void(const std::string &, const ignition::math::Pose3d &, const bool)> moveEntity
Move entity event.
Definition: GuiEvents.hh:212
gazebo::gui::Events::ConnectMoveEntity
static event::ConnectionPtr ConnectMoveEntity(T _subscriber)
Connect a signal to the move entity event.
Definition: GuiEvents.hh:146
gazebo::gui::Events::ConnectFullScreen
static event::ConnectionPtr ConnectFullScreen(T _subscriber)
Connect a signal to the fullscreen signal.
Definition: GuiEvents.hh:61
gazebo::gui::Events::editModel
static event::EventT< void(const std::string &)> editModel
Event triggered when the user selects edit a model.
Definition: GuiEvents.hh:187
gazebo::event::EventT::Connect
ConnectionPtr Connect(const std::function< T > &_subscriber)
Connect a callback to this event.
Definition: Event.hh:558
gazebo::gui::Events::windowMode
static event::EventT< void(const std::string &)> windowMode
Event triggered when changing window mode.
Definition: GuiEvents.hh:191
gazebo::gui::Events::ConnectAlignMode
static event::ConnectionPtr ConnectAlignMode(T _subscriber)
Connect a signal to the align mode signal.
Definition: GuiEvents.hh:55
gazebo::gui::Events::fullScreen
static event::EventT< void(bool)> fullScreen
An event to trigger full screen mode.
Definition: GuiEvents.hh:170
gazebo::gui::Events::ConnectCreateEntity
static event::ConnectionPtr ConnectCreateEntity(T _subscriber)
Connect a signal the add entity signal.
Definition: GuiEvents.hh:37
gazebo::gui::Events::scaleEntity
static event::EventT< void(const std::string &, const ignition::math::Vector3d &)> scaleEntity
Scale entity event.
Definition: GuiEvents.hh:207
gazebo::event::ConnectionPtr
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::Events::ConnectLightUpdate
static event::ConnectionPtr ConnectLightUpdate(T _subscriber)
Connect a signal to the light update signal.
Definition: GuiEvents.hh:91
gazebo::gui::Events::ConnectInputStepSize
static event::ConnectionPtr ConnectInputStepSize(T _subscriber)
Connect a signal to the input step size signal.
Definition: GuiEvents.hh:103
gazebo::gui::Events::ConnectFollow
static event::ConnectionPtr ConnectFollow(T _subscriber)
Connect a signal to the follow signal.
Definition: GuiEvents.hh:109
Event.hh
gazebo::gui::Events::ConnectKeyPress
static event::ConnectionPtr ConnectKeyPress(T _subscriber)
Connect a signal to the view KeyPress signal.
Definition: GuiEvents.hh:85
gazebo::gui::Events::createEntity
static event::EventT< void(std::string, std::string)> createEntity
indicates an entity has been created
Definition: GuiEvents.hh:161
gazebo::gui::Events::ConnectFPS
static event::ConnectionPtr ConnectFPS(T _subscriber)
Connect a signal to the view FPS signal.
Definition: GuiEvents.hh:73
gazebo::gui::Events::fps
static event::EventT< void()> fps
An event to enable first-person-shooter view control.
Definition: GuiEvents.hh:176