]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionmodifystretch.h
Last checkin before major refactor...
[architektonas] / src / actions / rs_actionmodifystretch.h
1 #ifndef RS_ACTIONMODIFYSTRETCH_H
2 #define RS_ACTIONMODIFYSTRETCH_H
3
4 #include "rs_previewactioninterface.h"
5 #include "vector.h"
6
7 /**
8  * This action class can handle user events to move entities.
9  *
10  * @author Andrew Mustun
11  */
12 class RS_ActionModifyStretch: public RS_PreviewActionInterface
13 {
14         //Q_OBJECT
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                 RS_ActionModifyStretch(RS_EntityContainer & container, GraphicView & graphicView);
28                 ~RS_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