CSplineShape.h
Go to the documentation of this file.
1 #ifndef iview_CSplineShape_included
2 #define iview_CSplineShape_included
3 
4 
5 // ACF includes
6 #include <i2d/CVector2d.h>
7 #include <iview/CPolylineShape.h>
8 
9 
10 namespace iview{
11 
12 
14 {
15 public:
17 
18  // reimplemented (imod::IObserver)
19  virtual bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask);
20 
21 protected:
22  virtual void DrawPolyBezier(QPainter& drawContext, const i2d::CVector2d* pointsPtr, int pointsCount) const;
23 
24  // reimplemented (iview::CPolygonShape)
25  virtual i2d::CVector2d GetSegmentMiddle(int index) const;
26  virtual void DrawCurve(QPainter& drawContext) const;
27 
28  // reimplemented (iview::CRectControlledShapeBase)
29  virtual bool IsCurveTouched(istd::CIndex2d position) const;
30 
31  // reimplemented (iview::CShapeBase)
32  virtual i2d::CRect CalcBoundingBox() const;
33 };
34 
35 
36 } // namespace iview
37 
38 
39 #endif // !iview_CSplineShape_included
40 
41 
virtual void DrawPolyBezier(QPainter &drawContext, const i2d::CVector2d *pointsPtr, int pointsCount) const
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.
Simple rectangle with integer bounds.
Definition: CRect.h:21
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
CPolylineShape BaseClass
Definition: CSplineShape.h:16
virtual void DrawCurve(QPainter &drawContext) const
Definition of position or mathematical vector on 2D plane.
Definition: CVector2d.h:28
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
virtual i2d::CVector2d GetSegmentMiddle(int index) const
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 IsCurveTouched(istd::CIndex2d position) const

© 2007-2017 Witold Gantzke and Kirill Lepskiy