All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
JointInspector.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2013 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 _JOINT_INSPECTOR_HH_
19 #define _JOINT_INSPECTOR_HH_
20 
21 #include <string>
22 #include <vector>
23 
24 #include "gazebo/gui/qt.h"
26 #include "gazebo/util/system.hh"
27 
28 
29 namespace gazebo
30 {
31  namespace gui
32  {
33  class JointMaker;
34 
37  class GAZEBO_VISIBLE JointInspector : public QDialog
38  {
39  Q_OBJECT
40 
44  public: JointInspector(JointMaker::JointType _jointType,
45  QWidget *_parent = 0);
46 
48  public: ~JointInspector();
49 
53  public: math::Vector3 GetAnchor(unsigned int _index) const;
54 
58  public: math::Vector3 GetAxis(unsigned int _index) const;
59 
63  public: double GetLowerLimit(unsigned int _index) const;
64 
68  public: double GetUpperLimit(unsigned int _index) const;
69 
72  public: JointMaker::JointType GetType() const;
73 
76  public: void SetName(const std::string &_name);
77 
81  public: void SetAnchor(unsigned int _index, const math::Vector3 &_anchor);
82 
86  public: void SetAxis(unsigned int _index, const math::Vector3 &_axis);
87 
91  public: void SetLowerLimit(unsigned int _index, double _lower);
92 
96  public: void SetUpperLimit(unsigned int _index, double _upper);
97 
100  public: void SetType(JointMaker::JointType _type);
101 
103  Q_SIGNALS: void Applied();
104 
106  private slots: void OnCancel();
107 
109  private slots: void OnApply();
110 
112  private slots: void OnOK();
113 
115  private: QLabel* jointNameLabel;
116 
118  private: QLabel *jointTypeLabel;
119 
121  private: QDoubleSpinBox *anchorXSpinBox;
122 
124  private: QDoubleSpinBox *anchorYSpinBox;
125 
127  private: QDoubleSpinBox *anchorZSpinBox;
128 
130  private: std::vector<QDoubleSpinBox *> axisXSpinBoxes;
131 
133  private: std::vector<QDoubleSpinBox *> axisYSpinBoxes;
134 
136  private: std::vector<QDoubleSpinBox *> axisZSpinBoxes;
137 
139  private: std::vector<QDoubleSpinBox *> lowerLimitSpinBoxes;
140 
142  private: std::vector<QDoubleSpinBox *> upperLimitSpinBoxes;
143 
145  private: JointMaker::JointType jointType;
146 
148  private: std::vector<QGroupBox *> axisGroupBoxes;
149  };
151  }
152 }
153 
154 #endif
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
JointType
Definition: JointMaker.hh:52
A class to inspect and modify joints.
Definition: JointInspector.hh:37
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48