18 #ifndef _LINE_SEGMENT_ITEM_HH_
19 #define _LINE_SEGMENT_ITEM_HH_
49 public:
void SetLine(
const QPointF &_start,
const QPointF &_end);
53 public:
void SetStartPoint(
const QPointF &_start);
57 public:
void SetEndPoint(
const QPointF &_end);
61 public:
int GetIndex()
const;
64 public: QVector3D GetSize()
const;
67 public: QVector3D GetScenePosition()
const;
70 public:
double GetSceneRotation()
const;
74 public:
void SetMouseState(
int _state);
77 public:
int GetMouseState()
const;
81 public:
double GetMouseDownX()
const;
85 public:
double GetMouseDownY()
const;
89 public:
void SetMouseDownX(
double _x);
93 public:
void SetMouseDownY(
double _y);
96 public:
void Update();
101 private: QVariant itemChange(GraphicsItemChange _change,
102 const QVariant &_value);
106 private:
void hoverEnterEvent(QGraphicsSceneHoverEvent *_event);
110 private:
void hoverMoveEvent(QGraphicsSceneHoverEvent *_event);
114 private:
void hoverLeaveEvent(QGraphicsSceneHoverEvent *_event);
118 private:
void mouseMoveEvent(QGraphicsSceneMouseEvent *_event);
122 private:
void mousePressEvent(QGraphicsSceneMouseEvent *_event);
126 private:
void mouseReleaseEvent(QGraphicsSceneMouseEvent *_event);
130 private:
void mousePressEvent(QGraphicsSceneDragDropEvent *_event);
134 private:
void mouseMoveEvent(QGraphicsSceneDragDropEvent *_event);
140 private:
void paint(QPainter *_painter,
141 const QStyleOptionGraphicsItem *_option, QWidget *_widget);
144 private:
void LineChanged();
150 private: QPointF start;
153 private: QPointF end;
156 private:
int mouseButtonState;
159 private:
double mouseDownX;
162 private:
double mouseDownY;
Base class of an item in the editor.
Definition: EditorItem.hh:34
2D line segment.
Definition: LineSegmentItem.hh:35
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48