QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RLineData.h
Go to the documentation of this file.
1 #ifndef RLINEDATA_H
2 #define RLINEDATA_H
3 
4 #include "RBox.h"
5 #include "RDocument.h"
6 #include "REntity.h"
7 #include "RLine.h"
8 #include "RVector.h"
9 
17 class RLineData: public REntityData, protected RLine {
18 
19  friend class RLineEntity;
20 
21 protected:
23 
24 public:
25  RLineData();
26  RLineData(const RLine& line);
28 
30  return RLine::getStartPoint();
31  }
32  RVector getEndPoint() const {
33  return RLine::getEndPoint();
34  }
35  double getAngle() const {
36  return RLine::getAngle();
37  }
38  double getDirection1() const {
39  return RLine::getDirection1();
40  }
41  double getDirection2() const {
42  return RLine::getDirection2();
43  }
44  bool reverse() {
45  return RLine::reverse();
46  }
47 
48  RS::Ending getTrimEnd(const RVector& coord, const RVector& trimPoint) {
49  return RLine::getTrimEnd(coord, trimPoint);
50  }
51  void trimStartPoint(const RVector& p) {
52  return RLine::trimStartPoint(p);
53  }
54  void trimEndPoint(const RVector& p) {
55  return RLine::trimEndPoint(p);
56  }
57 
58  RS::Side getSideOfPoint(const RVector& point) const {
59  return RLine::getSideOfPoint(point);
60  }
61 
62  virtual QList<RVector> getReferencePoints(
64 
65  virtual bool moveReferencePoint(const RVector& referencePoint,
66  const RVector& targetPoint);
67 
68  virtual RShape* castToShape() {
69  return this;
70  }
71 
72  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX) const {
73  Q_UNUSED(queryBox)
74 
75  return QList<QSharedPointer<RShape> >() <<
76  QSharedPointer<RShape>(new RLine(*this));
77  }
78 
80  return *this;
81  }
82 };
83 
85 Q_DECLARE_METATYPE(QSharedPointer<RLineData>)
86 
87 #endif