QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RSnapDistance Class Reference

Distance snapper implementation. More...

#include <RSnapDistance.h>

Inheritance diagram for RSnapDistance:
RSnapEntityBase RSnap RSnapDistanceExtension

Public Member Functions

virtual void hideUiOptions ()
 
 RSnapDistance ()
 
virtual void setDistance (double d)
 
virtual void showUiOptions ()
 
virtual ~RSnapDistance ()
 
- Public Member Functions inherited from RSnapEntityBase
 RSnapEntityBase (RSnap::Status s)
 
virtual RVector snap (const RVector &position, RGraphicsView &view, const QSet< RObject::Id > &candidates, const RBox &queryBox)
 
virtual RVector snap (const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
virtual ~RSnapEntityBase ()
 
- Public Member Functions inherited from RSnap
virtual void finishEvent ()
 
QList< RObject::IdgetEntityIds ()
 
RVector getLastSnap () const
 
RSnap::Status getStatus () const
 
virtual void reset ()
 
 RSnap (RSnap::Status s=RSnap::Unknown)
 
void setLastSnap (const RVector &v)
 
void setStatus (RSnap::Status s)
 
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 Member Functions

virtual QList< RVectorsnapEntity (QSharedPointer< REntity > entity, const RVector &point, const RBox &queryBox, RGraphicsView &view, QList< RObject::Id > *subEntityIds=NULL)
 Copyright (c) 2011-2018 by Andrew Mustun.
 

Private Attributes

double distance
 

Additional Inherited Members

- Public Types inherited from RSnap
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...
 
- Protected Attributes inherited from RSnap
QList< RObject::IdentityIds
 
RVector lastSnap
 
RSnap::Status status
 

Detailed Description

Distance snapper implementation.

Scriptable:\nThis class is available in script environments.\n
\generateScriptShell

Constructor & Destructor Documentation

◆ RSnapDistance()

RSnapDistance::RSnapDistance ( )
inline

◆ ~RSnapDistance()

virtual RSnapDistance::~RSnapDistance ( )
inlinevirtual

Member Function Documentation

◆ hideUiOptions()

void RSnapDistance::hideUiOptions ( )
virtual

Reimplemented from RSnap.

Reimplemented in RSnapDistanceExtension.

◆ setDistance()

void RSnapDistance::setDistance ( double d)
virtual

◆ showUiOptions()

void RSnapDistance::showUiOptions ( )
virtual

Reimplemented from RSnap.

Reimplemented in RSnapDistanceExtension.

◆ snapEntity()

QList< RVector > RSnapDistance::snapEntity ( QSharedPointer< REntity > entity,
const RVector & point,
const RBox & queryBox,
RGraphicsView & view,
QList< RObject::Id > * subEntityIds = NULL )
protectedvirtual

Copyright (c) 2011-2018 by Andrew Mustun.

Non-Scriptable:\nThis function is not available in script environments.\n

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

Implements RSnapEntityBase.

Member Data Documentation

◆ distance

double RSnapDistance::distance
private

The documentation for this class was generated from the following files: