X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.h;h=b6f9558e452b9386a80cab88f841f49651dfa88c;hb=d9d9b7a1934adc548f2acc90a750d6f0451cdd3a;hp=deaa91f3604f923b16a805fd57ccc55e241ca749;hpb=c51c02d23ddd4423882da2c54b76f8f2c90c1c99;p=architektonas diff --git a/src/object.h b/src/object.h index deaa91f..b6f9558 100644 --- a/src/object.h +++ b/src/object.h @@ -1,9 +1,10 @@ #ifndef __OBJECT_H__ #define __OBJECT_H__ -#include "vector.h" +#include // This is a container +#include "vector.h" // This is the mathematical construct -class QPainter; +class Painter; class QFont; class Dimension; @@ -16,20 +17,26 @@ class Object Object(Vector, Object * passedInParent = 0); ~Object(); - virtual void Draw(QPainter *); + virtual void Draw(Painter *); virtual Vector Center(void); virtual bool Collided(Vector); virtual void PointerMoved(Vector); virtual void PointerReleased(void); virtual bool NeedsUpdate(void); virtual void Transmute(Object *, Object *); + virtual Object * GetParent(void); + virtual void Add(Object *); ObjectState GetState(void); + void Reparent(Object *); +//Hm. Object * Connect(Object *); // Class methods static void SetFixedAngle(bool state = true); static void SetFixedLength(bool state = true); static void SetFont(QFont *); static void SetViewportHeight(int); + static void SetDeleteActive(bool state = true); + static void SetDimensionActive(bool state = true); protected: Vector position; // All objects have a position (doubles as reference point) @@ -39,14 +46,16 @@ class Object ObjectState state; ObjectState oldState; bool needUpdate; - Dimension * dimPoint1; - Dimension * dimPoint2; + Dimension * attachedDimension; + std::vector connected; // Class variables static QFont * font; static bool fixedAngle; static bool fixedLength; static int viewportHeight; + static bool deleteActive; + static bool dimensionActive; }; #endif // __OBJECT_H__