##

LinkInspector.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_MODEL_LINKINSPECTOR_HH_
#define GAZEBO_GUI_MODEL_LINKINSPECTOR_HH_
#include <memory>
#include <string>
#include <ignition/math/Vector3.hh>
#include "gazebo/gui/qt.h"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class CollisionConfig;
class LinkConfig;
class VisualConfig;
// Forward declare private data.
class LinkInspectorPrivate;
class GZ_GUI_VISIBLE LinkInspector : public QDialog
{
Q_OBJECT
public: explicit LinkInspector(QWidget *_parent = 0);
public: ~LinkInspector();
public: void SetName(const std::string &_name);
public: std::string Name() const;
public: LinkConfig *GetLinkConfig() const;
public: VisualConfig *GetVisualConfig() const;
public: CollisionConfig *GetCollisionConfig() const;
public: void SetLinkId(const std::string &_id);
public: void Open();
public: void SetShowCollisions(const bool _show);
public: void SetShowVisuals(const bool _show);
public: void SetShowLinkFrame(const bool _show);
protected: virtual void enterEvent(QEvent *_event);
private: double ComputeVolume() const;
private: ignition::math::Vector3d ComputeInertia(
const double _mass) const;
// public: void SetName(const std::string &_name);
Q_SIGNALS: void Opened();
Q_SIGNALS: void Applied();
Q_SIGNALS: void Accepted();
Q_SIGNALS: void ShowCollisions(const bool _show);
Q_SIGNALS: void ShowVisuals(const bool _show);
Q_SIGNALS: void ShowLinkFrame(const bool _show);
private slots: void OnRemove();
private slots: void OnShowCollisions(const bool _show);
private slots: void OnShowVisuals(const bool _show);
private slots: void OnShowLinkFrame(const bool _show);
private slots: void OnCancel();
private slots: void OnOK();
private slots: void OnConfigApplied();
private slots: void OnDensityValueChanged(const double _value);
private slots: void OnMassValueChanged(const double _value);
private slots: void OnCollisionChanged(const std::string &_name,
const std::string &_type);
private slots: void RestoreOriginalData();
private: void keyPressEvent(QKeyEvent *_event);
private: void closeEvent(QCloseEvent *_event);
private: std::unique_ptr<LinkInspectorPrivate> dataPtr;
};
}
}
#endif
gazebo::gui::LinkInspector::Name
std::string Name() const
Get the name of the link.
gazebo::gui::LinkInspector::LinkInspector
LinkInspector(QWidget *_parent=0)
Constructor.
gazebo::gui::LinkInspector::Accepted
void Accepted()
Qt signal emitted to indicate that changes should be applied and the inspector closed.
gazebo::gui::LinkInspector::SetName
void SetName(const std::string &_name)
Set the name of the link.
gazebo::gui::LinkInspector::SetShowVisuals
void SetShowVisuals(const bool _show)
Set the state of show visuals button.
gazebo::gui::LinkInspector::Opened
void Opened()
Set the item name.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::LinkInspector::GetLinkConfig
LinkConfig * GetLinkConfig() const
Get configurations of the link.
gazebo::gui::LinkInspector::Open
void Open()
Open the inspector.
system.hh
gazebo::gui::LinkInspector::Applied
void Applied()
Qt signal emitted to indicate that changes should be applied.
gazebo::gui::LinkInspector::ShowLinkFrame
void ShowLinkFrame(const bool _show)
Qt signal emitted to indicate that link frame should be shown/hidden.
gazebo::gui::LinkInspector::SetShowLinkFrame
void SetShowLinkFrame(const bool _show)
Set the state of show link frame button.
gazebo::gui::LinkInspector::GetVisualConfig
VisualConfig * GetVisualConfig() const
Get visual configurations of the link.
gazebo::gui::LinkInspector::SetShowCollisions
void SetShowCollisions(const bool _show)
Set the state of show collisions button.
gazebo::gui::LinkInspector::enterEvent
virtual void enterEvent(QEvent *_event)
Qt event emiited when the mouse enters this widget.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::CollisionConfig
A tab for configuring collision properties of a link.
Definition: CollisionConfig.hh:77
gazebo::gui::LinkInspector::ShowVisuals
void ShowVisuals(const bool _show)
Qt signal emitted to indicate that all visuals should be shown/hidden.
gazebo::gui::LinkInspector::~LinkInspector
~LinkInspector()
Destructor.
gazebo::gui::LinkConfig
A tab for configuring properties of a link.
Definition: LinkConfig.hh:39
gazebo::gui::LinkInspector::ShowCollisions
void ShowCollisions(const bool _show)
Qt signal emitted to indicate that all collisions should be shown/hidden.
gazebo::gui::LinkInspector
Definition: LinkInspector.hh:39
gazebo::gui::LinkInspector::SetLinkId
void SetLinkId(const std::string &_id)
Set the id for this link.
gazebo::gui::LinkInspector::GetCollisionConfig
CollisionConfig * GetCollisionConfig() const
Get collision configurations of the link.
gazebo::gui::VisualConfig
A tab for configuring visual properties of a link.
Definition: VisualConfig.hh:71