]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actiondrawlinehorvert.h
5a88b906ae6141d91c44c5b39520f0f3b78b0ffe
[architektonas] / src / actions / rs_actiondrawlinehorvert.h
1 #ifndef RS_ACTIONDRAWLINEHORVERT_H
2 #define RS_ACTIONDRAWLINEHORVERT_H
3
4 #include "rs_line.h"
5 #include "rs_previewactioninterface.h"
6 #include "vector.h"
7
8 /**
9  * This action class can handle user events to draw
10  * horizontal/vertical lines from a given startpoint
11  * to an endpoint closest to a second given point.
12  * OBSOLETE
13  *
14  * @author Ulf Lehnert
15  */
16 class RS_ActionDrawLineHorVert: public RS_PreviewActionInterface
17 {
18         public:
19                 /**
20                  * Action States.
21                  */
22                 enum Status {
23                         SetStartpoint,      /**< Setting the 1st point.  */
24                         SetEndpoint       /**< Setting the 2nd point. */
25                 };
26
27         public:
28                 RS_ActionDrawLineHorVert(RS_EntityContainer & container, GraphicView & graphicView);
29                 ~RS_ActionDrawLineHorVert();
30
31                 void reset();
32                 virtual void init(int status = 0);
33                 virtual void trigger();
34                 virtual void mouseMoveEvent(QMouseEvent * e);
35                 virtual void mouseReleaseEvent(QMouseEvent * e);
36                 virtual void updateMouseButtonHints();
37                 virtual void updateMouseCursor();
38                 virtual void updateToolBar();
39
40         protected:
41                 /**
42                  * Line data.
43                  */
44                 RS_LineData data;
45                 /**
46                  * 2 points
47                  */
48                 Vector p1;
49                 Vector p2;
50 };
51
52 #endif