18 #ifndef _GAZEBO_GUI_BUILDING_SEGMENTITEM_HH_ 
   19 #define _GAZEBO_GUI_BUILDING_SEGMENTITEM_HH_ 
   36     class SegmentItemPrivate;
 
   56       public: 
void SetLine(
const QPointF &_start, 
const QPointF &_end);
 
   60       public: 
void SetStartPoint(
const QPointF &_start);
 
   64       public: QPointF GetStartPoint() 
const;
 
   68       public: 
void SetEndPoint(
const QPointF &_end);
 
   72       public: QPointF GetEndPoint() 
const;
 
   76       public: 
void SetThickness(
double _thickness);
 
   80       public: 
double GetThickness() 
const;
 
   84       public: 
double GetScale() 
const;
 
   88       public: 
void SetScale(
double _scale);
 
   92       public: 
void SetColor(QColor _color);
 
   96       public: 
void ShowHandles(
bool _show);
 
   99       public: 
void SegmentChanged();
 
  102       public: QVector3D GetSize() 
const;
 
  105       public: QVector3D GetScenePosition() 
const;
 
  108       public: 
double GetSceneRotation() 
const;
 
  112       public: std::vector<GrabberHandle *>Grabbers() 
const;
 
  115       protected: 
virtual void SegmentUpdated();
 
  120       protected: 
void UpdateLinkedGrabbers(
GrabberHandle *_grabber,
 
  121           const QPointF &_pos);
 
  127       private: 
bool sceneEventFilter(QGraphicsItem *watched,
 
  139       private: 
void hoverEnterEvent(QGraphicsSceneHoverEvent *_event);
 
  143       private: 
void hoverMoveEvent(QGraphicsSceneHoverEvent *_event);
 
  147       private: 
void hoverLeaveEvent(QGraphicsSceneHoverEvent *_event);
 
  151       private: 
void mouseMoveEvent(QGraphicsSceneMouseEvent *_event);
 
  155       private: 
void mousePressEvent(QGraphicsSceneMouseEvent *_event);
 
  159       private: 
void mouseReleaseEvent(QGraphicsSceneMouseEvent *_event);
 
  165       private: 
void paint(QPainter *_painter,
 
  166           const QStyleOptionGraphicsItem *_option, QWidget *_widget);
 
  180       private: std::unique_ptr<SegmentItemPrivate> dataPtr;
 
Base class of an item in the editor. 
Definition: EditorItem.hh:40
 
#define GZ_GUI_VISIBLE
Definition: system.hh:284
 
static const double SnapLength
Length to snap in meters. 
Definition: SegmentItem.hh:172
 
2D line segment. 
Definition: SegmentItem.hh:43
 
std::vector< GrabberHandle * > grabbers
A list of grabber handles for this item. 
Definition: SegmentItem.hh:176
 
static const double SnapAngle
Angle to snap in degrees. 
Definition: SegmentItem.hh:169
 
Definition: GrabberHandle.hh:42