]> Shamusworld >> Repos - architektonas/blob - src/actions/actioninfoangle.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actioninfoangle.h
1 #ifndef __ACTIONINFOANGLE_H__
2 #define __ACTIONINFOANGLE_H__
3
4 #include "actioninterface.h"
5 #include "vector.h"
6
7 class Entity;
8
9 /**
10  * This action class can handle user events to measure angles.
11  *
12  * @author James Hammons
13  * @author Andrew Mustun
14  */
15 class ActionInfoAngle: public ActionInterface
16 {
17         public:
18                 /**
19                  * Action States.
20                  */
21                 enum Status {
22                         SetEntity1,    /**< Setting the 1st entity. */
23                         SetEntity2     /**< Setting the 2nd entity. */
24                 };
25
26         public:
27                 ActionInfoAngle(EntityContainer & container, GraphicView & graphicView);
28                 ~ActionInfoAngle();
29
30                 virtual void init(int status = 0);
31                 virtual void trigger();
32                 virtual void mouseMoveEvent(QMouseEvent * e);
33                 virtual void mouseReleaseEvent(QMouseEvent * e);
34                 virtual void updateMouseButtonHints();
35                 virtual void updateMouseCursor();
36                 virtual void updateToolBar();
37
38         private:
39                 Entity * entity1;
40                 Vector point1;
41
42                 Entity * entity2;
43                 Vector point2;
44
45                 Vector intersection;
46 };
47
48 #endif  // __ACTIONINFOANGLE_H__