]> Shamusworld >> Repos - architektonas/blob - src/actions/actioninfoarea.h
Fixed problem with MDI activation.
[architektonas] / src / actions / actioninfoarea.h
1 #ifndef __ACTIONINFOAREA_H__
2 #define __ACTIONINFOAREA_H__
3
4 #include "infoarea.h"
5 #include "actioninterface.h"
6 #include "vector.h"
7
8 class Entity;
9
10 /**
11  * This action class can handle user events to measure distances between
12  * two points.
13  *
14  * @author James Hammons
15  * @author Andrew Mustun
16  */
17 class ActionInfoArea: public ActionInterface
18 {
19         public:
20                 /**
21                  * Action States.
22                  */
23                 enum Status {
24                         SetFirstPoint,    /**< Setting the 1st point of the polygon. */
25                         SetNextPoint      /**< Setting a next point. */
26                 };
27
28         public:
29                 ActionInfoArea(EntityContainer & container, GraphicView & graphicView);
30                 ~ActionInfoArea();
31
32                 virtual void init(int status = 0);
33                 virtual void trigger();
34                 virtual void mouseMoveEvent(QMouseEvent * e);
35                 virtual void mouseReleaseEvent(QMouseEvent * e);
36                 virtual void coordinateEvent(Vector * e);
37                 virtual void updateMouseButtonHints();
38                 virtual void updateMouseCursor();
39                 virtual void updateToolBar();
40
41         private:
42                 Vector point1;
43                 Vector prev;
44                 Entity * currentLine;
45                 Entity * closingLine;
46                 InfoArea ia;
47 };
48
49 #endif  // __ACTIONINFOAREA_H__