X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdimension.h;h=0cda92924fa9cd75aabe1e0e64a4a3d7452d5e8e;hb=baf67656b97e3d61e9223e66ebe4f554e364cd4a;hp=cea0de1b7b3645c3c5ba09f88f696179b2fda9a3;hpb=b8c3c411826c1df00e54daeaf6cd820685f4f460;p=architektonas diff --git a/src/dimension.h b/src/dimension.h index cea0de1..0cda929 100644 --- a/src/dimension.h +++ b/src/dimension.h @@ -3,19 +3,24 @@ #include "object.h" +enum DimensionType { DTLinear, DTRadial, DTDiametric, DTCircumferential, DTLeader }; + class Dimension: public Object { public: - Dimension(Vector, Vector, Object * p = 0); + Dimension(Vector, Vector, DimensionType dt = DTLinear, Object * p = 0); + Dimension(Vector *, Vector *, DimensionType dt = DTLinear, Object * p = 0); ~Dimension(); - virtual void Draw(QPainter *); + virtual void Draw(Painter *); virtual Vector Center(void); virtual bool Collided(Vector); virtual void PointerMoved(Vector); virtual void PointerReleased(void); - void SetPoint1(Vector); - void SetPoint2(Vector); + void SetPoint1(Vector *); + void SetPoint2(Vector *); + Vector GetPoint1(void); + Vector GetPoint2(void); void FlipSides(void); protected: @@ -28,6 +33,10 @@ class Dimension: public Object bool draggingHandle2; bool objectWasDragged; double length; + DimensionType type; + + Vector * point1; // These couple to external points; if there + Vector * point2; // are none then fall back to endpoint/position }; #endif // __DIMENSION_H__