X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.h;h=34063a76e522d44f976a54f3db3d47c9f5d29287;hb=f3110724be7ad4d4e8c6b97d350ff8af7fbf3799;hp=875e92ca6c358f7eec29ef60c3a1d24cf7d8895c;hpb=7b7c8ec7d7f5379e09a8b7392f465f41639b0c79;p=architektonas diff --git a/src/object.h b/src/object.h index 875e92c..34063a7 100644 --- a/src/object.h +++ b/src/object.h @@ -1,14 +1,19 @@ #ifndef __OBJECT_H__ #define __OBJECT_H__ +#include #include // This is a container #include "vector.h" // This is the mathematical construct +#include "connection.h" +#include class Painter; class QFont; class Dimension; +//class FILE; enum ObjectState { OSInactive, OSSelected }; +enum ObjectType { OTNone, OTObject, OTLine, OTCircle, OTArc, OTDimension, OTEllipse, OTContainer }; class Object { @@ -26,8 +31,18 @@ class Object virtual void Transmute(Object *, Object *); virtual Object * GetParent(void); virtual void Add(Object *); + virtual Vector * GetPointAt(Vector); + virtual void Enumerate(FILE *); + virtual Object * Copy(void); + virtual Vector GetPointAtParameter(double parameter); + 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); //Hm. Object * Connect(Object *); // Class methods @@ -44,11 +59,14 @@ class Object Object * parent; // Pen pen; // Fill fill; + public: + ObjectType type; ObjectState state; + protected: ObjectState oldState; bool needUpdate; - Dimension * attachedDimension; - std::vector connected; +// Dimension * attachedDimension; + std::vector connected; // Class variables static QFont * font; @@ -58,6 +76,8 @@ class Object static bool deleteActive; static bool dimensionActive; static bool snapToGrid; + static bool ignoreClicks; + static bool dontMove; }; #endif // __OBJECT_H__