]> Shamusworld >> Repos - architektonas/blob - src/actions/actionmodifystretch.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actionmodifystretch.h
1 #ifndef __ACTIONMODIFYSTRETCH_H__
2 #define __ACTIONMODIFYSTRETCH_H__
3
4 #include "actioninterface.h"
5 #include "vector.h"
6
7 /**
8  * This action class can handle user events to move entities.
9  *
10  * @author James Hammons
11  * @author Andrew Mustun
12  */
13 class ActionModifyStretch: public ActionInterface
14 {
15         public:
16                 /**
17                  * Action States.
18                  */
19                 enum Status {
20                         SetFirstCorner, /**< Setting first corner of selection. */
21                         SetSecondCorner, /**< Setting second corner of selection. */
22                         SetReferencePoint, /**< Setting the reference point. */
23                         SetTargetPoint /**< Setting the target point. */
24                 };
25
26         public:
27                 ActionModifyStretch(EntityContainer & container, GraphicView & graphicView);
28                 ~ActionModifyStretch();
29
30                 virtual void init(int status = 0);
31                 virtual void trigger();
32                 virtual void coordinateEvent(Vector * e);
33                 virtual void mouseMoveEvent(QMouseEvent * e);
34                 virtual void mouseReleaseEvent(QMouseEvent * e);
35                 virtual void updateMouseButtonHints();
36                 virtual void updateMouseCursor();
37                 virtual void updateToolBar();
38
39         private:
40                 Vector firstCorner;
41                 Vector secondCorner;
42                 Vector referencePoint;
43                 Vector targetPoint;
44 };
45
46 #endif  // __ACTIONMODIFYSTRETCH_H__