]> Shamusworld >> Repos - architektonas/blobdiff - src/object.h
Mirror tool now works successfully for all object types. :-D
[architektonas] / src / object.h
index 72aaad644f29a79d96dba2d08a59e83118529509..d34e79ae7598df74e85b3d330f63a390a9aeafe4 100644 (file)
@@ -44,6 +44,9 @@ class Object
                virtual void Translate(Vector);
                virtual void Rotate(Vector, double);
                virtual void Scale(Vector, double);
+               virtual void Mirror(Point, Point);
+               virtual void Save(void);
+               virtual void Restore(void);
                ObjectState GetState(void);
                void Reparent(Object *);
 //             Dimension * GetAttachedDimension(void);
@@ -57,15 +60,18 @@ 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)
                Object * parent;
 //             Pen pen;
 //             Fill fill;
+               Point oldPosition;
        public:
                ObjectType type;
                ObjectState state;
+               unsigned int layer;
        protected:
                ObjectState oldState;
                bool needUpdate;
@@ -73,7 +79,9 @@ class Object
                std::vector<Connection> connected;
 
                // Class variables
+       public:
                static QFont * font;
+       protected:
                static bool fixedAngle;
                static bool fixedLength;
                static int viewportHeight;
@@ -86,6 +94,8 @@ class Object
        public:
                static bool selectionInProgress;
                static QRectF selection;
+               static double gridSpacing;                      // Grid spacing in base units
+               static int currentLayer;
 };
 
 #endif // __OBJECT_H__