Ignition Gui

API Reference

5.0.0
WorldControl.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 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 
18 #ifndef IGNITION_GUI_PLUGINS_WORLDCONTROL_HH_
19 #define IGNITION_GUI_PLUGINS_WORLDCONTROL_HH_
20 
21 #include <memory>
22 
23 #ifdef _MSC_VER
24 #pragma warning(push, 0)
25 #endif
26 #include <ignition/msgs.hh>
27 #ifdef _MSC_VER
28 #pragma warning(pop)
29 #endif
30 #include <ignition/transport.hh>
31 
32 #include "ignition/gui/Plugin.hh"
33 
34 #ifndef _WIN32
35 # define WorldControl_EXPORTS_API
36 #else
37 # if (defined(WorldControl_EXPORTS))
38 # define WorldControl_EXPORTS_API __declspec(dllexport)
39 # else
40 # define WorldControl_EXPORTS_API __declspec(dllimport)
41 # endif
42 #endif
43 
44 namespace ignition
45 {
46 namespace gui
47 {
48 namespace plugins
49 {
50  class WorldControlPrivate;
51 
67  {
68  Q_OBJECT
69 
71  public: WorldControl();
72 
74  public: virtual ~WorldControl();
75 
76  // Documentation inherited
77  public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem);
78 
80  public slots: void ProcessMsg();
81 
83  public slots: void OnPlay();
84 
86  public slots: void OnPause();
87 
89  public slots: void OnStep();
90 
93  public slots: void OnStepCount(const unsigned int _steps);
94 
96  signals: void playing();
97 
99  signals: void paused();
100 
102  private: void OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg);
103 
104  // Private data
105  private: std::unique_ptr<WorldControlPrivate> dataPtr;
106  };
107 }
108 }
109 }
110 
111 #endif
Base class for Ignition GUI plugins.
Definition: Plugin.hh:54
This plugin provides a world control panel which may have a play / pause and step buttons...
Definition: WorldControl.hh:66
#define WorldControl_EXPORTS_API
Definition: WorldControl.hh:35
Definition: Application.hh:40