]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actioninfodist2.h
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actioninfodist2.h
1 #ifndef RS_ACTIONINFODIST2_H
2 #define RS_ACTIONINFODIST2_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 distances between
11  * entities and points.
12  *
13  * @author Andrew Mustun
14  */
15 class RS_ActionInfoDist2: public RS_PreviewActionInterface
16 {
17         public:
18                 /**
19                  * Action States.
20                  */
21                 enum Status {
22                         SetEntity,    /**< Setting the entity. */
23                         SetPoint      /**< Setting the point of the distance. */
24                 };
25
26         public:
27                 RS_ActionInfoDist2(RS_EntityContainer & container, RS_GraphicView & graphicView);
28                 ~RS_ActionInfoDist2();
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 coordinateEvent(Vector * e);
35                 virtual void updateMouseButtonHints();
36                 virtual void updateMouseCursor();
37                 virtual void updateToolBar();
38
39         private:
40                 RS_Entity * entity;
41                 Vector point;
42 };
43
44 #endif