]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionmodifyscale.h
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionmodifyscale.h
1 #ifndef RS_ACTIONMODIFYSCALE_H
2 #define RS_ACTIONMODIFYSCALE_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_ActionModifyScale: public RS_PreviewActionInterface
14 {
15         public:
16                 /**
17                  * Action States.
18                  */
19                 enum Status {
20                         SetReferencePoint, /**< Setting the reference point. */
21                         ShowDialog /**< Showing the options dialog. */
22                 };
23
24         public:
25                 RS_ActionModifyScale(RS_EntityContainer & container, RS_GraphicView & graphicView);
26                 ~RS_ActionModifyScale();
27
28                 virtual void init(int status = 0);
29                 virtual void trigger();
30                 virtual void mouseMoveEvent(QMouseEvent * e);
31                 virtual void mouseReleaseEvent(QMouseEvent * e);
32                 virtual void updateMouseButtonHints();
33                 virtual void updateMouseCursor();
34                 virtual void updateToolBar();
35
36         private:
37                 RS_ScaleData data;
38                 Vector referencePoint;
39                 Vector targetPoint;
40 };
41
42 #endif