QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RCircleData.h
Go to the documentation of this file.
1 
20 #ifndef RCIRCLEDATA_H
21 #define RCIRCLEDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RBox.h"
26 #include "RDocument.h"
27 #include "REntity.h"
28 #include "RPoint.h"
29 #include "RVector.h"
30 #include "RCircle.h"
31 
40 
41  friend class RCircleEntity;
42 
43 protected:
45 
46 public:
47  RCircleData();
48  RCircleData(const RCircle& circle);
49  RCircleData(const RVector& center, double radius);
50 
52  return *this;
53  }
54 
55  RVector getCenter() const {
56  return RCircle::getCenter();
57  }
58  double getRadius() const {
59  return RCircle::getRadius();
60  }
61 
62  virtual QList<RVector> getReferencePoints(
64  virtual bool moveReferencePoint(const RVector& referencePoint,
65  const RVector& targetPoint);
66 
67  virtual RShape* castToShape() {
68  return this;
69  }
70 
71  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false) const {
72  Q_UNUSED(queryBox)
73 
74  return QList<QSharedPointer<RShape> >() <<
75  QSharedPointer<RShape>(new RCircle(*this));
76  }
77 
78 };
79 
82 Q_DECLARE_METATYPE(QSharedPointer<RCircleData>)
83 
84 #endif