]> Shamusworld >> Repos - architektonas/blobdiff - src/object.h
Added infrastructure to support mirror tool, cross compile script.
[architektonas] / src / object.h
index 513b677fba566421b6999859b705a8d051e76fba..2cdd3d36863e09fdeef2e837487be7cf87b86f7f 100644 (file)
@@ -44,6 +44,7 @@ class Object
                virtual void Translate(Vector);
                virtual void Rotate(Vector, double);
                virtual void Scale(Vector, double);
+               virtual Object * Mirror(Vector, Vector);
                ObjectState GetState(void);
                void Reparent(Object *);
 //             Dimension * GetAttachedDimension(void);
@@ -57,6 +58,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)
@@ -66,6 +68,7 @@ class Object
        public:
                ObjectType type;
                ObjectState state;
+               unsigned int layer;
        protected:
                ObjectState oldState;
                bool needUpdate;
@@ -73,18 +76,23 @@ class Object
                std::vector<Connection> 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__