18#ifndef GAZEBO_GUI_BUILDING_EDITORITEM_HH_
19#define GAZEBO_GUI_BUILDING_EDITORITEM_HH_
23#include <ignition/math/Color.hh>
24#include <ignition/math/Vector3.hh>
35 class EditorItemPrivate;
54 public:
virtual ignition::math::Vector3d
Size()
const;
70 public:
virtual std::string
Name()
const;
81 public:
virtual ignition::math::Color
Color3d()
const;
89 public:
virtual void SetName(
const std::string &_name);
102 public:
void SetColor3d(
const ignition::math::Color &_color);
128 Q_SIGNALS:
void SizeChanged(
const double _width,
const double _depth,
129 const double _height);
139 const double _z,
const double _roll,
const double _pitch,
150 const double _z,
const double _roll,
const double _pitch,
223 private slots:
void OnColorChanged(
const ignition::math::Color &_color);
227 private slots:
void OnTextureChanged(
const std::string &_texture);
266 private: std::unique_ptr<EditorItemPrivate> dataPtr;
gui
Definition KeyEventHandler.hh:29
Base class of an item in the editor.
Definition EditorItem.hh:43
void YawChanged(const double _yaw)
Qt signal emitted when the editor item yaw rotation has changed.
int Level() const
Get the level in which this building item is located.
virtual double SceneRotation() const
Get the scene rotation of the editor item.
virtual void SetHighlighted(const bool _highlighted)
Set whether this item should be highlighted or not.
virtual ignition::math::Vector3d ScenePosition() const
Get the scene position of editor item.
void SetColor3d(const ignition::math::Color &_color)
Set the associated 3D visual's color.
void SetLevel(const int _level)
Set the level of this building item.
ignition::math::Color visual3dColor
Color of the associated 3D visual.
Definition EditorItem.hh:249
void PoseOriginTransformed(const double _x, const double _y, const double _z, const double _roll, const double _pitch, const double _yaw)
Qt signal emitted when the editor item pose origin has changed.
virtual std::string ItemType() const
Get the type of the editor item.
double LevelBaseHeight() const
Get the base height of this level relative to the ground plane.
float visual3dTransparency
Transparency of the associated 3D visual.
Definition EditorItem.hh:255
double levelBaseHeight
Vertical distance from the building's base to the base of the level this editor is in.
Definition EditorItem.hh:246
void LevelChanged(const int _level)
Qt signal emitted when the editor item's level has changed.
void SetLevelBaseHeight(const double _height)
Set the base height of this level relative to the ground plane.
void TransparencyChanged(const float _transparency)
Qt signal emitted when the editor item's 3D transparency has changed.
void WidthChanged(const double _width)
Qt signal emitted when the editor item width has changed.
virtual void SetName(const std::string &_name)
Set the name of this editor item.
virtual std::string Texture3d() const
Get the associated 3D visual's texture.
void RotationChanged(const double _roll, const double _pitch, const double _yaw)
Qt signal emitted when the editor item rotation has changed.
void PosYChanged(const double _posY)
Qt signal emitted when the editor item's Y position has changed.
int zValueIdle
Z ordering of the rect item when idle (unselected.)
Definition EditorItem.hh:230
void ItemDeleted()
Qt signal emitted when the editor item is being deleted.
void ColorChanged(const ignition::math::Color &_color)
Qt signal emitted when the editor item's 3D color has changed.
double itemScale
Scale for converting from pixel to metric units.
Definition EditorItem.hh:262
void PositionChanged(const double _x, const double _y, const double _z)
Qt signal emitted when the editor item position has changed.
int ZValueIdle() const
Get the z value of this item when in idle state.
int ZValueSelected() const
Get the z value of this item when in selected state.
std::string name
Name of editor item.
Definition EditorItem.hh:239
virtual ignition::math::Color Color3d() const
Get the associated 3D visual's color.
void PoseChanged(const double _x, const double _y, const double _z, const double _roll, const double _pitch, const double _yaw)
Qt signal emitted when the editor item pose has changed.
virtual std::string Name() const
Get the name of the editor item.
void PosXChanged(const double _posX)
Qt signal emitted when the editor item's X position has changed.
void Set3dTransparency(const float _transparency)
Set the transparency of the associated 3D visual.
void DepthChanged(const double _depth)
Qt signal emitted when the editor item depth has changed.
void SetTexture3d(const std::string &_texture)
Set the associated 3D visual's texture.
int level
Level that this item is on.
Definition EditorItem.hh:242
std::string visual3dTexture
Texture of the associated 3D visual.
Definition EditorItem.hh:252
void PosZChanged(const double _posZ)
Qt signal emitted when the editor item's Z position has changed.
bool highlighted
Flag to indicate whether this item is currently highlighted or not.
Definition EditorItem.hh:259
void TextureChanged(const std::string &_texture)
Qt signal emitted when the editor item's 3D texture has changed.
void SizeChanged(const double _width, const double _depth, const double _height)
Qt signal emitted when the editor item size has changed.
virtual ignition::math::Vector3d Size() const
Get the size of the item in pixels.
std::string editorType
Type of editor item.
Definition EditorItem.hh:236
int zValueSelected
Z ordering of the rect item when selected.
Definition EditorItem.hh:233
void HeightChanged(const double _height)
Qt signal emitted when the editor item height has changed.
Forward declarations for the common classes.
Definition Animation.hh:27