CAnnulusShape.h
Go to the documentation of this file.
1 #ifndef iview_CAnnulusShape_included
2 #define iview_CAnnulusShape_included
3 
4 
5 #include <iview/CPinShape.h>
6 
7 
8 namespace iview
9 {
10 
11 
12 class CAnnulusShape: public CPinShape
13 {
14 public:
17 
18  CAnnulusShape();
19 
20  virtual bool IsEditableRadiusInner() const;
21  virtual void SetEditableRadiusInner(bool editable = true);
22  virtual bool IsEditableRadiusOuter() const;
23  virtual void SetEditableRadiusOuter(bool editable = true);
24 
25  virtual bool IsEditableRadius() const;
26  virtual void SetEditableRadius(bool editable = true);
27 
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 
49 
52 
53  enum EditMode
54  {
58  };
59 
61 };
62 
63 
64 } // namespace iview
65 
66 
67 #endif // !iview_CAnnulusShape_included
68 
69 
70 
virtual bool OnMouseMove(istd::CIndex2d position)
It is called, when mouse is moved.
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual void SetEditableRadiusOuter(bool editable=true)
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
virtual void Draw(QPainter &drawContext) const
Draw this shape using draw context.
Simple rectangle with integer bounds.
Definition: CRect.h:21
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
virtual bool IsEditableRadiusOuter() const
virtual void SetEditableRadius(bool editable=true)
virtual void SetCenterVisible(bool state=true)
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.
virtual bool IsEditableRadius() const
TouchState
Enumeration for possible shape touch states.
Definition: ITouchable.h:24
CInteractiveShapeBase ShapeBaseClass
Definition: CAnnulusShape.h:16
virtual void SetEditableRadiusInner(bool editable=true)
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.
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
virtual bool IsCenterVisible() const
virtual bool IsEditableRadiusInner() const

© 2007-2017 Witold Gantzke and Kirill Lepskiy