ViewAngleWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-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 
18 #ifndef _GAZEBO_VIEW_ANGLE_WIDGET_HH_
19 #define _GAZEBO_VIEW_ANGLE_WIDGET_HH_
20 
21 #include <string>
22 
23 #include <ignition/math/Vector3.hh>
24 
25 #include "gazebo/gui/qt.h"
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
30  namespace gui
31  {
32  class ViewAngleWidgetPrivate;
33 
35  class GZ_GUI_VISIBLE ViewAngleWidget : public QWidget
36  {
37  Q_OBJECT
38 
40  public: enum Mode
41  {
43  TOP,
55  RESET
56  };
57 
60  public: ViewAngleWidget(QWidget *_parent = 0);
61 
63  public: virtual ~ViewAngleWidget();
64 
68  public: void Add(const Mode _mode, QAction *_action);
69 
71  private slots: void OnTopView();
72 
74  private slots: void OnBottomView();
75 
77  private slots: void OnFrontView();
78 
80  private slots: void OnBackView();
81 
83  private slots: void OnLeftView();
84 
86  private slots: void OnRightView();
87 
89  private slots: void OnResetView();
90 
93  private slots: void OnProjection(int _index);
94 
96  private slots: void OnOrtho();
97 
99  private slots: void OnPerspective();
100 
107  private: void LookDirection(const ignition::math::Vector3d &_dir);
108 
111  private: ViewAngleWidgetPrivate *dataPtr;
112  };
113  }
114 }
115 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
Front.
Definition: ViewAngleWidget.hh:47
Left.
Definition: ViewAngleWidget.hh:51
Right.
Definition: ViewAngleWidget.hh:53
A gui widget for changing the camera view angle.
Definition: ViewAngleWidget.hh:35
Bottom.
Definition: ViewAngleWidget.hh:45
Back.
Definition: ViewAngleWidget.hh:49
Mode
View angle modes.
Definition: ViewAngleWidget.hh:40
Top.
Definition: ViewAngleWidget.hh:43