X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.cpp;h=ab95c0ea16fb5a35cf56af5074671b17cf8377b2;hb=baf67656b97e3d61e9223e66ebe4f554e364cd4a;hp=e38e6614ba353d4f7cd8102abdc7a19657c0b70d;hpb=fc498c685147e3173130e2df8953cc52705553e9;p=architektonas diff --git a/src/object.cpp b/src/object.cpp index e38e661..ab95c0e 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -5,7 +5,7 @@ // (C) 2011 Underground Software // See the README and GPLv3 files for licensing and warranty information // -// JLH = James L. Hammons +// JLH = James Hammons // // WHO WHEN WHAT // --- ---------- ------------------------------------------------------------ @@ -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; +}