X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.h;h=34063a76e522d44f976a54f3db3d47c9f5d29287;hb=f3110724be7ad4d4e8c6b97d350ff8af7fbf3799;hp=5b19505d2c94be29bccb49cf44c87de0625b3b3d;hpb=eb0057e8a8145032152e4c417fcd102ef5a21484;p=architektonas diff --git a/src/object.h b/src/object.h index 5b19505..34063a7 100644 --- a/src/object.h +++ b/src/object.h @@ -1,9 +1,11 @@ #ifndef __OBJECT_H__ #define __OBJECT_H__ +#include #include // This is a container #include "vector.h" // This is the mathematical construct -#include +#include "connection.h" +#include class Painter; class QFont; @@ -11,6 +13,7 @@ class Dimension; //class FILE; enum ObjectState { OSInactive, OSSelected }; +enum ObjectType { OTNone, OTObject, OTLine, OTCircle, OTArc, OTDimension, OTEllipse, OTContainer }; class Object { @@ -31,9 +34,15 @@ class 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); +// Dimension * GetAttachedDimension(void); //Hm. Object * Connect(Object *); // Class methods @@ -50,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; @@ -64,6 +76,8 @@ class Object static bool deleteActive; static bool dimensionActive; static bool snapToGrid; + static bool ignoreClicks; + static bool dontMove; }; #endif // __OBJECT_H__