##

JointInspector.hh
Go to the documentation of this file.
/*
* Copyright (C) 2014 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_GUI_JOINT_INSPECTOR_HH_
#define _GAZEBO_GUI_JOINT_INSPECTOR_HH_
#include <memory>
#include <string>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Vector3.hh>
#include "gazebo/gui/qt.h"
#include "gazebo/msgs/msgs.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class JointMaker;
// Forward declare private data.
class JointInspectorPrivate;
class GZ_GUI_VISIBLE JointInspector : public QDialog
{
Q_OBJECT
public: JointInspector(JointMaker *_jointMaker, QWidget *_parent = 0);
public: ~JointInspector();
public: void Update(ConstJointPtr _jointMsg);
public: msgs::Joint *Data() const;
public: void SetPose(const ignition::math::Pose3d &_pose);
public: void Open();
public: void SetJointId(const std::string &_id);
protected: virtual void enterEvent(QEvent *_event);
private slots: void OnEnumChanged(const QString &_name,
const QString &_value);
private slots: void OnPoseChanged(const QString &_name,
const ignition::math::Pose3d &_value);
private slots: void OnVector3dChanged(const QString &_name,
const ignition::math::Vector3d &_value);
private slots: void OnStringChanged(const QString &_name,
const std::string &_value);
private: void OnJointTypeChanged(const QString &_value);
private: void OnLinksChanged(const QString &_linkName = "");
private slots: void OnSwap();
private slots: void OnLinkInserted(const std::string &_linkName);
private slots: void OnLinkRemoved(const std::string &_linkName);
Q_SIGNALS: void Applied();
private slots: void OnRemove();
private slots: void OnCancel();
private slots: void OnOK();
private slots: void RestoreOriginalData();
private: void keyPressEvent(QKeyEvent *_event);
private: bool CheckValid();
private: void closeEvent(QCloseEvent *_event);
private: std::unique_ptr<JointInspectorPrivate> dataPtr;
};
}
}
#endif
gazebo::gui::JointInspector::Update
void Update(ConstJointPtr _jointMsg)
Update the joint config widget with a joint msg.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::JointMaker
Handles the creation of joints in the model editor.
Definition: JointMaker.hh:76
system.hh
msgs.hh
gazebo::gui::JointInspector::Applied
void Applied()
Qt signal emitted to indicate that changes should be applied.
gazebo::gui::JointInspector::enterEvent
virtual void enterEvent(QEvent *_event)
Qt event emiited when the mouse enters this widget.
gazebo::gui::JointInspector::SetJointId
void SetJointId(const std::string &_id)
Set the unique id for the joint this inspector is attached to.
gazebo::gui::JointInspector::SetPose
void SetPose(const ignition::math::Pose3d &_pose)
Set the pose of the joint.
gazebo::gui::JointInspector::JointInspector
JointInspector(JointMaker *_jointMaker, QWidget *_parent=0)
Constructor.
gazebo::gui::JointInspector::Open
void Open()
Open the inspector.
gazebo::gui::JointInspector
A class to inspect and modify joints.
Definition: JointInspector.hh:42
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::JointInspector::~JointInspector
~JointInspector()
Destructor.
gazebo::gui::JointInspector::Data
msgs::Joint * Data() const
Get the msg containing all joint data.