X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdimension.h;h=b3993b0413856b858106b7a7d408cca38aba02c4;hb=6533354910fbf76d9747deeae02b2e910ef9aa48;hp=a5767a3ebfb4ad94a17492788424d29838e2743c;hpb=9590e4ed45fd4e05eccc16bd8e9d51596aea5a6d;p=architektonas diff --git a/src/dimension.h b/src/dimension.h index a5767a3..b3993b0 100644 --- a/src/dimension.h +++ b/src/dimension.h @@ -1,7 +1,6 @@ #ifndef __DIMENSION_H__ #define __DIMENSION_H__ -#include "connection.h" #include "object.h" class Line; @@ -15,22 +14,23 @@ class Dimension: public Object public: Dimension(Vector, Vector, DimensionType dt = DTLinear, Object * p = 0); - Dimension(Connection, Connection, DimensionType dt = DTLinear, Object * p = 0); ~Dimension(); virtual void Draw(Painter *); virtual Vector Center(void); virtual bool Collided(Vector); - virtual void PointerMoved(Vector); + virtual bool PointerMoved(Vector); virtual void PointerReleased(void); virtual bool HitTest(Point); + virtual void Translate(Vector); + virtual void Rotate(Point, double); + virtual void Mirror(Point, Point); + virtual void Save(void); + virtual void Restore(void); virtual void Enumerate(FILE *); virtual Object * Copy(void); virtual Vector GetPointAtParameter(double parameter); virtual void MovePointAtParameter(double parameter, Vector); - virtual void Connect(Object *, double); - virtual void Disconnect(Object *, double); - virtual void DisconnectAll(Object *); virtual QRectF Extents(void); void FlipSides(void); @@ -42,6 +42,7 @@ class Dimension: public Object Vector endpoint; // Starting point is Object::position Vector oldPoint; // Used for dragging Point oldEndpoint; + Point linePt1, linePt2; // Used for testing dimension line hits private: bool dragging; @@ -52,15 +53,13 @@ class Dimension: public Object DimensionType dimensionType; bool hitPoint1; bool hitPoint2; - bool oldHitPoint1, oldHitPoint2; + bool hitLine; + bool hitFlipSwitch; + bool hitChangeSwitch1; + bool hitChangeSwitch2; + bool oldHitPoint1, oldHitPoint2, oldHitLine, oldHitFlipSwitch, oldHitChangeSwitch1, oldHitChangeSwitch2; public: double size; // Size of arrows/text in base units - - private: - // We use these in lieu of the built-in connected[] array; no reason to - // do it this way especially - Connection point1; - Connection point2; }; #endif // __DIMENSION_H__