QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RSnapEntityBase.h
Go to the documentation of this file.
1 
20 #ifndef RSNAPENTITYBASE_H
21 #define RSNAPENTITYBASE_H
22 
23 #include "snap_global.h"
24 
25 #include "RSnap.h"
26 #include "RGraphicsView.h"
27 
28 class RMouseEvent;
29 
38 public:
39  virtual ~RSnapEntityBase() {}
40 
41  virtual RVector snap(
42  const RVector& position,
43  RGraphicsView& view,
44  double range=RNANDOUBLE);
45 
46  virtual RVector snap(
47  const RVector& position,
48  RGraphicsView& view,
49  const QSet<REntity::Id>& candidates,
50  const RBox& queryBox);
51 
52 protected:
53  virtual QList<RVector> snapEntity(
54  QSharedPointer<REntity> entity,
55  const RVector& point,
56  const RBox& queryBox,
57  RGraphicsView& view) = 0;
58 };
59 
61 
62 #endif