2
* Copyright (C) 2018 Open Source Robotics Foundation
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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
17
#ifndef IGNITION_GAZEBO_GUI_GUISYSTEM_HH_
18
#define IGNITION_GAZEBO_GUI_GUISYSTEM_HH_
22
#include <ignition/gazebo/config.hh>
23
#include <ignition/gazebo/EntityComponentManager.hh>
24
#include <ignition/gazebo/gui/Export.hh>
25
#include <ignition/gui/Plugin.hh>
27
#include <sdf/Element.hh>
33
// Inline bracket to help doxygen filtering.
34
inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
35
/// \brief Base class for a GUI System.
37
/// A System operates on Entities that have certain Components. A System
38
/// will only operate on an Entity if it has all of the required
41
/// GUI systems are different from `ignition::gazebo::System`s because they
42
/// don't run in the same process as the physics. Instead, they run in a
43
/// separate process that is stepped by updates coming through the network
44
class IGNITION_GAZEBO_GUI_VISIBLE GuiSystem : public ignition::gui::Plugin
48
/// \brief Update callback called every time the system is stepped.
49
/// This is called at an Ignition transport thread, so any interaction
50
/// with Qt should be done through signals and slots.
51
/// \param[in] _info Current simulation information, such as time.
52
/// \param[in] _ecm Mutable reference to the ECM, so the system can read
53
/// and write entities and their components.
54
public: virtual void Update(const UpdateInfo &_info,
55
EntityComponentManager &_ecm)
57
// This will avoid many doxygen warnings