Ignition Gui

API Reference

1.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 #include <ignition/msgs.hh>
24 #include <ignition/transport.hh>
25 
26 #include "ignition/gui/Plugin.hh"
27 
28 #ifndef _WIN32
29 # define WorldControl_EXPORTS_API
30 #else
31 # if (defined(WorldControl_EXPORTS))
32 # define WorldControl_EXPORTS_API __declspec(dllexport)
33 # else
34 # define WorldControl_EXPORTS_API __declspec(dllimport)
35 # endif
36 #endif
37 
38 namespace ignition
39 {
40 namespace gui
41 {
42 namespace plugins
43 {
44  class WorldControlPrivate;
45 
57  {
58  Q_OBJECT
59 
61  public: WorldControl();
62 
64  public: virtual ~WorldControl();
65 
66  // Documentation inherited
67  public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem);
68 
70  public slots: void ProcessMsg();
71 
73  public slots: void OnPlay();
74 
76  public slots: void OnPause();
77 
79  public slots: void OnStep();
80 
83  public slots: void OnStepCount(const unsigned int _steps);
84 
86  signals: void playing();
87 
89  signals: void paused();
90 
92  private: void OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg);
93 
94  // Private data
95  private: std::unique_ptr<WorldControlPrivate> dataPtr;
96  };
97 }
98 }
99 }
100 
101 #endif
Base class for Ignition GUI plugins.
Definition: Plugin.hh:47
This plugin provides a world control panel which may have a play / pause and step buttons...
Definition: WorldControl.hh:56
#define WorldControl_EXPORTS_API
Definition: WorldControl.hh:29
Definition: Application.hh:33