]> Shamusworld >> Repos - architektonas/blob - src/actions/actioninfodist.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actioninfodist.h
1 #ifndef __ACTIONINFODIST_H__
2 #define __ACTIONINFODIST_H__
3
4 #include "actioninterface.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 James Hammons
12  * @author Andrew Mustun
13  */
14 class ActionInfoDist: public ActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         SetPoint1,    /**< Setting the 1st point of the distance. */
22                         SetPoint2     /**< Setting the 2nd point of the distance. */
23                 };
24
25         public:
26                 ActionInfoDist(EntityContainer & container, GraphicView & graphicView);
27                 ~ActionInfoDist();
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 coordinateEvent(Vector * e);
34                 virtual void updateMouseButtonHints();
35                 virtual void updateMouseCursor();
36                 virtual void updateToolBar();
37
38         private:
39                 Vector point1;
40                 Vector point2;
41 };
42
43 #endif  // __ACTIONINFODIST_H__