1 #ifndef RS_ACTIONDRAWLINE_H
2 #define RS_ACTIONDRAWLINE_H
5 #include "rs_previewactioninterface.h"
9 * This action class can handle user events to draw
10 * simple lines with the start- and endpoint given.
12 * @author Andrew Mustun
14 class RS_ActionDrawLine: public RS_PreviewActionInterface
16 //No slots/signals... //Q_OBJECT
24 SetStartpoint = 0, /**< Setting the startpoint. */
25 SetEndpoint /**< Setting the endpoint. */
29 RS_ActionDrawLine(RS_EntityContainer & container, RS_GraphicView & graphicView);
30 virtual ~RS_ActionDrawLine();
32 virtual RS2::ActionType rtti();
33 static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
36 virtual void init(int status = 0);
37 virtual void trigger();
39 virtual void mouseMoveEvent(QMouseEvent * e);
40 virtual void mouseReleaseEvent(QMouseEvent * e);
42 virtual void coordinateEvent(RS_CoordinateEvent * e);
43 virtual void commandEvent(RS_CommandEvent * e);
44 virtual QStringList getAvailableCommands();
46 virtual void showOptions();
47 virtual void hideOptions();
49 virtual void updateMouseButtonHints();
50 virtual void updateMouseCursor();
51 virtual void updateToolBar();
57 void ClearHistory(void);
61 * Line data defined so far.
65 * Start point of the series of lines. Used for close function.
69 * Point history (for undo)
71 // Q3PtrList<Vector> history;
72 QList<Vector *> history;