]> Shamusworld >> Repos - architektonas/blobdiff - src/dimension.h
First step towards resizable grid and sane zoom setting.
[architektonas] / src / dimension.h
index be8e5c51a31eda8efea566c3b4439bbbdb32c9f8..4afc2ace68a2ac59c336efd8fac309cfc6c874f9 100644 (file)
@@ -4,13 +4,12 @@
 #include "connection.h"
 #include "object.h"
 
-enum DimensionType { DTLinear, DTRadial, DTDiametric, DTCircumferential, DTLeader };
+enum DimensionType { DTLinear, DTLinearVert, DTLinearHorz, DTRadial, DTDiametric, DTCircumferential, DTAngular, DTLeader };
 
 class Dimension: public Object
 {
        public:
                Dimension(Vector, Vector, DimensionType dt = DTLinear, Object * p = 0);
-//             Dimension(Vector *, Vector *, DimensionType dt = DTLinear, Object * p = 0);
                Dimension(Connection, Connection, DimensionType dt = DTLinear, Object * p = 0);
                ~Dimension();
 
@@ -25,6 +24,7 @@ class Dimension: public Object
                virtual void Connect(Object *, double);
                virtual void Disconnect(Object *, double);
                virtual void DisconnectAll(Object *);
+               virtual QRectF Extents(void);
                void FlipSides(void);
 
        protected:
@@ -37,10 +37,11 @@ class Dimension: public Object
                bool draggingHandle2;
                bool objectWasDragged;
                double length;
-               DimensionType type;
+               DimensionType dimensionType;
+               double size;                                            // Size of arrows/text in base units
 
                // We use these in lieu of the built-in connected[] array; no reason to
-               // do this way especially
+               // do it this way especially
                Connection point1;
                Connection point2;
 };