X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.h;h=0a72328cc6d8446b0804d1792c38240407a1b5af;hb=642cf72c11b49a9e00128ab6258a2438c785a5ab;hp=532723a73229c7bc360955e9bbcb0e1764625ac0;hpb=14fee18e7a8ebfccfc1ebe203fe049f268efb40a;p=architektonas diff --git a/src/object.h b/src/object.h index 532723a..0a72328 100644 --- a/src/object.h +++ b/src/object.h @@ -41,6 +41,9 @@ class Object virtual void DisconnectAll(Object *); virtual QRectF Extents(void); // virtual ObjectType Type(void);// = 0; // Pure virtual, must be implemented + virtual void Translate(Vector); + virtual void Rotate(Vector, double); + virtual void Scale(Vector, double); ObjectState GetState(void); void Reparent(Object *); // Dimension * GetAttachedDimension(void); @@ -54,6 +57,7 @@ class Object static void SetDeleteActive(bool state = true); static void SetDimensionActive(bool state = true); static void SetSnapMode(bool state = true); + static Vector SnapPointToGrid(Vector); protected: Vector position; // All objects have a position (doubles as reference point) @@ -63,6 +67,7 @@ class Object public: ObjectType type; ObjectState state; + unsigned int layer; protected: ObjectState oldState; bool needUpdate; @@ -70,18 +75,23 @@ class Object std::vector connected; // Class variables + public: static QFont * font; + protected: static bool fixedAngle; static bool fixedLength; static int viewportHeight; static bool deleteActive; static bool dimensionActive; + public: static bool snapToGrid; static bool ignoreClicks; static bool dontMove; public: static bool selectionInProgress; static QRectF selection; + static double gridSpacing; // Grid spacing in base units + static int currentLayer; }; #endif // __OBJECT_H__