QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RDimAngularData.h
Go to the documentation of this file.
1 
20 #ifndef RDimAngularDataDATA_H
21 #define RDimAngularDataDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RArc.h"
26 #include "RDocument.h"
27 #include "RDimensionData.h"
28 #include "RLine.h"
29 #include "RVector.h"
30 
38  friend class RDimAngularEntity;
39 
40 protected:
42 
43 public:
45  RDimAngularData(const RDimensionData& dimData,
46  const RVector& extensionLine1Start,
47  const RVector& extensionLine1End,
48  const RVector& extensionLine2Start,
49  const RVector& dimArcPosition);
50 
51  virtual bool isValid() const;
52 
54  extensionLine1Start = p;
55  }
56 
58  return extensionLine1Start;
59  }
60 
61  void setExtensionLine1End(const RVector& p) {
62  extensionLine1End = p;
63  }
64 
66  return extensionLine1End;
67  }
68 
70  extensionLine2Start = p;
71  }
72 
74  return extensionLine2Start;
75  }
76 
77  void setExtensionLine2End(const RVector& p) {
79  }
80 
82  return getDefinitionPoint();
83  }
84 
85  void setDimArcPosition(const RVector& p) {
86  dimArcPosition = p;
87  }
88 
90  return dimArcPosition;
91  }
92 
93  virtual QList<RVector> getReferencePoints(
95 
96  virtual bool moveReferencePoint(const RVector& referencePoint,
97  const RVector& targetPoint);
98 
99  virtual bool move(const RVector& offset);
100  virtual bool rotate(double rotation, const RVector& center);
101  virtual bool scale(const RVector& scaleFactors, const RVector& center);
102  virtual bool mirror(const RLine& axis);
103 
104  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX) const;
105  double getAngle() const;
106  bool getAngles(double& ang1, double& ang2,
107  bool& reversed,
108  RVector& p1, RVector& p2) const;
109  RVector getCenter() const;
110  virtual double getMeasuredValue() const;
111  virtual QString getAutoLabel() const;
112 
113 private:
122 };
123 
126 Q_DECLARE_METATYPE(QSharedPointer<RDimAngularData>)
127 
128 #endif