CCircleShape.h
Go to the documentation of this file.
1 #ifndef iview_CCircleShape_included
2 #define iview_CCircleShape_included
3 
4 
5 #include <iview/CPinShape.h>
6 
7 
8 namespace iview
9 {
10 
11 
12 class CCircleShape: public CPinShape
13 {
14 public:
17 
18  CCircleShape();
19 
20  virtual bool IsEditableRadius() const;
21  virtual void SetEditableRadius(bool editable = true);
22  virtual bool IsCenterVisible() const;
23  virtual void SetCenterVisible(bool state = true);
24 
25  // reimplemented (iview::IMouseActionObserver)
26  virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag);
27  virtual bool OnMouseMove(istd::CIndex2d position);
28 
29  // reimplemented (iview::IVisualizable)
30  virtual void Draw(QPainter& drawContext) const;
31 
32  // reimplemented (imod::IObserver)
33  virtual bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask);
34 
35  // reimplemented (iview::ITouchable)
36  virtual TouchState IsTouched(istd::CIndex2d position) const;
37 
38 protected:
39  // reimplemented (iview::CShapeBase)
40  virtual i2d::CRect CalcBoundingBox() const;
41 
44 
45  enum EditMode
46  {
49  };
50 
52 };
53 
54 
55 } // namespace iview
56 
57 
58 #endif // !iview_CCircleShape_included
59 
60 
virtual bool IsCenterVisible() const
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
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 bool OnMouseMove(istd::CIndex2d position)
It is called, when mouse is moved.
virtual bool IsEditableRadius() const
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
Simple rectangle with integer bounds.
Definition: CRect.h:21
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
virtual void SetEditableRadius(bool editable=true)
CInteractiveShapeBase ShapeBaseClass
Definition: CCircleShape.h:16
virtual void Draw(QPainter &drawContext) const
Draw this shape using draw context.
TouchState
Enumeration for possible shape touch states.
Definition: ITouchable.h:24
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.
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

© 2007-2017 Witold Gantzke and Kirill Lepskiy