CTubePolylineShape.h
Go to the documentation of this file.
1 #ifndef iview_CTubePolylineShape_included
2 #define iview_CTubePolylineShape_included
3 
4 
5 #include <iview/CPolylineShape.h>
6 
7 
8 namespace iview
9 {
10 
11 
16 {
17 public:
20 
22 
27  virtual bool IsOrientationVisible() const;
28 
33  virtual void SetOrientationVisible(bool state = true);
34 
39  virtual bool IsAlwaysMovable() const;
40 
45  virtual void SetAlwaysMovable(bool state = true);
46 
47  // reimplemented (iview::CShapeBase)
48  virtual i2d::CRect CalcBoundingBox() const;
49 
50  // reimplemented (iview::IMouseActionObserver)
51  virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag);
52  virtual bool OnMouseMove(istd::CIndex2d position);
53 
54  // reimplemented (iview::ITouchable)
55  virtual TouchState IsTouched(istd::CIndex2d position) const;
56 
57 protected:
58  // reimplemented (iview::CPolygonShape)
59  virtual void DrawCurve(QPainter& drawContext) const;
60  virtual void DrawSelectionElements(QPainter& drawContext) const;
61 
62  // reimplemented (iview::CRectControlledShapeBase)
63  virtual void EnsureValidNodes() const;
64  virtual bool IsCurveTouched(istd::CIndex2d position) const;
65 
66 protected:
67  enum EditMode
68  {
73  };
74 
77 
80 };
81 
82 
83 // inline methods
84 
86 {
88 }
89 
90 
92 {
93  if (m_isOrientationVisible != state){
94  m_isOrientationVisible = state;
95 
96  Invalidate();
97  }
98 }
99 
100 
102 {
103  return m_isAlwaysDraggable;
104 }
105 
106 
108 {
109  m_isAlwaysDraggable = state;
110 }
111 
112 
113 } // namespace qto
114 
115 
116 #endif // !iview_CTubePolylineShape_included
117 
118 
119 
virtual void SetOrientationVisible(bool state=true)
Set the orientation to be visible or not.
iview::CPolylineShape BaseClass
Simple rectangle with integer bounds.
Definition: CRect.h:21
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
virtual bool IsCurveTouched(istd::CIndex2d position) const
virtual bool IsAlwaysMovable() const
Check if in all edit modes is this shape draggable.
virtual void SetAlwaysMovable(bool state=true)
Set flag if in all edit modes is this shape draggable.
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)
It is called, when mouse button is pushed down or up on this object.
virtual void DrawCurve(QPainter &drawContext) const
virtual void EnsureValidNodes() const
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual void DrawSelectionElements(QPainter &drawContext) const
virtual bool OnMouseMove(istd::CIndex2d position)
It is called, when mouse is moved.
TouchState
Enumeration for possible shape touch states.
Definition: ITouchable.h:24
Graphical representation of tube region.
CInteractiveShapeBase ShapeBaseClass
virtual bool IsOrientationVisible() const
Check if orientation of polyline is visible.
virtual void Invalidate()

© 2007-2017 Witold Gantzke and Kirill Lepskiy