##

JointCreationDialog.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_GUI_JOINT_CREATION_DIALOG_HH_
#define _GAZEBO_GUI_JOINT_CREATION_DIALOG_HH_
#include <memory>
#include <string>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Vector3.hh>
#include "gazebo/gui/qt.h"
#include "gazebo/gui/model/JointMaker.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
// Forward declare private data.
class JointCreationDialogPrivate;
class GZ_GUI_VISIBLE JointCreationDialog : public QDialog
{
Q_OBJECT
public: JointCreationDialog(JointMaker *_jointMaker,
QWidget *_parent = 0);
public: ~JointCreationDialog();
public: void Open(const JointMaker::JointType _type);
public: void UpdateRelativePose(const ignition::math::Pose3d &_pose);
private slots: void OnLinkFromDialog();
private slots: void OnVector3dFromDialog(const QString &_name,
const ignition::math::Vector3d &_pose);
private slots: void OnPoseFromDialog(const QString &_name,
const ignition::math::Pose3d &_pose);
private slots: void OnEnumChanged(const QString &_name,
const QString &_value);
private slots: void OnResetAll();
private slots: void OnAlign(const int _int);
private slots: void UncheckAllAlign(const bool _blockSignals = false);
private slots: void OnType(const int _typeInt);
private slots: void OnSwap();
private slots: void OnCancel();
private slots: void OnCreate();
public: void SetParent(const std::string &_linkName);
public: void SetChild(const std::string &_linkName);
private: void CheckLinksValid();
private: bool CheckValid();
private: void OnParentImpl(const std::string &_linkName);
private: void OnChildImpl(const std::string &_linkName);
// Documentation inherited
private: void keyPressEvent(QKeyEvent *_event);
private: std::unique_ptr<JointCreationDialogPrivate> dataPtr;
};
}
}
#endif
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
gazebo::gui::JointMaker::JointType
JointType
Definition: JointMaker.hh:82
gazebo::gui::JointCreationDialog::~JointCreationDialog
~JointCreationDialog()
Destructor.
system.hh
gazebo::gui::JointCreationDialog::UpdateRelativePose
void UpdateRelativePose(const ignition::math::Pose3d &_pose)
Update the relative pose widget.
JointMaker.hh
gazebo::gui::JointCreationDialog::JointCreationDialog
JointCreationDialog(JointMaker *_jointMaker, QWidget *_parent=0)
Constructor.
gazebo::gui::JointCreationDialog
A class to inspect and modify joints.
Definition: JointCreationDialog.hh:41
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::JointCreationDialog::SetChild
void SetChild(const std::string &_linkName)
Event callback when the child link is chosen in the 3D scene.
gazebo::gui::JointCreationDialog::SetParent
void SetParent(const std::string &_linkName)
Event callback when the parent link is chosen in the 3D scene.
gazebo::gui::JointCreationDialog::Open
void Open(const JointMaker::JointType _type)
Open the dialog.