RenderWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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_RENDER_WIDGET_HH_
18 #define _GAZEBO_RENDER_WIDGET_HH_
19 
20 #include <string>
21 #include <vector>
22 #include <sdf/sdf.hh>
23 
24 #include "gazebo/gui/qt.h"
25 #include "gazebo/common/Event.hh"
26 #include "gazebo/util/system.hh"
27 
28 
29 namespace gazebo
30 {
31  namespace gui
32  {
33  class TopToolbar;
34  class GLWidget;
35  class TimePanel;
36 
37  class GZ_GUI_VISIBLE RenderWidget : public QWidget
38  {
39  Q_OBJECT
40  public: RenderWidget(QWidget *_parent = 0);
41  public: virtual ~RenderWidget();
42 
43  public: void RemoveScene(const std::string &_name);
44  public: void CreateScene(const std::string &_name);
45 
49  public: void InsertWidget(unsigned int _index, QWidget *_widget);
50 
53  public: void ShowTimePanel(bool _show);
54 
57  public: TimePanel *GetTimePanel() const;
58 
62  public: void DisplayOverlayMsg(const std::string &_msg,
63  int _duration = -1);
64 
67  public: void SetOverlaysVisible(const bool _visible);
68 
71  public: std::string GetOverlayMsg() const;
72 
76  public: void AddPlugin(GUIPluginPtr _plugin, sdf::ElementPtr _elem);
77 
80  public: TopToolbar *GetToolbar() const;
81 
84  public: void ShowToolbar(const bool _show);
85 
88  private slots: void OnClearOverlayMsg();
89 
90  private: void OnFullScreen(bool &_value);
91 
94  private: void OnFollow(const std::string &_modelName);
95 
97  private: GLWidget *glWidget;
98 
100  private: QFrame *mainFrame;
101 
103  private: std::vector<event::ConnectionPtr> connections;
104 
106  private: QFrame *bottomFrame;
107 
109  private: TopToolbar *topToolbar;
110 
112  private: QLabel *msgOverlayLabel;
113 
115  private: std::string baseOverlayMsg;
116 
118  private: QSplitter *splitter;
119 
121  private: std::vector<gazebo::GUIPluginPtr> plugins;
122 
124  private: TimePanel *timePanel;
125  };
126  }
127 }
128 #endif
Definition: GLWidget.hh:40
Definition: RenderWidget.hh:37
Definition: TimePanel.hh:44
boost::shared_ptr< GUIPlugin > GUIPluginPtr
Definition: CommonTypes.hh:81
Toolbar on the top of the main window.
Definition: TopToolbar.hh:32