LinkConfig.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
18#ifndef _GAZEBO_LINK_CONFIG_HH_
19#define _GAZEBO_LINK_CONFIG_HH_
20
21#include <string>
22
23#include <ignition/math/Pose3.hh>
24
25#include "gazebo/msgs/msgs.hh"
26#include "gazebo/gui/qt.h"
27
28namespace gazebo
29{
30 namespace gui
31 {
32 class ConfigWidget;
33
36
39 class GZ_GUI_VISIBLE LinkConfig : public QWidget
40 {
41 Q_OBJECT
42
44 public: LinkConfig();
45
47 public: virtual ~LinkConfig();
48
51 public: void Update(ConstLinkPtr _linkMsg);
52
55 public: msgs::Link *GetData() const;
56
59 public: void SetPose(const ignition::math::Pose3d &_pose);
60
63 public: void SetMass(const double _mass);
64
67 public: double Mass() const;
68
71 public: void SetDensity(const double _density);
72
75 public: double Density() const;
76
84 public: void SetInertiaMatrix(const double _ixx, const double _iyy,
85 const double _izz, const double _ixy, const double _ixz,
86 const double _iyz);
87
90 public: void SetInertialPose(const ignition::math::Pose3d &_pose);
91
94 public: const ConfigWidget *LinkConfigWidget() const;
95
97 public: void Init();
98
100 public slots: void RestoreOriginalData();
101
103 Q_SIGNALS: void Applied();
104
107 Q_SIGNALS: void DensityValueChanged(const double _value);
108
111 Q_SIGNALS: void MassValueChanged(const double _value);
112
115 private slots: void OnDensityValueChanged(const double _value);
116
119 private slots: void OnMassValueChanged(const double _value);
120
125 private slots: void OnPoseChanged(const QString &_name,
126 const ignition::math::Pose3d &_value);
127
129 private: ConfigWidget *configWidget;
130
133 private: msgs::Link originalDataMsg;
134 };
136 }
137}
138#endif
gui
Definition KeyEventHandler.hh:29
A widget generated from a google protobuf message.
Definition ConfigWidget.hh:194
A tab for configuring properties of a link.
Definition LinkConfig.hh:40
LinkConfig()
Constructor.
void Init()
Initialize widget.
void SetDensity(const double _density)
Set the density of the link.
void Applied()
Qt signal emitted to indicate that changes should be applied.
virtual ~LinkConfig()
Destructor.
void SetInertialPose(const ignition::math::Pose3d &_pose)
Set the inertial pose of the link.
void Update(ConstLinkPtr _linkMsg)
Update the link config widget with a link msg.
double Density() const
Retrieve current density value.
void SetInertiaMatrix(const double _ixx, const double _iyy, const double _izz, const double _ixy, const double _ixz, const double _iyz)
Set the inertia matrix of the link.
void RestoreOriginalData()
Restore the widget's data to how it was when first opened.
void MassValueChanged(const double _value)
Signal emitted when mass changes.
const ConfigWidget * LinkConfigWidget() const
Get the config widget for the link.
void SetMass(const double _mass)
Set the mass of the link.
double Mass() const
Retrieve current mass value.
msgs::Link * GetData() const
Get the msg containing all link data.
void DensityValueChanged(const double _value)
Signal emitted when density changes.
void SetPose(const ignition::math::Pose3d &_pose)
Set the pose of the link.
Forward declarations for the common classes.
Definition Animation.hh:27