]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionmodifymoverotate.h
Refactoring: Moved RS_GraphicView to GraphicView.
[architektonas] / src / actions / rs_actionmodifymoverotate.h
1 #ifndef RS_ACTIONMODIFYMOVEROTATE_H
2 #define RS_ACTIONMODIFYMOVEROTATE_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 and at the same
10  * time rotate entities.
11  *
12  * @author Andrew Mustun
13  */
14 class RS_ActionModifyMoveRotate: public RS_PreviewActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         SetReferencePoint, /**< Setting the reference point. */
22                         SetTargetPoint, /**< Setting the target point. */
23                         ShowDialog, /**< Showing the options dialog. */
24                         SetAngle      /**< Setting angle in command line. */
25                 };
26
27         public:
28                 RS_ActionModifyMoveRotate(RS_EntityContainer & container, GraphicView & graphicView);
29                 ~RS_ActionModifyMoveRotate();
30
31                 virtual RS2::ActionType rtti();
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 commandEvent(RS_CommandEvent * e);
38                 virtual QStringList getAvailableCommands();
39                 virtual void hideOptions();
40                 virtual void showOptions();
41                 virtual void updateMouseButtonHints();
42                 virtual void updateMouseCursor();
43                 virtual void updateToolBar();
44                 void setAngle(double a);
45                 double getAngle();
46
47         private:
48                 RS_MoveRotateData data;
49                 Vector targetPoint;
50
51                 /** Last status before entering angle. */
52                 Status lastStatus;
53                 /**
54                  * Commands
55                  */
56                 QString cmdAngle;
57                 QString cmdAngle2;
58                 QString cmdAngle3;
59 };
60
61 #endif