QCAD
Open Source 2D CAD
RSnapDistance.h
Go to the documentation of this file.
1 
20 #ifndef RSNAPDISTANCE_H
21 #define RSNAPDISTANCE_H
22 
23 #include "snap_global.h"
24 
25 #include "REntity.h"
26 #include "RSnapEntityBase.h"
27 
28 class RGraphicsView;
29 class RMouseEvent;
30 
40 public:
41  RSnapDistance();
42  virtual ~RSnapDistance() {}
43 
44  virtual void showUiOptions();
45  virtual void hideUiOptions();
46  virtual void setDistance(double d);
47 
48 protected:
49  virtual QList<RVector> snapEntity(
50  QSharedPointer<REntity> entity,
51  const RVector& point,
52  const RBox& queryBox,
53  RGraphicsView& view);
54 
55 private:
56  double distance;
57 };
58 
60 
61 #endif
virtual void showUiOptions()
Definition: RSnap.h:88
Represents a box e.g.
Definition: RBox.h:43
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
double distance
Definition: RSnapDistance.h:56
Base class for entity based snap classes.
Definition: RSnapEntityBase.h:37
virtual QList< RVector > snapEntity(QSharedPointer< REntity > entity, const RVector &point, const RBox &queryBox, RGraphicsView &view)=0
virtual void hideUiOptions()
Definition: RSnap.h:89
Q_DECLARE_METATYPE(RMath *)
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
virtual ~RSnapDistance()
Definition: RSnapDistance.h:42
Distance snapper implementation.
Definition: RSnapDistance.h:39
#define QCADSNAP_EXPORT
Definition: snap_global.h:10
Graphics view.
Definition: RGraphicsView.h:58