##

LinkConfig.hh
Go to the documentation of this file.
/*
* Copyright (C) 2015 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _GAZEBO_LINK_CONFIG_HH_
#define _GAZEBO_LINK_CONFIG_HH_
#include <string>
#include <ignition/math/Pose3.hh>
#include "gazebo/msgs/msgs.hh"
#include "gazebo/gui/qt.h"
namespace gazebo
{
namespace gui
{
class ConfigWidget;
class GZ_GUI_VISIBLE LinkConfig : public QWidget
{
Q_OBJECT
public: LinkConfig();
public: virtual ~LinkConfig();
public: void Update(ConstLinkPtr _linkMsg);
public: msgs::Link *GetData() const;
public: void SetPose(const ignition::math::Pose3d &_pose);
public: void SetMass(const double _mass);
public: double Mass() const;
public: void SetDensity(const double _density);
public: double Density() const;
public: void SetInertiaMatrix(const double _ixx, const double _iyy,
const double _izz, const double _ixy, const double _ixz,
const double _iyz);
public: void SetInertialPose(const ignition::math::Pose3d &_pose);
public: const ConfigWidget *LinkConfigWidget() const;
public: void Init();
public slots: void RestoreOriginalData();
Q_SIGNALS: void Applied();
Q_SIGNALS: void DensityValueChanged(const double _value);
Q_SIGNALS: void MassValueChanged(const double _value);
private slots: void OnDensityValueChanged(const double _value);
private slots: void OnMassValueChanged(const double _value);
private slots: void OnPoseChanged(const QString &_name,
const ignition::math::Pose3d &_value);
private: ConfigWidget *configWidget;
private: msgs::Link originalDataMsg;
};
}
}
#endif
gazebo::gui::LinkConfig::~LinkConfig
virtual ~LinkConfig()
Destructor.
gazebo::gui::LinkConfig::SetInertiaMatrix
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.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::LinkConfig::LinkConfigWidget
const ConfigWidget * LinkConfigWidget() const
Get the config widget for the link.
gazebo::gui::LinkConfig::Density
double Density() const
Retrieve current density value.
msgs.hh
gazebo::gui::LinkConfig::Update
void Update(ConstLinkPtr _linkMsg)
Update the link config widget with a link msg.
gazebo::gui::LinkConfig::RestoreOriginalData
void RestoreOriginalData()
Restore the widget's data to how it was when first opened.
gazebo::gui::LinkConfig::MassValueChanged
void MassValueChanged(const double _value)
Signal emitted when mass changes.
gazebo::gui::LinkConfig::SetDensity
void SetDensity(const double _density)
Set the density of the link.
gazebo::gui::LinkConfig::SetMass
void SetMass(const double _mass)
Set the mass of the link.
gazebo::gui::LinkConfig::GetData
msgs::Link * GetData() const
Get the msg containing all link data.
gazebo::gui::LinkConfig::Init
void Init()
Initialize widget.
gazebo::gui::LinkConfig::LinkConfig
LinkConfig()
Constructor.
gazebo::gui::LinkConfig::SetPose
void SetPose(const ignition::math::Pose3d &_pose)
Set the pose of the link.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::LinkConfig::Applied
void Applied()
Qt signal emitted to indicate that changes should be applied.
gazebo::gui::LinkConfig::SetInertialPose
void SetInertialPose(const ignition::math::Pose3d &_pose)
Set the inertial pose of the link.
gazebo::gui::LinkConfig
A tab for configuring properties of a link.
Definition: LinkConfig.hh:39
gazebo::gui::LinkConfig::Mass
double Mass() const
Retrieve current mass value.
gazebo::gui::ConfigWidget
A widget generated from a google protobuf message.
Definition: ConfigWidget.hh:193
gazebo::gui::LinkConfig::DensityValueChanged
void DensityValueChanged(const double _value)
Signal emitted when density changes.