QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPointData.h
Go to the documentation of this file.
1 
20 #ifndef RPOINTDATA_H
21 #define RPOINTDATA_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 "RLine.h"
31 
39 class QCADENTITY_EXPORT RPointData: public REntityData, protected RPoint {
40 
41  friend class RPointEntity;
42 
43 protected:
45 
46 public:
47  RPointData();
48  RPointData(const RVector& point);
49 
50  RVector getPosition() const {
51  return RPoint::getPosition();
52  }
53 
54  virtual QList<RVector> getReferencePoints(
56 
57  virtual bool moveReferencePoint(const RVector& referencePoint,
58  const RVector& targetPoint);
59 
60  virtual RShape* castToShape() {
61  return this;
62  }
63 
64  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX) const {
65  Q_UNUSED(queryBox)
66 
67  return QList<QSharedPointer<RShape> >() <<
68  QSharedPointer<RShape>(new RPoint(*this));
69  }
70 
71 };
72 
75 Q_DECLARE_METATYPE(QSharedPointer<RPointData>)
76 
77 #endif