QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RSnapAuto Class Reference

Auto snapper implementation. More...

#include <RSnapAuto.h>

Inheritance diagram for RSnapAuto:
RSnap

List of all members.

Public Member Functions

virtual RVector snap (const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)
virtual ~RSnapAuto ()
- Public Member Functions inherited from RSnap
QSet< REntity::IdgetEntityIds ()
RVector getLastSnap () const
RSnap::Status getStatus () const
virtual void hideUiOptions ()
void reset ()
 RSnap ()
virtual void showUiOptions ()
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 ~RSnap ()

Static Public Member Functions

static void init (bool force=false)

Static Private Attributes

static bool centerPoints = false
static bool endPoints = false
static bool freePositioning = false
static bool gridPoints = false
static bool initialized = false
 Copyright (c) 2011-2013 by Andrew Mustun.
static bool intersections = false
static bool middlePoints = false
static bool perpendicular = false
static bool pointsOnEntity = false
static bool referencePoints = false

Additional Inherited Members

- Public Types inherited from RSnap
enum  Status {
  Unknown, Free, Grid, Endpoint,
  OnEntity, Center, Middle, Distance,
  Intersection, IntersectionManual, Reference, Perpendicular,
  Coordinate, CoordinatePolar
}
 Snap status, returned by snap tools (most importantly auto snap tool) to indicate what snap was used. More...
- Protected Attributes inherited from RSnap
QSet< REntity::IdentityIds
RVector lastSnap
RSnap::Status status

Detailed Description

Auto snapper implementation.

Scriptable:
This class is wrapped for script environments.

Constructor & Destructor Documentation

virtual RSnapAuto::~RSnapAuto ( )
inlinevirtual

Member Function Documentation

void RSnapAuto::init ( bool  force = false)
static
RVector RSnapAuto::snap ( const RVector position,
RGraphicsView view,
double  range = RNANDOUBLE 
)
virtual
Returns:
The snapped position (closest relevant position) for the given mouse position.

Implements RSnap.


Member Data Documentation

bool RSnapAuto::centerPoints = false
staticprivate
bool RSnapAuto::endPoints = false
staticprivate
bool RSnapAuto::freePositioning = false
staticprivate
bool RSnapAuto::gridPoints = false
staticprivate
bool RSnapAuto::initialized = false
staticprivate

Copyright (c) 2011-2013 by Andrew Mustun.

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.

bool RSnapAuto::intersections = false
staticprivate
bool RSnapAuto::middlePoints = false
staticprivate
bool RSnapAuto::perpendicular = false
staticprivate
bool RSnapAuto::pointsOnEntity = false
staticprivate
bool RSnapAuto::referencePoints = false
staticprivate

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