EditorItem Class Reference

Base class of an item in the editor. More...

#include <EditorItem.hh>

Inherits QObject.

Inherited by RectItem, and SegmentItem.

Signals

void ColorChanged (const ignition::math::Color &_color)
 Qt signal emitted when the editor item's 3D color has changed. More...
 
void DepthChanged (const double _depth)
 Qt signal emitted when the editor item depth has changed. More...
 
void HeightChanged (const double _height)
 Qt signal emitted when the editor item height has changed. More...
 
void ItemDeleted ()
 Qt signal emitted when the editor item is being deleted. More...
 
void LevelChanged (const int _level)
 Qt signal emitted when the editor item's level has changed. More...
 
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. More...
 
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. More...
 
void PositionChanged (const double _x, const double _y, const double _z)
 Qt signal emitted when the editor item position has changed. More...
 
void PosXChanged (const double _posX)
 Qt signal emitted when the editor item's X position has changed. More...
 
void PosYChanged (const double _posY)
 Qt signal emitted when the editor item's Y position has changed. More...
 
void PosZChanged (const double _posZ)
 Qt signal emitted when the editor item's Z position has changed. More...
 
void RotationChanged (const double _roll, const double _pitch, const double _yaw)
 Qt signal emitted when the editor item rotation has changed. More...
 
void SizeChanged (const double _width, const double _depth, const double _height)
 Qt signal emitted when the editor item size has changed. More...
 
void TextureChanged (const std::string &_texture)
 Qt signal emitted when the editor item's 3D texture has changed. More...
 
void TransparencyChanged (const float _transparency)
 Qt signal emitted when the editor item's 3D transparency has changed. More...
 
void WidthChanged (const double _width)
 Qt signal emitted when the editor item width has changed. More...
 
void YawChanged (const double _yaw)
 Qt signal emitted when the editor item yaw rotation has changed. More...
 

Public Member Functions

 EditorItem ()
 Constructor. More...
 
 ~EditorItem ()
 Destructor. More...
 
virtual ignition::math::Color Color3d () const
 Get the associated 3D visual's color. More...
 
virtual std::string ItemType () const
 Get the type of the editor item. More...
 
int Level () const
 Get the level in which this building item is located. More...
 
double LevelBaseHeight () const
 Get the base height of this level relative to the ground plane. More...
 
virtual std::string Name () const
 Get the name of the editor item. More...
 
virtual ignition::math::Vector3d ScenePosition () const
 Get the scene position of editor item. More...
 
virtual double SceneRotation () const
 Get the scene rotation of the editor item. More...
 
void Set3dTransparency (const float _transparency)
 Set the transparency of the associated 3D visual. More...
 
void SetColor3d (const ignition::math::Color &_color)
 Set the associated 3D visual's color. More...
 
virtual void SetHighlighted (const bool _highlighted)
 Set whether this item should be highlighted or not. More...
 
void SetLevel (const int _level)
 Set the level of this building item. More...
 
void SetLevelBaseHeight (const double _height)
 Set the base height of this level relative to the ground plane. More...
 
virtual void SetName (const std::string &_name)
 Set the name of this editor item. More...
 
void SetTexture3d (const std::string &_texture)
 Set the associated 3D visual's texture. More...
 
virtual ignition::math::Vector3d Size () const
 Get the size of the item in pixels. More...
 
virtual std::string Texture3d () const
 Get the associated 3D visual's texture. More...
 
int ZValueIdle () const
 Get the z value of this item when in idle state. More...
 
int ZValueSelected () const
 Get the z value of this item when in selected state. More...
 

Protected Attributes

std::string editorType
 Type of editor item. More...
 
bool highlighted
 Flag to indicate whether this item is currently highlighted or not. More...
 
double itemScale
 Scale for converting from pixel to metric units. More...
 
int level
 Level that this item is on. More...
 
double levelBaseHeight
 Vertical distance from the building's base to the base of the level this editor is in. More...
 
std::string name
 Name of editor item. More...
 
ignition::math::Color visual3dColor
 Color of the associated 3D visual. More...
 
std::string visual3dTexture
 Texture of the associated 3D visual. More...
 
float visual3dTransparency
 Transparency of the associated 3D visual. More...
 
int zValueIdle
 Z ordering of the rect item when idle (unselected.) More...
 
int zValueSelected
 Z ordering of the rect item when selected. More...
 

Detailed Description

Base class of an item in the editor.

Constructor & Destructor Documentation

Constructor.

~EditorItem ( )

Destructor.

Member Function Documentation

virtual ignition::math::Color Color3d ( ) const
virtual

Get the associated 3D visual's color.

Returns
Color of the 3D visual.
void ColorChanged ( const ignition::math::Color &  _color)
signal

Qt signal emitted when the editor item's 3D color has changed.

Parameters
[in]_colorColor.
void DepthChanged ( const double  _depth)
signal

Qt signal emitted when the editor item depth has changed.

Parameters
[in]_depthDepth of item in pixels.
void HeightChanged ( const double  _height)
signal

Qt signal emitted when the editor item height has changed.

Parameters
[in]_heightHeight of item in pixels.
void ItemDeleted ( )
signal

Qt signal emitted when the editor item is being deleted.

virtual std::string ItemType ( ) const
virtual

Get the type of the editor item.

Returns
Type of the item.
int Level ( ) const

Get the level in which this building item is located.

double LevelBaseHeight ( ) const

Get the base height of this level relative to the ground plane.

void LevelChanged ( const int  _level)
signal

Qt signal emitted when the editor item's level has changed.

Parameters
[in]_levelLevel.
virtual std::string Name ( ) const
virtual

Get the name of the editor item.

Returns
Name of the item.
void PoseChanged ( const double  _x,
const double  _y,
const double  _z,
const double  _roll,
const double  _pitch,
const double  _yaw 
)
signal

