Gazebo Gazebo

API Reference

3.15.1
PlaybackScrubber.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 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 GZ_GAZEBO_GUI_PLAYBACK_SCRUBBER_HH_
19 #define GZ_GAZEBO_GUI_PLAYBACK_SCRUBBER_HH_
20 
21 #include <chrono>
22 #include <memory>
23 
24 #include <gz/sim/gui/GuiSystem.hh>
25 #include <gz/gui/Plugin.hh>
26 
27 namespace ignition
28 {
29 namespace gazebo
30 {
31  class PlaybackScrubberPrivate;
32 
36  {
37  Q_OBJECT
38 
40  public: PlaybackScrubber();
41 
43  public: ~PlaybackScrubber() override;
44 
45  // Documentation inherited
46  public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override;
47 
48  // Documentation inherited
49  public: void Update(const UpdateInfo &, EntityComponentManager &) override;
50 
55  public: double CalculateProgress();
56 
60  public slots: double Progress();
61 
64  public slots: QString StartTimeAsString();
65 
68  public slots: QString EndTimeAsString();
69 
72  public slots: QString CurrentTimeAsString();
73 
77  public slots: void OnDrop(double _value);
78 
81  public slots: void OnTimeEntered(const QString &_time);
82 
84  signals: void newProgress();
85 
89  };
90 }
91 }
92 
93 #endif
Base class for a GUI System.
Definition: gz/sim/gui/GuiSystem.hh:44
This library is part of the Ignition Robotics project.
The EntityComponentManager constructs, deletes, and returns components and entities....
Definition: gz/sim/EntityComponentManager.hh:65
void OnTimeEntered(const QString &_time)
Callback when a time is entered by the user.
void newProgress()
Notify that progress has advanced in the log file.
double CalculateProgress()
Calculate the percentage that _currentTime, eg, halfway through the log would evaluate to 0....
Information passed to systems on the update callback.
Definition: include/gz/sim/Types.hh:37
Provides buttons for adding a box, sphere, or cylinder to the scene.
Definition: PlaybackScrubber.hh:35
void OnDrop(double _value)
Callback in Qt thread when the slider is released.
double Progress()
Get the current progress as a percentage of how far the log playback has advanced.
QString StartTimeAsString()
Get the starting time of the log playback.
void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override
QString EndTimeAsString()
Get the end time of the log playback.
~PlaybackScrubber() override
Destructor.
QString CurrentTimeAsString()
Get the current time of the log playback.
void Update(const UpdateInfo &, EntityComponentManager &) override
Update callback called every time the system is stepped. This is called at an Ignition transport thre...