CArcShape.h
Go to the documentation of this file.
1 #ifndef iview_CArcShape_included
2 #define iview_CArcShape_included
3 
4 
5 // ACF includes
6 #include <iview/CPinShape.h>
7 
8 
9 namespace iview
10 {
11 
12 
13 class CArcShape: public CPinShape
14 {
15 
16 public:
19 
20  CArcShape();
21 
22  virtual bool IsEditableRadius() const;
23  virtual void SetEditableRadius(bool editable = true);
24  virtual bool IsEditableStartAngle() const;
25  virtual void SetEditableStartAngle(bool editable = true);
26  virtual bool IsEditableAngleWidth() const;
27  virtual void SetEditableAngleWidth(bool editable = true);
28  virtual bool IsCenterVisible() const;
29  virtual void SetCenterVisible(bool state = true);
30 
31  // reimplemented (iview::IMouseActionObserver)
32  virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag);
33  virtual bool OnMouseMove(istd::CIndex2d position);
34 
35  // reimplemented (iview::IVisualizable)
36  virtual void Draw(QPainter& drawContext) const;
37 
38  // reimplemented (imod::IObserver)
39  virtual bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask);
40 
41  // reimplemented (iview::ITouchable)
42  virtual TouchState IsTouched(istd::CIndex2d position) const;
43 
44 protected:
45  // reimplemented (iview::CShapeBase)
46  virtual i2d::CRect CalcBoundingBox() const;
47 
52 
53  enum EditMode
54  {
59  };
60 
62 };
63 
64 
65 } // namespace iview
66 
67 
68 #endif // !iview_CArcShape_included
virtual bool IsCenterVisible() const
virtual bool IsEditableRadius() const
virtual void SetEditableRadius(bool editable=true)
virtual void Draw(QPainter &drawContext) const
Draw this shape using draw context.
bool m_isEditableAngleWidth
Definition: CArcShape.h:51
Simple rectangle with integer bounds.
Definition: CRect.h:21
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
bool m_isEditableRadius
Definition: CArcShape.h:48
virtual bool OnMouseMove(istd::CIndex2d position)
It is called, when mouse is moved.
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.
CPinShape BaseClass
Definition: CArcShape.h:17
bool m_isCenterVisible
Definition: CArcShape.h:49
virtual bool IsEditableStartAngle() const
CInteractiveShapeBase ShapeBaseClass
Definition: CArcShape.h:18
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
virtual void SetEditableAngleWidth(bool editable=true)
virtual void SetCenterVisible(bool state=true)
virtual bool IsEditableAngleWidth() const
TouchState
Enumeration for possible shape touch states.
Definition: ITouchable.h:24
virtual bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
This call back function will be called, if an observable object is about to be attached.
Common interface for model objects, that supports Model/Observer design pattern.
Definition: IModel.h:23
Set of change flags (its IDs).
Definition: IChangeable.h:30
bool m_isEditableStartAngle
Definition: CArcShape.h:50
virtual void SetEditableStartAngle(bool editable=true)

© 2007-2017 Witold Gantzke and Kirill Lepskiy