QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RSnapEntityBase.h
Go to the documentation of this file.
1 #ifndef RSNAPENTITYBASE_H
2 #define RSNAPENTITYBASE_H
3 
4 #include "RSnap.h"
5 #include "RGraphicsView.h"
6 
7 class RMouseEvent;
8 
16 class RSnapEntityBase : public RSnap {
17 public:
18  virtual ~RSnapEntityBase() {}
19 
20  virtual RVector snap(
21  const RVector& position,
22  RGraphicsView& view,
23  double range=RNANDOUBLE);
24 
25  virtual RVector snap(
26  const RVector& position,
27  RGraphicsView& view,
28  const QSet<REntity::Id>& candidates,
29  const RBox& queryBox);
30 
31 protected:
32  virtual QList<RVector> snapEntity(
33  QSharedPointer<REntity> entity,
34  const RVector& point,
35  const RBox& queryBox,
36  RGraphicsView& view) = 0;
37 };
38 
40 
41 #endif