Ignition Gazebo

API Reference

5.0.0
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 IGNITION_GAZEBO_GUI_PLAYBACK_SCRUBBER_HH_
19 #define IGNITION_GAZEBO_GUI_PLAYBACK_SCRUBBER_HH_
20 
21 #include <chrono>
22 #include <memory>
23 
25 #include <ignition/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
void Update(const UpdateInfo &, EntityComponentManager &) override
Update callback called every time the system is stepped. This is called at an Ignition transport thre...
Provides slider and functionality for log playback. to the scene.
Definition: PlaybackScrubber.hh:35
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...
QString StartTimeAsString()
Get the starting time of the log playback.
void OnTimeEntered(const QString &_time)
Callback when a time is entered by the user.
Information passed to systems on the update callback.
Definition: Types.hh:36
void OnDrop(double _value)
Callback in Qt thread when the slider is released.
The EntityComponentManager constructs, deletes, and returns components and entities. A component can be of any class which inherits from components::BaseComponent.
Definition: EntityComponentManager.hh:65
QString EndTimeAsString()
Get the end time of the log playback.
~PlaybackScrubber() override
Destructor.
void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override
double Progress()
Get the current progress as a percentage of how far the log playback has advanced.
This library is part of the Ignition Robotics project.
Base class for a GUI System.
Definition: GuiSystem.hh:44
QString CurrentTimeAsString()
Get the current time of the log playback.