AlignWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-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_ALIGN_WIDGET_HH_
18 #define _GAZEBO_ALIGN_WIDGET_HH_
19 
20 #include <string>
21 
22 #include "gazebo/gui/qt.h"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
29  class AlignWidgetPrivate;
30 
33  class GZ_GUI_VISIBLE AlignWidget : public QWidget
34  {
35  Q_OBJECT
36 
37  public: enum AlignAxis
38  {
44  ALIGN_Z
45  };
46 
47  public: enum AlignConfig
48  {
54  ALIGN_MAX
55  };
56 
59  public: AlignWidget(QWidget *_parent = 0);
60 
62  public: virtual ~AlignWidget();
63 
68  public: void Add(AlignAxis _axis, AlignConfig _config, QAction *_action);
69 
72  private slots: void OnAlignMode(QString _mode);
73 
77  private slots: void OnAlignTargetChanged(int _index);
78 
83  private slots: void OnDirectionChanged(bool _checked);
84 
88  private: std::string GetAxisAsString(AlignAxis _axis);
89 
93  private: std::string GetConfigAsString(AlignConfig _config);
94 
100  private: bool eventFilter(QObject *_obj, QEvent *_event);
101 
104  private: AlignWidgetPrivate *dataPtr;
105  };
106  }
107 }
108 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
AlignConfig
Definition: AlignWidget.hh:47
X.
Definition: AlignWidget.hh:40
AlignAxis
Definition: AlignWidget.hh:37
minimum
Definition: AlignWidget.hh:50
Y.
Definition: AlignWidget.hh:42
A gui widget for aligning models.
Definition: AlignWidget.hh:33
center
Definition: AlignWidget.hh:52