Qt signal emitted when the editor item pose has changed.

Parameters
[in]_xX position of item in pixels.
[in]_yY position of item in pixels.
[in]_zZ position of item in pixels.
[in]_rollRoll rotation of item in degrees.
[in]_pitchPitch rotation of item in degrees.
[in]_yawYaw rotation of item in degrees.
void PoseOriginTransformed ( const double  _x,
const double  _y,
const double  _z,
const double  _roll,
const double  _pitch,
const double  _yaw 
)
signal

Qt signal emitted when the editor item pose origin has changed.

Parameters
[in]_xX position of item in pixels.
[in]_yY position of item in pixels.
[in]_zZ position of item in pixels.
[in]_rollRoll rotation of item in degrees.
[in]_pitchPitch rotation of item in degrees.
[in]_yawYaw rotation of item in degrees.
void PositionChanged ( const double  _x,
const double  _y,
const double  _z 
)
signal

Qt signal emitted when the editor item position has changed.

Parameters
[in]_xX position of item in pixels.
[in]_yY position of item in pixels.
[in]_zZ position of item in pixels.
void PosXChanged ( const double  _posX)
signal

Qt signal emitted when the editor item's X position has changed.

Parameters
[in]_xX position of item in pixels.
void PosYChanged ( const double  _posY)
signal

Qt signal emitted when the editor item's Y position has changed.

Parameters
[in]_yY position of item in pixels.
void PosZChanged ( const double  _posZ)
signal

Qt signal emitted when the editor item's Z position has changed.

Parameters
[in]_zZ position of item in pixels.
void RotationChanged ( const double  _roll,
const double  _pitch,
const double  _yaw 
)
signal

Qt signal emitted when the editor item rotation has changed.

Parameters
[in]_rollRoll rotation of item in degrees.
[in]_pitchPitch rotation of item in degrees.
[in]_yawYaw rotation of item in degrees.
virtual ignition::math::Vector3d ScenePosition ( ) const
virtual

Get the scene position of editor item.

Returns
Scene position in pixel coordinates.

Reimplemented in RectItem, SegmentItem, FloorItem, StairsItem, DoorItem, and WindowItem.

virtual double SceneRotation ( ) const
virtual

Get the scene rotation of the editor item.

Returns
Scene rotation in degrees.

Reimplemented in RectItem, SegmentItem, FloorItem, StairsItem, DoorItem, and WindowItem.

void Set3dTransparency ( const float  _transparency)

Set the transparency of the associated 3D visual.

Parameters
[in]_transparencyTransparency.
void SetColor3d ( const ignition::math::Color &  _color)

Set the associated 3D visual's color.

Parameters
[in]_colorColor.
virtual void SetHighlighted ( const bool  _highlighted)
virtual

Set whether this item should be highlighted or not.

Parameters
[in]_highlightedTrue for highlighted.

Reimplemented in RectItem, and WallSegmentItem.

void SetLevel ( const int  _level)

Set the level of this building item.

Parameters
[in]_levelLevel number.
void SetLevelBaseHeight ( const double  _height)

Set the base height of this level relative to the ground plane.

Parameters
[in]_heightBase height.
virtual void SetName ( const std::string &  _name)
virtual

Set the name of this editor item.

Parameters
[in]_nameName to set the editor item to.
void SetTexture3d ( const std::string &  _texture)

Set the associated 3D visual's texture.

Parameters
[in]_textureTexture.
virtual ignition::math::Vector3d Size ( ) const
virtual

Get the size of the item in pixels.

Returns
Size in pixels.

Reimplemented in RectItem, SegmentItem, FloorItem, StairsItem, DoorItem, and WindowItem.

void SizeChanged ( const double  _width,
const double  _depth,
const double  _height 
)
signal

Qt signal emitted when the editor item size has changed.

Parameters
[in]_widthWidth of item in pixels.
[in]_depthDepth of item in pixels.
[in]_heightHeight of item in pixels.
virtual std::string Texture3d ( ) const
virtual

Get the associated 3D visual's texture.

Returns
Texture of the 3D visual.
void TextureChanged ( const std::string &  _texture)
signal

Qt signal emitted when the editor item's 3D texture has changed.

Parameters
[in]_textureTexture.
void TransparencyChanged ( const float  _transparency)
signal

Qt signal emitted when the editor item's 3D transparency has changed.

Parameters
[in]_transparencyTransparency.
void WidthChanged ( const double  _width)
signal

Qt signal emitted when the editor item width has changed.

Parameters
[in]_widthWidth of item in pixels.
void YawChanged ( const double  _yaw)
signal

Qt signal emitted when the editor item yaw rotation has changed.

Parameters
[in]_yawYaw rotation of item in degrees.
int ZValueIdle ( ) const

Get the z value of this item when in idle state.

Returns
Z value.
int ZValueSelected ( ) const

Get the z value of this item when in selected state.

Returns
Z value.

Member Data Documentation

std::string editorType
protected

Type of editor item.

bool highlighted
protected

Flag to indicate whether this item is currently highlighted or not.

double itemScale
protected

Scale for converting from pixel to metric units.

int level
protected

Level that this item is on.

double levelBaseHeight
protected

Vertical distance from the building's base to the base of the level this editor is in.

std::string name
protected

Name of editor item.

ignition::math::Color visual3dColor
protected

Color of the associated 3D visual.

std::string visual3dTexture
protected

Texture of the associated 3D visual.

float visual3dTransparency
protected

Transparency of the associated 3D visual.

int zValueIdle
protected

Z ordering of the rect item when idle (unselected.)

int zValueSelected
protected

Z ordering of the rect item when selected.


The documentation for this class was generated from the following file: