##

FloorItem Class Reference
GUI

2D representation of a floor. More...

`#include <FloorItem.hh>`

Inherits RectItem.

## Public Types

enum | ResizeFlags { NONE = 0x00, ITEM_WIDTH = 0x01, ITEM_HEIGHT = 0x02 }
| Resize flags used to indicate which dimension can be resized. More...

## 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

| FloorItem ()
| Constructor. More...
| ~FloorItem ()
| Destructor. More...
double | AngleOnWall () const
| Get the angle of this item inside its parent wall. More...
void | AttachWallSegment (WallSegmentItem *_wallSegmentItem)
| Attach walls so the floor can auto expand to hold the wall. More...
virtual ignition::math::Color | Color3d () const
| Get the associated 3D visual's color. More...
void | DetachFromParent ()
| Detach the rect item from its parent. More...
void | FloorChanged ()
| Emit floor changed Qt signals. More...
double | Height () const
| Get the height of the rect item. 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...
double | PositionOnWall () const
| Get the position of this item inside its parent wall. More...
virtual double | Rotation () const
| Get the rotation of the rect 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 | SetAngleOnWall (const double _angleOnWall)
| Set the angle of this item inside its parent wall. More...
void | SetColor3d (const ignition::math::Color &_color)
| Set the associated 3D visual's color. More...
void | SetHeight (const int _height)
| Set the height of the rect item. More...
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...
virtual void | SetPosition (const double _x, const double _y)
| Set the position of the rect item. More...
virtual void | SetPosition (const ignition::math::Vector2d &_pos)
| Set the position of the rect item. More...
void | SetPositionOnWall (const double _positionOnWall)
| Set the position of this item inside its parent wall. More...
virtual void | SetResizeFlag (const unsigned int _flag)
| Set the resize flag of the rect item. More...
virtual void | SetRotation (const double _angle)
| Set the rotation of the rect item. More...
void | SetSize (const ignition::math::Vector2i &_size)
| Set the size of the rect item. More...
void | SetTexture3d (const std::string &_texture)
| Set the associated 3D visual's texture. More...
void | SetWidth (const int _width)
| Set the width of the rect item. More...
void | ShowHandles (const bool _show)
| Show the grabber and rotate handles of the rect item. 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...
double | Width () const
| Get the width of the rect item. 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 Member Functions

virtual QRectF | boundingRect () const
| Get the bounding box of the rect item. More...
void | DrawBoundingBox (QPainter *_painter)
| Draw bounding box. More...
void | UpdateCornerPositions ()
| Helper method for Updating the corner positions of the rect item. More...
void | UpdateMeasures ()
| Update this item's measures. More...

## Protected Attributes

ignition::math::Color | borderColor
| Border color of the rect item. More...
QAction * | deleteItemAct
| Qt action for deleting the item. More...
double | drawingHeight
| Actual height of rect item drawn in pixels. More...
double | drawingOriginX
| X origin of the rect item in pixels. More...
double | drawingOriginY
| Y origin of the rect item in pixels. More...
double | drawingWidth
| Actual width of rect item drawn in pixels. More...
std::string | editorType
| Type of editor item. More...
double | height
| Height of rect item in pixels. 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::vector< MeasureItem * > | measures
| A vector containing this item's measure items. More...
std::string | name
| Name of editor item. More...
QAction * | openInspectorAct
| Qt action for opening the inspector. More...
double | rotationAngle
| Rotation angle of the rect item in degrees. 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...
double | width
| Width of rect item in pixels. 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

2D representation of a floor.

## Member Enumeration Documentation

## ResizeFlags

enum ResizeFlags

inherited

Resize flags used to indicate which dimension can be resized.

Enumerator
NONE | No dimensions.
ITEM_WIDTH | Width.
ITEM_HEIGHT | Height.

## Constructor & Destructor Documentation

## FloorItem()

FloorItem | ( |  | ) |

Constructor.

## ~FloorItem()

~FloorItem | ( |  | ) |

Destructor.

## Member Function Documentation

## AngleOnWall()

double AngleOnWall | ( |  | ) | const

inherited

Get the angle of this item inside its parent wall.

Returns
  Angle on parent wall in degrees.

## AttachWallSegment()

void AttachWallSegment | ( | WallSegmentItem * | _wallSegmentItem | ) |

Attach walls so the floor can auto expand to hold the wall.

Parameters

  [in] | _wallSegmentItem | Wall item to attach to the floor.

## boundingRect()

virtual QRectF boundingRect | ( |  | ) | const

protected virtual inherited

Get the bounding box of the rect item.

Returns
  The bounding box of the rect item.

## Color3d()

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

virtual inherited

Get the associated 3D visual's color.

Returns
  Color of the 3D visual.

## ColorChanged

void ColorChanged | ( | const ignition::math::Color & | _color | ) |

signal inherited

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

Parameters

  [in] | _color | Color.

## DepthChanged

void DepthChanged | ( | const double | _depth | ) |

signal inherited

Qt signal emitted when the editor item depth has changed.

Parameters

  [in] | _depth | Depth of item in pixels.

## DetachFromParent()

void DetachFromParent | ( |  | ) |

inherited

Detach the rect item from its parent.

## DrawBoundingBox()

void DrawBoundingBox | ( | QPainter * | _painter | ) |

protected inherited

Draw bounding box.

Parameters

  [in] | _painter | Qt painter object.

## FloorChanged()

void FloorChanged | ( |  | ) |

Emit floor changed Qt signals.

## Height()

double Height | ( |  | ) | const

inherited

Get the height of the rect item.

Returns
  Height of the rect item in pixels.

## HeightChanged

void HeightChanged | ( | const double | _height | ) |

signal inherited

Qt signal emitted when the editor item height has changed.

Parameters

  [in] | _height | Height of item in pixels.

## ItemDeleted

void ItemDeleted | ( |  | ) |

signal inherited

Qt signal emitted when the editor item is being deleted.

## ItemType()

virtual std::string ItemType | ( |  | ) | const

virtual inherited

Get the type of the editor item.

Returns
  Type of the item.

## Level()

int Level | ( |  | ) | const

inherited

Get the level in which this building item is located.

## LevelBaseHeight()

double LevelBaseHeight | ( |  | ) | const

inherited

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

## LevelChanged

void LevelChanged | ( | const int | _level | ) |

signal inherited

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

Parameters

  [in] | _level | Level.

## Name()

virtual std::string Name | ( |  | ) | const

virtual inherited

Get the name of the editor item.

Returns
  Name of the item.

## PoseChanged

void PoseChanged | ( | const double | _x,
|  | const double | _y,
|  | const double | _z,
|  | const double | _roll,
|  | const double | _pitch,
|  | const double | _yaw
| ) |  |

signal inherited

Qt signal emitted when the editor item pose has changed.

Parameters

  [in] | _x | X position of item in pixels.
  [in] | _y | Y position of item in pixels.
  [in] | _z | Z position of item in pixels.
  [in] | _roll | Roll rotation of item in degrees.
  [in] | _pitch | Pitch rotation of item in degrees.
  [in] | _yaw | Yaw rotation of item in degrees.

## PoseOriginTransformed

void PoseOriginTransformed | ( | const double | _x,
|  | const double | _y,
|  | const double | _z,
|  | const double | _roll,
|  | const double | _pitch,
|  | const double | _yaw
| ) |  |

signal inherited

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

Parameters

  [in] | _x | X position of item in pixels.
  [in] | _y | Y position of item in pixels.
  [in] | _z | Z position of item in pixels.
  [in] | _roll | Roll rotation of item in degrees.
  [in] | _pitch | Pitch rotation of item in degrees.
  [in] | _yaw | Yaw rotation of item in degrees.

## PositionChanged

void PositionChanged | ( | const double | _x,
|  | const double | _y,
|  | const double | _z
| ) |  |

signal inherited

Qt signal emitted when the editor item position has changed.

Parameters

  [in] | _x | X position of item in pixels.
  [in] | _y | Y position of item in pixels.
  [in] | _z | Z position of item in pixels.

## PositionOnWall()

double PositionOnWall | ( |  | ) | const

inherited

Get the position of this item inside its parent wall.

Returns
  Normalized position on parent wall.

## PosXChanged

void PosXChanged | ( | const double | _posX | ) |

signal inherited

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

Parameters

  [in] | _x | X position of item in pixels.

## PosYChanged

void PosYChanged | ( | const double | _posY | ) |

signal inherited

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

