TimeWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 _GAZEBO_TIME_WIDGET_HH_
18 #define _GAZEBO_TIME_WIDGET_HH_
19 
20 #include "gazebo/gui/qt.h"
21 #include "gazebo/gui/TimePanel.hh"
22 #include "gazebo/util/system.hh"
23 
24 namespace gazebo
25 {
26  namespace gui
27  {
28  class TimeWidgetPrivate;
29  class TimePanel;
30 
31  class GAZEBO_VISIBLE TimeWidget : public QWidget
32  {
33  Q_OBJECT
34 
37  public: TimeWidget(QWidget *_parent = 0);
38 
40  public: virtual ~TimeWidget();
41 
44  public: void ShowRealTimeFactor(bool _show);
45 
48  public: void ShowRealTime(bool _show);
49 
52  public: void ShowSimTime(bool _show);
53 
56  public: void ShowIterations(bool _show);
57 
60  public: void ShowStepWidget(bool _show);
61 
64  public: void ShowFPS(bool _show);
65 
68  public: bool IsPaused() const;
69 
73  public: void SetPaused(bool _paused);
74 
77  public: void EmitSetSimTime(QString _string);
78 
81  public: void EmitSetRealTime(QString _string);
82 
85  public: void EmitSetIterations(QString _string);
86 
89  public: void EmitSetFPS(QString _string);
90 
93  public: void SetPercentRealTimeEdit(QString _text);
94 
97  public slots: void OnStepValueChanged(int _value);
98 
100  public slots: void OnTimeReset();
101 
104  signals: void SetSimTime(QString _string);
105 
108  signals: void SetRealTime(QString _string);
109 
112  signals: void SetIterations(QString _string);
113 
116  signals: void SetFPS(QString _string);
117 
120  private: TimeWidgetPrivate *dataPtr;
121  };
122  }
123 }
124 
125 #endif
Definition: TimeWidget.hh:31
Definition: TimeWidgetPrivate.hh:30
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66