]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawpolyline.h
Phase two of adding polyline functionality...
[architektonas] / src / actions / actiondrawpolyline.h
index 5ed5a1ae07ea0348762ab383f35d6c9d006ad8dc..6902f40d3d29fdcd6ff8abd16175044e77e7433c 100644 (file)
@@ -7,12 +7,20 @@
 class Polyline;
 
 /**
- * This action class can handle user events to draw freehand lines.
+ * This class handles polyline creation.
  *
  * @author James Hammons
  */
 class ActionDrawPolyline: public ActionInterface
 {
+       public:
+               /** Action States */
+               enum Status
+               {
+                       SetFirstPoint = 0,      /**< Setting the first point.  */
+                       SetNextPoint            /**< Setting the next point. */
+               };
+
        public:
                ActionDrawPolyline(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawPolyline();
@@ -24,10 +32,17 @@ class ActionDrawPolyline: public ActionInterface
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
                virtual void updateToolBar();
+               void close();
+               void undo();
 
        protected:
                Vector vertex;
                Polyline * polyline;
+               /** Start point of the series of lines. Used for close function. */
+               Vector start;
+               /** Point history (for undo) */
+//This probably won't work, because of arc segments...
+               QList<Vector *> history;
 };
 
 #endif // __ACTIONDRAWPOLYLINE_H__