1 #ifndef __DIMENSION_H__
2 #define __DIMENSION_H__
8 enum DimensionType { DTLinear, DTLinearVert, DTLinearHorz, DTRadial, DTDiametric, DTCircumferential, DTAngular, DTLeader };
10 class Dimension: public Object
13 friend class Geometry;
16 Dimension(Vector, Vector, DimensionType dt = DTLinear, Object * p = 0);
19 virtual void Draw(Painter *);
20 virtual Vector Center(void);
21 virtual bool Collided(Vector);
22 virtual bool PointerMoved(Vector);
23 virtual void PointerReleased(void);
24 virtual bool HitTest(Point);
25 virtual void Enumerate(FILE *);
26 virtual Object * Copy(void);
27 virtual Vector GetPointAtParameter(double parameter);
28 virtual void MovePointAtParameter(double parameter, Vector);
29 virtual QRectF Extents(void);
33 void SaveHitState(void);
34 bool HitStateChanged(void);
37 Vector endpoint; // Starting point is Object::position
38 Vector oldPoint; // Used for dragging
40 Point linePt1, linePt2; // Used for testing dimension line hits
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__