QCAD
Open Source 2D CAD
RSnapFree.h
Go to the documentation of this file.
1 
20 #ifndef RSNAPFREE_H
21 #define RSNAPFREE_H
22 
23 #include "snap_global.h"
24 
25 #include "RSnap.h"
26 
27 class RGraphicsView;
28 class RMouseEvent;
29 
38 public:
39  RSnapFree() : RSnap(RSnap::Free) {}
40  virtual ~RSnapFree() {}
41 
42  virtual RVector snap(
43  const RVector& position,
44  RGraphicsView& view,
45  double range=RNANDOUBLE
46  );
47 };
48 
50 
51 #endif
Abstract base class for all grid and object snap implementations.
Definition: RSnap.h:44
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
RSnapFree()
Definition: RSnapFree.h:39
#define RNANDOUBLE
Definition: RMath.h:71
virtual ~RSnapFree()
Definition: RSnapFree.h:40
Q_DECLARE_METATYPE(RMath *)
Free snapper implementation.
Definition: RSnapFree.h:37
virtual RVector snap(const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)=0
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
#define QCADSNAP_EXPORT
Definition: snap_global.h:10
Graphics view.
Definition: RGraphicsView.h:58