ViewAngleWidget.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_GUI_VIEWANGLEWIDGET_HH_
18 #define GAZEBO_GUI_VIEWANGLEWIDGET_HH_
19 
20 #include <string>
21 
22 #include <ignition/math/Vector3.hh>
23 
24 #include "gazebo/gui/qt.h"
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
29  namespace gui
30  {
31  class ViewAngleWidgetPrivate;
32 
34  class GZ_GUI_VISIBLE ViewAngleWidget : public QWidget
35  {
36  Q_OBJECT
37 
39  public: enum Mode
40  {
42  TOP,
54  RESET
55  };
56 
59  public: explicit ViewAngleWidget(QWidget *_parent = 0);
60 
62  public: virtual ~ViewAngleWidget();
63 
67  public: void Add(const Mode _mode, QAction *_action);
68 
70  private slots: void OnTopView();
71 
73  private slots: void OnBottomView();
74 
76  private slots: void OnFrontView();
77 
79  private slots: void OnBackView();
80 
82  private slots: void OnLeftView();
83 
85  private slots: void OnRightView();
86 
88  private slots: void OnResetView();
89 
92  private slots: void OnProjection(int _index);
93 
95  private slots: void OnOrtho();
96 
98  private slots: void OnPerspective();
99 
106  private: void LookDirection(const ignition::math::Vector3d &_dir);
107 
110  private: ViewAngleWidgetPrivate *dataPtr;
111  };
112  }
113 }
114 #endif
Forward declarations for the common classes.
Definition: Animation.hh:26
Front.
Definition: ViewAngleWidget.hh:46
Left.
Definition: ViewAngleWidget.hh:50
Right.
Definition: ViewAngleWidget.hh:52
A gui widget for changing the camera view angle.
Definition: ViewAngleWidget.hh:34
Bottom.
Definition: ViewAngleWidget.hh:44
Back.
Definition: ViewAngleWidget.hh:48
Mode
View angle modes.
Definition: ViewAngleWidget.hh:39
Top.
Definition: ViewAngleWidget.hh:42