QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RDirected.h
Go to the documentation of this file.
1 
20 #ifndef RDIRECTED_H
21 #define RDIRECTED_H
22 
23 #include "../core_global.h"
24 
25 #include <QSharedPointer>
26 
27 #include "RShape.h"
28 
37 public:
38  virtual ~RDirected() {}
39 
40  virtual double getDirection1() const = 0;
41  virtual double getDirection2() const = 0;
42 
43  virtual RVector getStartPoint() const = 0;
44  virtual RVector getEndPoint() const = 0;
45 
46  virtual bool reverse() = 0;
47 
48  virtual void trimStartPoint(const RVector& p) = 0;
49  virtual void trimEndPoint(const RVector& p) = 0;
50 
55  virtual RS::Ending getTrimEnd(const RVector& coord, const RVector& trimPoint) = 0;
56 
61  virtual double getDistanceFromStart(const RVector& p) const {
62  Q_UNUSED(p)
63  return RMAXDOUBLE;
64  }
65 };
66 
69 Q_DECLARE_METATYPE(QSharedPointer<RDirected>)
70 Q_DECLARE_METATYPE(QSharedPointer<RDirected>*)
71 
72 #endif