]> Shamusworld >> Repos - architektonas/blobdiff - src/line.h
First stabs at sizing dimension lines properly.
[architektonas] / src / line.h
index 87c3c7f5d143d7d9af60a783b0dafbeae9b8181b..5e1430c2f1132a58c31dfe4c09103cf85a61129a 100644 (file)
@@ -11,13 +11,14 @@ class Line: public Object
                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);
-               void SetDimensionOnPoint1(Dimension *);
-               void SetDimensionOnPoint2(Dimension *);
+//             void SetDimensionOnPoint1(Dimension *);
+//             void SetDimensionOnPoint2(Dimension *);
+               void SetDimensionOnLine(Dimension * d = 0);
 
        protected:
                bool HitTest(Point);
@@ -29,11 +30,12 @@ class Line: public Object
                Vector oldPoint;                                        // Used for dragging
 
        private:
-               bool dragging;
+               bool draggingLine;
                bool draggingHandle1;
                bool draggingHandle2;
                bool objectWasDragged;
                double length;
+               Vector angle;
                bool hitPoint1, hitPoint2, hitLine;
                bool oldHitPoint1, oldHitPoint2, oldHitLine;
 };