2D line segment. More...
#include <SegmentItem.hh>

Public Member Functions | |
| SegmentItem (QGraphicsItem *_parent=0) | |
| Constructor. More... | |
| ~SegmentItem () | |
| Destructor. More... | |
| QPointF | GetEndPoint () const |
| Get the end point of the segment. More... | |
| double | GetScale () const |
| Get the scale of the segment item. More... | |
| QVector3D | GetScenePosition () const |
| Get the scene position of editor item. More... | |
| double | GetSceneRotation () const |
| Get the scene rotation of the editor item. More... | |
| QVector3D | GetSize () const |
| Get the size of the item in pixels. More... | |
| QPointF | GetStartPoint () const |
| Get the start point of the segment. More... | |
| double | GetThickness () const |
| Get the thickness of the segment item. More... | |
| std::vector< GrabberHandle * > | Grabbers () const |
| Get the grabber handles. More... | |
| void | SegmentChanged () |
| Emit segment changed Qt signals. More... | |
| void | SetColor (QColor _color) |
| Set the color of the segment item. More... | |
| void | SetEndPoint (const QPointF &_end) |
| Set the end point of the segment. More... | |
| void | SetLine (const QPointF &_start, const QPointF &_end) |
| Set the segment's line. More... | |
| void | SetScale (double _scale) |
| Set the scale of the segment item. More... | |
| void | SetStartPoint (const QPointF &_start) |
| Set the start point of the segment. More... | |
| void | SetThickness (double _thickness) |
| Set the thickness of the segment item on the 2d view. More... | |
| void | ShowHandles (bool _show) |
| Show the grabber handles of the segment item. More... | |
Public Member Functions inherited from gazebo::gui::EditorItem | |
| EditorItem () | |
| Constructor. More... | |
| ~EditorItem () | |
| Destructor. More... | |
| virtual QColor | Get3dColor () const |
| Get the associated 3D visual's color. More... | |
| virtual QString | Get3dTexture () const |
| Get the associated 3D visual's texture. More... | |
| int | GetLevel () const |
| Get the level in which this building item is located. More... | |
| double | GetLevelBaseHeight () const |
| Get the base height of this level relative to the ground plane. More... | |
| virtual std::string | GetName () const |
| Get the name of the editor item. More... | |
| virtual std::string | GetType () const |
| Get the type of the editor item. More... | |
| void | Set3dColor (QColor _color) |
| Set the associated 3D visual's color. More... | |
| void | Set3dTexture (QString _texture) |
| Set the associated 3D visual's texture. More... | |
| void | Set3dTransparency (float _transparency) |
| Set the transparency of the associated 3D visual. More... | |
| virtual void | SetHighlighted (bool _highlighted) |
| Set whether this item should be highlighted or not. More... | |
| void | SetLevel (int _level) |
| Set the level of this building item. More... | |
| void | SetLevelBaseHeight (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... | |
| 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... | |
Static Public Attributes | |
| static const double | SnapAngle |
| Angle to snap in degrees. More... | |
| static const double | SnapLength |
| Length to snap in meters. More... | |
Protected Member Functions | |
| virtual void | SegmentUpdated () |
| Update item. More... | |
| void | UpdateLinkedGrabbers (GrabberHandle *_grabber, const QPointF &_pos) |
| Update the position of all grabbers linked to the given one. More... | |
Protected Attributes | |
| std::vector< GrabberHandle * > | grabbers |
| A list of grabber handles for this item. More... | |
Protected Attributes inherited from gazebo::gui::EditorItem | |
| 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... | |
| QColor | visual3dColor |
| Color of the associated 3D visual. More... | |
| QString | 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... | |
Additional Inherited Members | |
Signals inherited from gazebo::gui::EditorItem | |
| void | ColorChanged (QColor _color) |
| Qt signal emitted when the editor item's 3D color has changed. More... | |
| void | DepthChanged (double _depth) |
| Qt signal emitted when the editor item depth has changed. More... | |
| void | HeightChanged (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 (int _level) |
| Qt signal emitted when the editor item's level has changed. More... | |
| void | PoseChanged (double _x, double _y, double _z, double _roll, double _pitch, double _yaw) |
| Qt signal emitted when the editor item pose has changed. More... | |
| void | PoseOriginTransformed (double _x, double _y, double _z, double _roll, double _pitch, double _yaw) |
| Qt signal emitted when the editor item pose origin has changed. More... | |
| void | PositionChanged (double _x, double _y, double _z) |
| Qt signal emitted when the editor item position has changed. More... | |
| void | PosXChanged (double _posX) |
| Qt signal emitted when the editor item's X position has changed. More... | |
| void | PosYChanged (double _posY) |
| Qt signal emitted when the editor item's Y position has changed. More... | |
| void | PosZChanged (double _posZ) |
| Qt signal emitted when the editor item's Z position has changed. More... | |
| void | RotationChanged (double _roll, double _pitch, double _yaw) |
| Qt signal emitted when the editor item rotation has changed. More... | |
| void | SizeChanged (double _width, double _depth, double _height) |
| Qt signal emitted when the editor item size has changed. More... | |
| void | TextureChanged (QString _texture) |
| Qt signal emitted when the editor item's 3D texture has changed. More... | |
| void | TransparencyChanged (float _transparency) |
| Qt signal emitted when the editor item's 3D transparency has changed. More... | |
| void | WidthChanged (double _width) |
| Qt signal emitted when the editor item width has changed. More... | |
| void | YawChanged (double _yaw) |
| Qt signal emitted when the editor item yaw rotation has changed. More... | |
2D line segment.
| gazebo::gui::SegmentItem::SegmentItem | ( | QGraphicsItem * | _parent = 0 | ) |
Constructor.
| [in] | _parent | Parent graphics item. |
| gazebo::gui::SegmentItem::~SegmentItem | ( | ) |
Destructor.
| QPointF gazebo::gui::SegmentItem::GetEndPoint | ( | ) | const |
Get the end point of the segment.
| double gazebo::gui::SegmentItem::GetScale | ( | ) | const |
Get the scale of the segment item.
|
virtual |
Get the scene position of editor item.
Reimplemented from gazebo::gui::EditorItem.
|
virtual |
Get the scene rotation of the editor item.
Reimplemented from gazebo::gui::EditorItem.
|
virtual |
Get the size of the item in pixels.
Reimplemented from gazebo::gui::EditorItem.
| QPointF gazebo::gui::SegmentItem::GetStartPoint | ( | ) | const |
Get the start point of the segment.
| double gazebo::gui::SegmentItem::GetThickness | ( | ) | const |
Get the thickness of the segment item.
| std::vector<GrabberHandle *> gazebo::gui::SegmentItem::Grabbers | ( | ) | const |
Get the grabber handles.
| void gazebo::gui::SegmentItem::SegmentChanged | ( | ) |
Emit segment changed Qt signals.
|
protectedvirtual |
Update item.
Reimplemented in gazebo::gui::WallSegmentItem.
| void gazebo::gui::SegmentItem::SetColor | ( | QColor | _color | ) |
Set the color of the segment item.
| [in] | _color | Color. |
| void gazebo::gui::SegmentItem::SetEndPoint | ( | const QPointF & | _end | ) |
Set the end point of the segment.
| [in] | _end | End point of the segment in pixel coordinates. |
| void gazebo::gui::SegmentItem::SetLine | ( | const QPointF & | _start, |
| const QPointF & | _end | ||
| ) |
Set the segment's line.
| [in] | _start | Start position of the line in pixel coordinates. |
| [in] | _end | End position of the line in pixel coordinates. |
| void gazebo::gui::SegmentItem::SetScale | ( | double | _scale | ) |
Set the scale of the segment item.
param[in] _scale Scale of the segment item in px/m.
| void gazebo::gui::SegmentItem::SetStartPoint | ( | const QPointF & | _start | ) |
Set the start point of the segment.
| [in] | _start | Start point of the segment in pixel coordinates. |
| void gazebo::gui::SegmentItem::SetThickness | ( | double | _thickness | ) |
Set the thickness of the segment item on the 2d view.
| [in] | _thickness | Thickness in pixels. |
| void gazebo::gui::SegmentItem::ShowHandles | ( | bool | _show | ) |
Show the grabber handles of the segment item.
| [in] | _show | True to draw the handles, and false to hide them. |
|
protected |
Update the position of all grabbers linked to the given one.
| [in] | _grabber | Original grabber. |
| [in] | _pos | New position. |
|
protected |
A list of grabber handles for this item.
One grabber for each endpoint.
|
static |
Angle to snap in degrees.
|
static |
Length to snap in meters.