QCAD
Open Source 2D CAD
|
Abstract base class for all grid and object snap implementations. More...
#include <RSnap.h>
Public Types | |
enum | Status { Unknown, Free, Grid, Endpoint, OnEntity, Center, Middle, Distance, Intersection, IntersectionManual, Reference, Perpendicular, Tangential, Coordinate, CoordinatePolar } |
Snap status, returned by snap tools (most importantly auto snap tool) to indicate what snap was used. More... | |
Public Member Functions | |
virtual void | finishEvent () |
QSet< REntity::Id > | getEntityIds () |
RVector | getLastSnap () const |
RSnap::Status | getStatus () const |
virtual void | hideUiOptions () |
void | reset () |
RSnap (RSnap::Status s=RSnap::Unknown) | |
virtual void | showUiOptions () |
virtual RVector | snap (const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)=0 |
virtual RVector | snap (RMouseEvent &event) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual void | suspendEvent () |
virtual | ~RSnap () |
Protected Attributes | |
QSet< REntity::Id > | entityIds |
RVector | lastSnap |
RSnap::Status | status |
Abstract base class for all grid and object snap implementations.
A snap class implements an object or grid snap tool. For example to snap to end points of objects.
enum RSnap::Status |
Snap status, returned by snap tools (most importantly auto snap tool) to indicate what snap was used.
Enumerator | |
---|---|
Unknown | |
Free | |
Grid | |
Endpoint | |
OnEntity | |
Center | |
Middle | |
Distance | |
Intersection | |
IntersectionManual | |
Reference | |
Perpendicular | |
Tangential | |
Coordinate | |
CoordinatePolar |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in RSnapDistance, RSnapCoordinate, and RSnapDistanceExtension.
|
inline |
|
inlinevirtual |
Reimplemented in RSnapDistance, RSnapCoordinate, and RSnapDistanceExtension.
|
pure virtual |
Implemented in RSnapIntersection, RSnapAuto, RSnapEntityBase, RSnapFree, and RSnapGrid.
|
inlinevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinevirtual |
|
protected |
|
protected |
|
protected |