QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RDimRotatedData.h
Go to the documentation of this file.
1 
20 #ifndef RDIMROTATEDDATA_H
21 #define RDIMROTATEDDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RDocument.h"
26 #include "RDimLinearData.h"
27 #include "RVector.h"
28 
36  friend class RDimRotatedEntity;
37 
38 protected:
40 
41 public:
43  RDimRotatedData(const RDimensionData& dimData,
44  const RVector& extensionPoint1,
45  const RVector& extensionPoint2,
46  double rotation);
47 
48  virtual bool isValid() const;
49 
50  void setRotation(double r) {
51  rotation = r;
52  }
53 
54  double getRotation() const {
55  return rotation;
56  }
57 
58  virtual QList<RVector> getReferencePoints(
60 
61 // virtual bool moveReferencePoint(const RVector& referencePoint,
62 // const RVector& targetPoint);
63 
64  virtual bool rotate(double rotation, const RVector& center);
65  virtual bool mirror(const RLine& axis);
66 
67  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX) const;
68  virtual double getMeasuredValue() const;
69  virtual QString getAutoLabel() const;
70 
71 private:
73  double rotation;
74 };
75 
78 Q_DECLARE_METATYPE(QSharedPointer<RDimRotatedData>)
79 
80 #endif