1 #ifndef __DIMENSION_H__
2 #define __DIMENSION_H__
4 #include "connection.h"
9 enum DimensionType { DTLinear, DTLinearVert, DTLinearHorz, DTRadial, DTDiametric, DTCircumferential, DTAngular, DTLeader };
11 class Dimension: public Object
14 friend class Geometry;
17 Dimension(Vector, Vector, DimensionType dt = DTLinear, Object * p = 0);
20 virtual void Draw(Painter *);
21 virtual Vector Center(void);
22 virtual bool Collided(Vector);
23 virtual void PointerMoved(Vector);
24 virtual void PointerReleased(void);
25 virtual bool HitTest(Point);
26 virtual void Enumerate(FILE *);
27 virtual Object * Copy(void);
28 virtual Vector GetPointAtParameter(double parameter);
29 virtual void MovePointAtParameter(double parameter, Vector);
30 virtual QRectF Extents(void);
34 void SaveHitState(void);
35 bool HitStateChanged(void);
38 Vector endpoint; // Starting point is Object::position
39 Vector oldPoint; // Used for dragging
46 bool objectWasDragged;
48 DimensionType dimensionType;
53 bool oldHitPoint1, oldHitPoint2, oldHitLine, oldHitFlipSwitch;
55 double size; // Size of arrows/text in base units
58 #endif // __DIMENSION_H__