##

BuildingEditorEvents.hh
Go to the documentation of this file.
/*
* Copyright (C) 2013 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 _BUILDING_EDITOR_EVENTS_HH_
#define _BUILDING_EDITOR_EVENTS_HH_
#include <string>
#include "gazebo/gui/qt.h"
#include "gazebo/common/Event.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
namespace editor
{
class GZ_GUI_VISIBLE Events
{
public: template<typename T>
static event::ConnectionPtr
ConnectToggleEditMode(T _subscriber)
{ return toggleEditMode.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectCreateBuildingEditorItem(T _subscriber)
{ return createBuildingEditorItem.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectColorSelected(T _subscriber)
{ return colorSelected.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectTextureSelected(T _subscriber)
{ return textureSelected.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectSaveBuildingModel(T _subscriber)
{ return saveBuildingModel.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectFinishBuildingModel(T _subscriber)
{ return finishBuildingModel.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectNewBuildingModel(T _subscriber)
{ return newBuildingModel.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectChangeBuildingLevel(T _subscriber)
{ return changeBuildingLevel.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectAddBuildingLevel(T _subscriber)
{ return addBuildingLevel.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectDeleteBuildingLevel(T _subscriber)
{ return deleteBuildingLevel.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectShowFloorplan(T _subscriber)
{ return showFloorplan.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectTriggerShowFloorplan(T _subscriber)
{ return triggerShowFloorplan.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectShowElements(T _subscriber)
{ return showElements.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectTriggerShowElements(T _subscriber)
{ return triggerShowElements.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectUpdateLevelWidget(T _subscriber)
{ return updateLevelWidget.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectChangeBuildingEditorZoom(T _subscriber)
{ return changeBuildingEditorZoom.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectSaveBuildingEditor(T _subscriber)
{ return saveBuildingEditor.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectSaveAsBuildingEditor
(T _subscriber)
{ return saveAsBuildingEditor.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr
ConnectNewBuildingEditor(T _subscriber)
{ return newBuildingEditor.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectExitBuildingEditor(T _subscriber)
{ return exitBuildingEditor.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectBuildingNameChanged
(T _subscriber)
{ return buildingNameChanged.Connect(_subscriber); }
public: static event::EventT<void (bool)> toggleEditMode;
public: static event::EventT<void (std::string)>
createBuildingEditorItem;
public: static event::EventT<void (QColor)> colorSelected;
public: static event::EventT<void (QString)> textureSelected;
public: static event::EventT<void (std::string)> saveBuildingModel;
public: static event::EventT<void ()> finishBuildingModel;
public: static event::EventT<void ()> newBuildingModel;
public: static event::EventT<void (int)> changeBuildingLevel;
public: static event::EventT<void ()> addBuildingLevel;
public: static event::EventT<void ()> deleteBuildingLevel;
public: static event::EventT<void ()> showFloorplan;
public: static event::EventT<void ()> triggerShowFloorplan;
public: static event::EventT<void ()> showElements;
public: static event::EventT<void ()> triggerShowElements;
public: static event::EventT<void (int, std::string)>
updateLevelWidget;
public: static event::EventT<void (double)> changeBuildingEditorZoom;
public: static event::EventT<bool ()> saveBuildingEditor;
public: static event::EventT<bool ()> saveAsBuildingEditor;
public: static event::EventT<void ()> newBuildingEditor;
public: static event::EventT<void ()> exitBuildingEditor;
public: static event::EventT<void (std::string)> buildingNameChanged;
};
}
}
}
#endif
gazebo::gui::editor::Events::ConnectTextureSelected
static event::ConnectionPtr ConnectTextureSelected(T _subscriber)
Connect a Gazebo event to the texture selected signal.
Definition: BuildingEditorEvents.hh:62
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::editor::Events::ConnectColorSelected
static event::ConnectionPtr ConnectColorSelected(T _subscriber)
Connect a Gazebo event to the color selected signal.
Definition: BuildingEditorEvents.hh:54
gazebo::gui::editor::Events::ConnectChangeBuildingLevel
static event::ConnectionPtr ConnectChangeBuildingLevel(T _subscriber)
Connect a Gazebo event to the change model signal.
Definition: BuildingEditorEvents.hh:93
gazebo::gui::editor::Events::ConnectUpdateLevelWidget
static event::ConnectionPtr ConnectUpdateLevelWidget(T _subscriber)
Connect a Gazebo event to the update level widget signal.
Definition: BuildingEditorEvents.hh:148
gazebo::gui::editor::Events::triggerShowFloorplan
static event::EventT< void()> triggerShowFloorplan
Trigger show floorplan.
Definition: BuildingEditorEvents.hh:232
gazebo::gui::editor::Events::ConnectSaveBuildingEditor
static event::ConnectionPtr ConnectSaveBuildingEditor(T _subscriber)
Connect a Gazebo event to the save signal.
Definition: BuildingEditorEvents.hh:163
gazebo::gui::editor::Events::addBuildingLevel
static event::EventT< void()> addBuildingLevel
A new level has been added.
Definition: BuildingEditorEvents.hh:223
system.hh
gazebo::gui::editor::Events::saveBuildingModel
static event::EventT< void(std::string)> saveBuildingModel
A model has been saved with a name and a location.
Definition: BuildingEditorEvents.hh:211
gazebo::gui::editor::Events::ConnectSaveAsBuildingEditor
static event::ConnectionPtr ConnectSaveAsBuildingEditor(T _subscriber)
Connect a Gazebo event to the save as signal.
Definition: BuildingEditorEvents.hh:171
gazebo::gui::editor::Events::ConnectExitBuildingEditor
static event::ConnectionPtr ConnectExitBuildingEditor(T _subscriber)
Connect a Gazebo event to the exit signal.
Definition: BuildingEditorEvents.hh:186
gazebo::gui::editor::Events::ConnectShowElements
static event::ConnectionPtr ConnectShowElements(T _subscriber)
Connect a Gazebo event to the show elements signal.
Definition: BuildingEditorEvents.hh:131
gazebo::gui::editor::Events::ConnectBuildingNameChanged
static event::ConnectionPtr ConnectBuildingNameChanged(T _subscriber)
Connect a Gazebo event to the name changed signal.
Definition: BuildingEditorEvents.hh:194
gazebo::gui::editor::Events::toggleEditMode
static event::EventT< void(bool)> toggleEditMode
Toggle if the edit mode was checked or not.
Definition: BuildingEditorEvents.hh:198
gazebo::gui::editor::Events::ConnectNewBuildingModel
static event::ConnectionPtr ConnectNewBuildingModel(T _subscriber)
Connect a Gazebo event to the new model signal.
Definition: BuildingEditorEvents.hh:85
gazebo::gui::editor::Events::ConnectToggleEditMode
static event::ConnectionPtr ConnectToggleEditMode(T _subscriber)
Connect a Gazebo event to the toggle edit mode signal.
Definition: BuildingEditorEvents.hh:38
gazebo::gui::editor::Events::newBuildingEditor
static event::EventT< void()> newBuildingEditor
Make a new model.
Definition: BuildingEditorEvents.hh:254
gazebo::gui::editor::Events::ConnectTriggerShowFloorplan
static event::ConnectionPtr ConnectTriggerShowFloorplan(T _subscriber)
Connect a Gazebo event to the trigger show floorplan signal.
Definition: BuildingEditorEvents.hh:124
gazebo::event::EventT
A class for event processing.
Definition: Event.hh:97
gazebo::gui::editor::Events::ConnectAddBuildingLevel
static event::ConnectionPtr ConnectAddBuildingLevel(T _subscriber)
Connect a Gazebo event to the add level signal.
Definition: BuildingEditorEvents.hh:100
gazebo::gui::editor::Events::colorSelected
static event::EventT< void(QColor)> colorSelected
A color has been selected.
Definition: BuildingEditorEvents.hh:205
gazebo::gui::editor::Events::updateLevelWidget
static event::EventT< void(int, std::string)> updateLevelWidget
The levels have been changed.
Definition: BuildingEditorEvents.hh:242
gazebo::event::EventT::Connect
ConnectionPtr Connect(const std::function< T > &_subscriber)
Connect a callback to this event.
Definition: Event.hh:558
gazebo::gui::editor::Events::saveBuildingEditor
static event::EventT< bool()> saveBuildingEditor
Save the model.
Definition: BuildingEditorEvents.hh:248
gazebo::gui::editor::Events::deleteBuildingLevel
static event::EventT< void()> deleteBuildingLevel
A level has been deleted.
Definition: BuildingEditorEvents.hh:226
gazebo::gui::editor::Events::ConnectFinishBuildingModel
static event::ConnectionPtr ConnectFinishBuildingModel(T _subscriber)
Connect a Gazebo event to the finish model signal.
Definition: BuildingEditorEvents.hh:77
gazebo::gui::editor::Events::changeBuildingLevel
static event::EventT< void(int)> changeBuildingLevel
The current level has been changed.
Definition: BuildingEditorEvents.hh:220
gazebo::gui::editor::Events::saveAsBuildingEditor
static event::EventT< bool()> saveAsBuildingEditor
Save the model as.
Definition: BuildingEditorEvents.hh:251
gazebo::event::ConnectionPtr
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
gazebo::gui::editor::Events::changeBuildingEditorZoom
static event::EventT< void(double)> changeBuildingEditorZoom
The current zoom level has been changed.
Definition: BuildingEditorEvents.hh:245
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::editor::Events::ConnectShowFloorplan
static event::ConnectionPtr ConnectShowFloorplan(T _subscriber)
Connect a Gazebo event to the show floorplan signal.
Definition: BuildingEditorEvents.hh:115
gazebo::gui::editor::Events::showFloorplan
static event::EventT< void()> showFloorplan
Show or hide floorplan.
Definition: BuildingEditorEvents.hh:229
gazebo::gui::editor::Events::showElements
static event::EventT< void()> showElements
Show or hide building elements.
Definition: BuildingEditorEvents.hh:235
gazebo::gui::editor::Events::ConnectNewBuildingEditor
static event::ConnectionPtr ConnectNewBuildingEditor(T _subscriber)
Connect a Gazebo event to the new signal.
Definition: BuildingEditorEvents.hh:179
gazebo::gui::editor::Events::ConnectTriggerShowElements
static event::ConnectionPtr ConnectTriggerShowElements(T _subscriber)
Connect a Gazebo event to the trigger show elements signal.
Definition: BuildingEditorEvents.hh:140
gazebo::gui::editor::Events::createBuildingEditorItem
static event::EventT< void(std::string)> createBuildingEditorItem
An editor item is to be created.
Definition: BuildingEditorEvents.hh:202
gazebo::gui::editor::Events::ConnectDeleteBuildingLevel
static event::ConnectionPtr ConnectDeleteBuildingLevel(T _subscriber)
Connect a Gazebo event to the delete level signal.
Definition: BuildingEditorEvents.hh:108
gazebo::gui::editor::Events::ConnectChangeBuildingEditorZoom
static event::ConnectionPtr ConnectChangeBuildingEditorZoom(T _subscriber)
Connect a Gazebo event to the change zoom signal.
Definition: BuildingEditorEvents.hh:156
Event.hh
gazebo::gui::editor::Events::exitBuildingEditor
static event::EventT< void()> exitBuildingEditor
Exit the editor mode with the option to save.
Definition: BuildingEditorEvents.hh:257
gazebo::gui::editor::Events::buildingNameChanged
static event::EventT< void(std::string)> buildingNameChanged
Name was changed in the editor palette.
Definition: BuildingEditorEvents.hh:260
gazebo::gui::editor::Events
Definition: BuildingEditorEvents.hh:31
gazebo::gui::editor::Events::finishBuildingModel
static event::EventT< void()> finishBuildingModel
A model has been completed and uploaded onto the server.
Definition: BuildingEditorEvents.hh:214
gazebo::gui::editor::Events::textureSelected
static event::EventT< void(QString)> textureSelected
A texture has been selected.
Definition: BuildingEditorEvents.hh:208
gazebo::gui::editor::Events::newBuildingModel
static event::EventT< void()> newBuildingModel
A new model has been started.
Definition: BuildingEditorEvents.hh:217
gazebo::gui::editor::Events::triggerShowElements
static event::EventT< void()> triggerShowElements
Trigger show elements.
Definition: BuildingEditorEvents.hh:238
gazebo::gui::editor::Events::ConnectCreateBuildingEditorItem
static event::ConnectionPtr ConnectCreateBuildingEditorItem(T _subscriber)
Connect a Gazebo event to the create editor item signal.
Definition: BuildingEditorEvents.hh:46
gazebo::gui::editor::Events::ConnectSaveBuildingModel
static event::ConnectionPtr ConnectSaveBuildingModel(T _subscriber)
Connect a Gazebo event to the save model signal.
Definition: BuildingEditorEvents.hh:69