]> Shamusworld >> Repos - architektonas/blobdiff - src/line.h
Initial work on BlockWidget.
[architektonas] / src / line.h
index 87c3c7f5d143d7d9af60a783b0dafbeae9b8181b..fb17f2e2f41d9601108150bb0c9fb9db0b081ac0 100644 (file)
@@ -11,16 +11,22 @@ 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 *);
+               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);
+               void SetDimensionOnLine(Dimension * d = 0);
+               Object * FindAttachedDimension(void);
 
        protected:
-               bool HitTest(Point);
                void SaveState(void);
                bool StateChanged(void);
 
@@ -29,11 +35,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;
 };