![]() |
QCAD
Open Source 2D CAD
|
Abstract base class for all grid and object snap implementations. More...
#include <RSnap.h>
Public Types | |
enum | Status { Unknown = 0 , Free = 1 , Grid = 2 , Endpoint = 3 , OnEntity = 4 , Center = 5 , Middle = 6 , Distance = 7 , Intersection = 8 , IntersectionManual = 9 , Reference = 10 , Perpendicular = 11 , Tangential = 12 , Coordinate = 13 , CoordinatePolar = 14 } |
Snap status, returned by snap tools (most importantly auto snap tool) to indicate what snap was used. More... | |
Public Member Functions | |
virtual void | finishEvent () |
QList< RObject::Id > | getEntityIds () |
RVector | getLastSnap () const |
RSnap::Status | getStatus () const |
virtual void | hideUiOptions () |
virtual void | reset () |
RSnap (RSnap::Status s=RSnap::Unknown) | |
void | setLastSnap (const RVector &v) |
void | setStatus (RSnap::Status s) |
virtual void | showUiOptions () |
virtual RVector | snap (const RVector &position, RGraphicsView &view, double range=RNANDOUBLE) |
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. | |
virtual void | suspendEvent () |
~RSnap () | |
Protected Attributes | |
QList< RObject::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 |
RSnap::RSnap | ( | RSnap::Status | s = RSnap::Unknown | ) |
RSnap::~RSnap | ( | ) |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in RSnapCoordinate, RSnapDistanceExtension, and RSnapDistance.
|
inlinevirtual |
Reimplemented in RSnapAuto.
|
inline |
|
inlinevirtual |
Reimplemented in RSnapCoordinate, RSnapDistanceExtension, and RSnapDistance.
|
inlinevirtual |
Reimplemented in RSnapAuto, RSnapEntityBase, RSnapFree, RSnapGrid, and RSnapIntersection.
|
virtual |
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 |