]> Shamusworld >> Repos - architektonas/blobdiff - src/object.h
Added 1st stab at grouping capability.
[architektonas] / src / object.h
index 2e2efffa5f5b14bb14c196052115ea84b0d6f521..34063a76e522d44f976a54f3db3d47c9f5d29287 100644 (file)
@@ -5,6 +5,7 @@
 #include <vector>                                                      // This is a container
 #include "vector.h"                                                    // This is the mathematical construct
 #include "connection.h"
+#include <QRectF>
 
 class Painter;
 class QFont;
@@ -12,6 +13,7 @@ class Dimension;
 //class FILE;
 
 enum ObjectState { OSInactive, OSSelected };
+enum ObjectType { OTNone, OTObject, OTLine, OTCircle, OTArc, OTDimension, OTEllipse, OTContainer };
 
 class Object
 {
@@ -36,6 +38,8 @@ class Object
                virtual void Connect(Object *, double);
                virtual void Disconnect(Object *, double);
                virtual void DisconnectAll(Object *);
+               virtual QRectF Extents(void);
+//             virtual ObjectType Type(void);// = 0; // Pure virtual, must be implemented
                ObjectState GetState(void);
                void Reparent(Object *);
 //             Dimension * GetAttachedDimension(void);
@@ -55,7 +59,10 @@ class Object
                Object * parent;
 //             Pen pen;
 //             Fill fill;
+       public:
+               ObjectType type;
                ObjectState state;
+       protected:
                ObjectState oldState;
                bool needUpdate;
 //             Dimension * attachedDimension;
@@ -69,6 +76,8 @@ class Object
                static bool deleteActive;
                static bool dimensionActive;
                static bool snapToGrid;
+               static bool ignoreClicks;
+               static bool dontMove;
 };
 
 #endif // __OBJECT_H__