X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.cpp;h=ab95c0ea16fb5a35cf56af5074671b17cf8377b2;hb=baf67656b97e3d61e9223e66ebe4f554e364cd4a;hp=03d1f70eb47565271e7ac94070e29ea0834c2eed;hpb=043ecf4d074909ba2f7f53237962f9eaa72f19c2;p=architektonas diff --git a/src/object.cpp b/src/object.cpp index 03d1f70..ab95c0e 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -24,6 +24,7 @@ QFont * Object::font = 0; int Object::viewportHeight = 0; bool Object::deleteActive = false; bool Object::dimensionActive = false; +bool Object::snapToGrid = true; Object::Object(): position(Vector(0, 0)), parent(0), state(OSInactive), oldState(OSInactive), @@ -81,6 +82,12 @@ Object::~Object() { } +// This returns a pointer to the point passed in, if it coincides. Otherwise returns NULL. +/*virtual*/ Vector * Object::GetPointAt(Vector) +{ + return 0; +} + ObjectState Object::GetState(void) { return state; @@ -91,6 +98,11 @@ void Object::Reparent(Object * newParent) parent = newParent; } +Dimension * Object::GetAttachedDimension(void) +{ + return attachedDimension; +} + // Class methods... void Object::SetFixedAngle(bool state/*= true*/) @@ -122,3 +134,8 @@ void Object::SetDimensionActive(bool state/*= true*/) { dimensionActive = state; } + +void Object::SetSnapMode(bool state/*= true*/) +{ + snapToGrid = state; +}