Parameters

  [in] | _y | Y position of item in pixels.

## PosZChanged

void PosZChanged | ( | const double | _posZ | ) |

signal inherited

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

Parameters

  [in] | _z | Z position of item in pixels.

## Rotation()

virtual double Rotation | ( |  | ) | const

virtual inherited

Get the rotation of the rect item.

Returns
  Rotation in degrees.

## RotationChanged

void RotationChanged | ( | const double | _roll,
|  | const double | _pitch,
|  | const double | _yaw
| ) |  |

signal inherited

Qt signal emitted when the editor item rotation has changed.

Parameters

  [in] | _roll | Roll rotation of item in degrees.
  [in] | _pitch | Pitch rotation of item in degrees.
  [in] | _yaw | Yaw rotation of item in degrees.

## ScenePosition()

virtual ignition::math::Vector3d ScenePosition | ( |  | ) | const

virtual

Get the scene position of editor item.

Returns
  Scene position in pixel coordinates.

Reimplemented from RectItem.

## SceneRotation()

virtual double SceneRotation | ( |  | ) | const

virtual

Get the scene rotation of the editor item.

Returns
  Scene rotation in degrees.

Reimplemented from RectItem.

## Set3dTransparency()

void Set3dTransparency | ( | const float | _transparency | ) |

inherited

Set the transparency of the associated 3D visual.

Parameters

  [in] | _transparency | Transparency.

## SetAngleOnWall()

void SetAngleOnWall | ( | const double | _angleOnWall | ) |

inherited

Set the angle of this item inside its parent wall.

Parameters

  [in] | _angleOnWall | New angle on wall, either 0 or 180 degrees.

## SetColor3d()

void SetColor3d | ( | const ignition::math::Color & | _color | ) |

inherited

Set the associated 3D visual's color.

Parameters

  [in] | _color | Color.

## SetHeight()

void SetHeight | ( | const int | _height | ) |

inherited

Set the height of the rect item.

Parameters

  [in] | _height | Height of the rect item in pixels.

## SetHighlighted()

void SetHighlighted | ( | const bool | _highlighted | ) |

virtual inherited

Set whether this item should be highlighted or not.

Parameters

  [in] | _highlighted | True for highlighted.

Reimplemented from EditorItem.

## SetLevel()

void SetLevel | ( | const int | _level | ) |

inherited

Set the level of this building item.

Parameters

  [in] | _level | Level number.

## SetLevelBaseHeight()

void SetLevelBaseHeight | ( | const double | _height | ) |

inherited

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

Parameters

  [in] | _height | Base height.

## SetName()

virtual void SetName | ( | const std::string & | _name | ) |

virtual inherited

Set the name of this editor item.

Parameters

  [in] | _name | Name to set the editor item to.

## SetPosition() [1/2]

virtual void SetPosition | ( | const double | _x,
|  | const double | _y
| ) |  |

virtual inherited

Set the position of the rect item.

Parameters

  [in] | _x | X position in pixel coordinates.
  [in] | _y | Y position in pixel coordinates.

## SetPosition() [2/2]

virtual void SetPosition | ( | const ignition::math::Vector2d & | _pos | ) |

virtual inherited

Set the position of the rect item.

Parameters

  [in] | _pos | Position in pixel coordinates.

## SetPositionOnWall()

void SetPositionOnWall | ( | const double | _positionOnWall | ) |

inherited

Set the position of this item inside its parent wall.

Parameters

  [in] | _positionOnWall | New normalized position on wall.

## SetResizeFlag()

virtual void SetResizeFlag | ( | const unsigned int | _flag | ) |

virtual inherited

Set the resize flag of the rect item.

Parameters

  [in] | _flag | Resize flag which controls how the item can be resized.

## SetRotation()

virtual void SetRotation | ( | const double | _angle | ) |

virtual inherited

Set the rotation of the rect item.

Parameters

  [in] | _angle | Rotation angle in degrees.

## SetSize()

void SetSize | ( | const ignition::math::Vector2i & | _size | ) |

inherited

Set the size of the rect item.

Parameters

  [in] | _size | Size of the rect item in pixels.

## SetTexture3d()

void SetTexture3d | ( | const std::string & | _texture | ) |

inherited

Set the associated 3D visual's texture.

Parameters

  [in] | _texture | Texture.

## SetWidth()

void SetWidth | ( | const int | _width | ) |

inherited

Set the width of the rect item.

Parameters

  [in] | _width | Width of the rect item in pixels.

## ShowHandles()

void ShowHandles | ( | const bool | _show | ) |

inherited

Show the grabber and rotate handles of the rect item.

Parameters

  [in] | _show | True to draw the handles, and false to hide them.

## Size()

virtual ignition::math::Vector3d Size | ( |  | ) | const

virtual

Get the size of the item in pixels.

Returns
  Size in pixels.

Reimplemented from RectItem.

## SizeChanged

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

signal inherited

Qt signal emitted when the editor item size has changed.

Parameters

  [in] | _width | Width of item in pixels.
  [in] | _depth | Depth of item in pixels.
  [in] | _height | Height of item in pixels.

## Texture3d()

virtual std::string Texture3d | ( |  | ) | const

virtual inherited

Get the associated 3D visual's texture.

Returns
  Texture of the 3D visual.

## TextureChanged

void TextureChanged | ( | const std::string & | _texture | ) |

signal inherited

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

Parameters

  [in] | _texture | Texture.

## TransparencyChanged

void TransparencyChanged | ( | const float | _transparency | ) |

signal inherited

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

Parameters

  [in] | _transparency | Transparency.

## UpdateCornerPositions()

void UpdateCornerPositions | ( |  | ) |

protected inherited

Helper method for Updating the corner positions of the rect item.

## UpdateMeasures()

void UpdateMeasures | ( |  | ) |

protected inherited

Update this item's measures.

## Width()

double Width | ( |  | ) | const

inherited

Get the width of the rect item.

Returns
  Width of the rect item in pixels.

## WidthChanged

void WidthChanged | ( | const double | _width | ) |

signal inherited

Qt signal emitted when the editor item width has changed.

Parameters

  [in] | _width | Width of item in pixels.

## YawChanged

void YawChanged | ( | const double | _yaw | ) |

signal inherited

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

Parameters

  [in] | _yaw | Yaw rotation of item in degrees.

## ZValueIdle()

int ZValueIdle | ( |  | ) | const

inherited

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

Returns
  Z value.

## ZValueSelected()

int ZValueSelected | ( |  | ) | const

inherited

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

Returns
  Z value.

## Member Data Documentation

## borderColor

ignition::math::Color borderColor

protected inherited

Border color of the rect item.

## deleteItemAct

QAction* deleteItemAct

protected inherited

Qt action for deleting the item.

## drawingHeight

double drawingHeight

protected inherited

Actual height of rect item drawn in pixels.

## drawingOriginX

double drawingOriginX

protected inherited

X origin of the rect item in pixels.

## drawingOriginY

double drawingOriginY

protected inherited

Y origin of the rect item in pixels.

## drawingWidth

double drawingWidth

protected inherited

Actual width of rect item drawn in pixels.

## editorType

std::string editorType

protected inherited

Type of editor item.

## height

double height

protected inherited

Height of rect item in pixels.

## highlighted

bool highlighted

protected inherited

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

## itemScale

double itemScale

protected inherited

Scale for converting from pixel to metric units.

## level

int level

protected inherited

Level that this item is on.

## levelBaseHeight

double levelBaseHeight

protected inherited

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

## measures

std::vector<MeasureItem *> measures

protected inherited

A vector containing this item's measure items.

Currently only used for windows and doors, containing one measure towards each end of this item's parent wall.

## name

std::string name

protected inherited

Name of editor item.

## openInspectorAct

QAction* openInspectorAct

protected inherited

Qt action for opening the inspector.

## rotationAngle

double rotationAngle

protected inherited

Rotation angle of the rect item in degrees.

## visual3dColor

ignition::math::Color visual3dColor

protected inherited

Color of the associated 3D visual.

## visual3dTexture

std::string visual3dTexture

protected inherited

Texture of the associated 3D visual.

## visual3dTransparency

float visual3dTransparency

protected inherited

Transparency of the associated 3D visual.

## width

double width

protected inherited

Width of rect item in pixels.

## zValueIdle

int zValueIdle

protected inherited

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

## zValueSelected

int zValueSelected

protected inherited

Z ordering of the rect item when selected.

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

- FloorItem.hh