TimePanel.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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_GUI_TIMEPANEL_HH_
18 #define GAZEBO_GUI_TIMEPANEL_HH_
19 
20 #include <vector>
21 #include <list>
22 #include <string>
23 
24 #include "gazebo/gui/qt.h"
25 #include "gazebo/gui/TimeWidget.hh"
28 #include "gazebo/msgs/MessageTypes.hh"
29 #include "gazebo/common/Event.hh"
30 #include "gazebo/common/Time.hh"
31 #include "gazebo/util/system.hh"
32 
33 class QLineEdit;
34 class QLabel;
35 
36 namespace gazebo
37 {
38  namespace gui
39  {
40  class TimePanelPrivate;
41  class TimeWidget;
42  class LogPlayWidget;
43 
44  class GZ_GUI_VISIBLE TimePanel : public QWidget
45  {
46  Q_OBJECT
47 
50  public: TimePanel(QWidget *_parent = 0);
51 
53  public: virtual ~TimePanel();
54 
57  public: void ShowRealTimeFactor(bool _show);
58 
61  public: void ShowRealTime(bool _show);
62 
65  public: void ShowSimTime(bool _show);
66 
69  public: void ShowIterations(bool _show);
70 
73  public: void ShowStepWidget(bool _show);
74 
77  public: void ShowFPS(bool _show);
78 
81  public: bool IsPaused() const;
82 
86  public: void SetPaused(bool _paused);
87 
89  public slots: void TogglePause();
90 
93  public slots: void OnStepValueChanged(int _value);
94 
96  public slots: void OnTimeReset();
97 
100  signals: void SetTimeWidgetVisible(bool _visible);
101 
104  signals: void SetLogPlayWidgetVisible(bool _visible);
105 
107  private slots: void Update();
108 
110  private slots: void OnPlayActionChanged();
111 
115  private: void OnFullScreen(bool _value);
116 
119  private: void OnStats(ConstWorldStatisticsPtr &_msg);
120 
123  private: TimePanelPrivate *dataPtr;
124  };
125  }
126 }
127 
128 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
Forward declarations for transport.
Definition: TimePanel.hh:44