QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RLeaderData.h
Go to the documentation of this file.
1 #ifndef RLEADERDATA_H
2 #define RLEADERDATA_H
3 
4 #include "RDocument.h"
5 #include "RDimLinearData.h"
6 #include "RVector.h"
7 #include "RPolyline.h"
8 
15 class RLeaderData: public REntityData, protected RPolyline {
16  friend class RLeaderEntity;
17 
18 protected:
20 
21 public:
22  RLeaderData();
23  RLeaderData(const RPolyline& polyline, bool arrowHead);
24 
25  virtual RShape* castToShape() {
26  return this;
27  }
28 
29  double getDimasz() const;
30 
31  void setArrowHead(bool on) {
32  arrowHead = on;
33  }
34 
35  bool hasArrowHead() const {
36  return arrowHead;
37  }
38 
39  RVector getEndPoint() const {
40  return RPolyline::getEndPoint();
41  }
42 
44  return RPolyline::getStartPoint();
45  }
46 
47  void appendVertex(const RVector& vertex) {
49  }
50 
51  virtual QList<RVector> getReferencePoints(
53 
54  virtual bool moveReferencePoint(const RVector& referencePoint,
55  const RVector& targetPoint);
56 
57  QList<QSharedPointer<RShape> > getExploded() const {
58  return RPolyline::getExploded();
59  }
60 
61  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX) const {
62  Q_UNUSED(queryBox)
63 
64  return QList<QSharedPointer<RShape> >()
65  << QSharedPointer<RShape>(new RPolyline(*this))
66  << QSharedPointer<RShape>(new RTriangle(getArrowShape()));
67  }
68 
69  RTriangle getArrowShape() const;
70 
71 private:
73  bool arrowHead;
74 };
75 
77 Q_DECLARE_METATYPE(QSharedPointer<RLeaderData>)
78 
79 #endif