]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondrawlinehorvert.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondrawlinehorvert.h
1 #ifndef __ACTIONDRAWLINEHORVERT_H__
2 #define __ACTIONDRAWLINEHORVERT_H__
3
4 #include "line.h"
5 #include "actioninterface.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 ActionDrawLineHorVert: public ActionInterface
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                 ActionDrawLineHorVert(EntityContainer & container, GraphicView & graphicView);
29                 ~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                 LineData data;
45                 /**
46                  * 2 points
47                  */
48                 Vector p1;
49                 Vector p2;
50 };
51
52 #endif  // __ACTIONDRAWLINEHORVERT_H__