]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionmodifymove.h
ebdda4c483afd36fa358ac27afd197625b65c2d9
[architektonas] / src / actions / rs_actionmodifymove.h
1 #ifndef RS_ACTIONMODIFYMOVE_H
2 #define RS_ACTIONMODIFYMOVE_H
3
4 #include "rs_modification.h"
5 #include "rs_previewactioninterface.h"
6 #include "vector.h"
7
8 /**
9  * This action class can handle user events to move entities.
10  *
11  * @author Andrew Mustun
12  */
13 class RS_ActionModifyMove: public RS_PreviewActionInterface
14 {
15         public:
16                 /**
17                  * Action States.
18                  */
19                 enum Status {
20                         SetReferencePoint, /**< Setting the reference point. */
21                         SetTargetPoint, /**< Setting the target point. */
22                         ShowDialog /**< Showing the options dialog. */
23                 };
24
25         public:
26                 RS_ActionModifyMove(RS_EntityContainer & container, GraphicView & graphicView);
27                 ~RS_ActionModifyMove();
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                 RS_MoveData data;
40                 Vector referencePoint;
41                 Vector targetPoint;
42 };
43
44 #endif