X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.h;h=ff29e1f7618328b5fa7689efc95c4ec6a6221b51;hb=7f3a6b11585376eecd80979ec3da2346c5314d88;hp=08b7e9dc9f9324c79a3c9da6d6f6aedc0f287438;hpb=4d6ba8a6eb781dbee818b6a55d21df7b52468936;p=architektonas diff --git a/src/object.h b/src/object.h index 08b7e9d..ff29e1f 100644 --- a/src/object.h +++ b/src/object.h @@ -13,7 +13,7 @@ class Dimension; //class FILE; enum ObjectState { OSInactive, OSSelected }; -enum ObjectType { OTNone, OTObject, OTLine, OTCircle, OTArc, OTDimension, OTEllipse, OTContainer }; +enum ObjectType { OTNone, OTObject, OTLine, OTCircle, OTArc, OTDimension, OTEllipse, OTContainer, OTSpline }; class Object { @@ -27,7 +27,7 @@ class Object virtual void Draw(Painter *); virtual Vector Center(void); virtual bool Collided(Vector); - virtual void PointerMoved(Vector); + virtual bool PointerMoved(Vector); virtual void PointerReleased(void); virtual bool NeedsUpdate(void); virtual bool HitTest(Point); @@ -62,8 +62,9 @@ class Object static void SetSnapMode(bool state = true); static Vector SnapPointToGrid(Vector); - protected: + public: Vector position; // All objects have a position (doubles as reference point) + protected: Object * parent; //this needs to be added eventually // Pen pen; @@ -96,6 +97,8 @@ class Object static QRectF selection; static double gridSpacing; // Grid spacing in base units static int currentLayer; + static Point snapPoint; + static bool snapPointIsValid; }; #endif // __OBJECT_H__