]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actioninfodist.h
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actioninfodist.h
1 #ifndef RS_ACTIONINFODIST_H
2 #define RS_ACTIONINFODIST_H
3
4 #include "rs_previewactioninterface.h"
5 #include "vector.h"
6
7 /**
8  * This action class can handle user events to measure distances between
9  * two points.
10  *
11  * @author Andrew Mustun
12  */
13 class RS_ActionInfoDist: public RS_PreviewActionInterface
14 {
15         public:
16                 /**
17                  * Action States.
18                  */
19                 enum Status {
20                         SetPoint1,    /**< Setting the 1st point of the distance. */
21                         SetPoint2     /**< Setting the 2nd point of the distance. */
22                 };
23
24         public:
25                 RS_ActionInfoDist(RS_EntityContainer & container, RS_GraphicView & graphicView);
26                 ~RS_ActionInfoDist();
27
28                 virtual void init(int status = 0);
29                 virtual void trigger();
30                 virtual void mouseMoveEvent(QMouseEvent * e);
31                 virtual void mouseReleaseEvent(QMouseEvent * e);
32                 virtual void coordinateEvent(Vector * e);
33                 virtual void updateMouseButtonHints();
34                 virtual void updateMouseCursor();
35                 virtual void updateToolBar();
36
37         private:
38                 Vector point1;
39                 Vector point2;
40 };
41
42 #endif