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