]> Shamusworld >> Repos - architektonas/blobdiff - src/line.h
Added ability to translate groups with Lines.
[architektonas] / src / line.h
index 1a38fa337ef73d49caf9fac1e0ad7b66284a2ea2..3d46551d6d1bedb7fe19a66fe5b2711068c8feaa 100644 (file)
@@ -3,30 +3,49 @@
 
 #include "object.h"
 
+class Dimension;
+
 class Line: public Object
 {
        public:
                Line(Vector, Vector, Object * p = 0);
                ~Line();
 
-               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 bool HitTest(Point);
+               virtual Vector * GetPointAt(Vector);
+               virtual void Enumerate(FILE *);
+               virtual Object * Copy(void);
+               virtual Vector GetPointAtParameter(double parameter);
+               virtual QRectF Extents(void);
+//             virtual ObjectType Type(void);
+               virtual void Translate(Vector);
+               virtual void Rotate(Vector, double);
+               virtual void Scale(Vector, double);
+               void SetDimensionOnLine(Dimension * d = 0);
+               Object * FindAttachedDimension(void);
+
+       protected:
+               void SaveState(void);
+               bool StateChanged(void);
 
        protected:
                Vector endpoint;                                        // Starting point is Object::position
                Vector oldPoint;                                        // Used for dragging
 
        private:
-               bool dragging;
+               bool draggingLine;
                bool draggingHandle1;
                bool draggingHandle2;
-//             bool needUpdate;
                bool objectWasDragged;
                double length;
+               Vector angle;
+               bool hitPoint1, hitPoint2, hitLine;
+               bool oldHitPoint1, oldHitPoint2, oldHitLine;
 };
 
 #endif // __LINE_H__