AlignWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-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 _ALIGN_WIDGET_HH_
18 #define _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 GAZEBO_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 
82  private: std::string GetAxisAsString(AlignAxis _axis);
83 
87  private: std::string GetConfigAsString(AlignConfig _config);
88 
94  private: bool eventFilter(QObject *_obj, QEvent *_event);
95 
98  private: AlignWidgetPrivate *dataPtr;
99  };
100  }
101 }
102 #endif
center
Definition: AlignWidget.hh:52
X.
Definition: AlignWidget.hh:40
Y.
Definition: AlignWidget.hh:42
minimum
Definition: AlignWidget.hh:50
Private data for the AlignWidget class.
Definition: AlignWidgetPrivate.hh:28
AlignConfig
Definition: AlignWidget.hh:47
A gui widget for aligning models.
Definition: AlignWidget.hh:33
AlignAxis
Definition: AlignWidget.hh:37
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66