All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RenderWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 _RENDER_WIDGET_HH_
18 #define _RENDER_WIDGET_HH_
19 
20 #include <string>
21 #include <vector>
22 
23 #include "gazebo/gui/qt.h"
24 #include "gazebo/common/Event.hh"
25 #include "gazebo/util/system.hh"
26 
27 class QLineEdit;
28 class QLabel;
29 class QFrame;
30 class QHBoxLayout;
31 
32 namespace gazebo
33 {
34  class GLWidget;
35 
36  namespace gui
37  {
38  class BuildingEditorWidget;
39 
40  class GAZEBO_VISIBLE RenderWidget : public QWidget
41  {
42  Q_OBJECT
43  public: RenderWidget(QWidget *_parent = 0);
44  public: virtual ~RenderWidget();
45 
46  public: void RemoveScene(const std::string &_name);
47  public: void CreateScene(const std::string &_name);
48 
51  public: void ShowEditor(bool _show);
52 
56  public: void DisplayOverlayMsg(const std::string &_msg,
57  int _duration = -1);
58 
61  public: std::string GetOverlayMsg() const;
62 
63  private slots: virtual void update();
64 
67  private slots: void OnClearOverlayMsg();
68 
69  private: void OnFullScreen(bool &_value);
70 
73  private: void OnFollow(const std::string &_modelName);
74 
76  private: GLWidget *glWidget;
77 
79  private: BuildingEditorWidget *buildingEditorWidget;
80 
82  private: QFrame *mainFrame;
83 
85  private: std::vector<event::ConnectionPtr> connections;
86 
88  private: QFrame *bottomFrame;
89  private: QLabel *xyzLabel;
90  private: QLineEdit *xPosEdit;
91  private: QLineEdit *yPosEdit;
92  private: QLineEdit *zPosEdit;
93 
94  private: QLabel *rpyLabel;
95  private: QLineEdit *rollEdit;
96  private: QLineEdit *pitchEdit;
97  private: QLineEdit *yawEdit;
98  private: QLineEdit *fpsEdit;
99  private: QLineEdit *trianglesEdit;
100 
101  private: QToolBar *mouseToolbar;
102  private: QToolBar *editToolbar;
103 
105  private: QLabel *msgOverlayLabel;
106 
107  private: bool clear;
108  private: std::string clearName;
109 
110  private: bool create;
111  private: std::string createName;
112  private: QTimer *timer;
113 
115  private: std::string baseOverlayMsg;
116  };
117  }
118 }
119 #endif
Definition: GLWidget.hh:50
void create()
Create SkyX.
Definition: RenderWidget.hh:40
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
The parent widget of the building editor, level widget and scale widget.
Definition: BuildingEditorWidget.hh:37
class __declspec(dllimport) BasicController void update(const Ogre::Real &simDeltaTime)
Basic controller class.