Gazebo Gui

API Reference

6.8.0
WorldControlEventListener.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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 #ifndef GZ_GUI_WORLDCONTROLEVENTLISTENER_HH_
18 #define GZ_GUI_WORLDCONTROLEVENTLISTENER_HH_
19 
20 #include "gz/gui/Application.hh"
21 #include "gz/gui/Export.hh"
22 #include "gz/gui/GuiEvents.hh"
23 #include "gz/gui/MainWindow.hh"
24 #include "gz/gui/qt.h"
25 
26 namespace ignition
27 {
28 namespace gui
29 {
34  {
35  Q_OBJECT
36 
38  public: WorldControlEventListener();
39 
41  public: virtual ~WorldControlEventListener() override;
42 
43  // Documentation inherited
44  protected: bool eventFilter(QObject *_obj, QEvent *_event) override;
45 
47  public: bool listenedToPlay{false};
48 
50  public: bool listenedToPause{false};
51 
53  public: bool listenedToStep{false};
54  };
55 }
56 }
57 
58 #endif
bool listenedToPlay
Whether a play event has been received (true) or not (false)
Definition: WorldControlEventListener.hh:47
bool listenedToStep
Whether a step event has been received (true) or not (false)
Definition: WorldControlEventListener.hh:53
Helper class for testing listening to events emitted by the WorldControl plugin. This is used for tes...
Definition: WorldControlEventListener.hh:33
bool listenedToPause
Whether a pause event has been received (true) or not (false)
Definition: WorldControlEventListener.hh:50
bool eventFilter(QObject *_obj, QEvent *_event) override
virtual ~WorldControlEventListener() override
Destructor.