]> Shamusworld >> Repos - architektonas/blob - src/actions/actionmodifymoverotate.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actionmodifymoverotate.h
1 #ifndef __ACTIONMODIFYMOVEROTATE_H__
2 #define __ACTIONMODIFYMOVEROTATE_H__
3
4 #include "modification.h"
5 #include "actioninterface.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 James Hammons
13  * @author Andrew Mustun
14  */
15 class ActionModifyMoveRotate: public ActionInterface
16 {
17         public:
18                 /**
19                  * Action States.
20                  */
21                 enum Status {
22                         SetReferencePoint, /**< Setting the reference point. */
23                         SetTargetPoint, /**< Setting the target point. */
24                         ShowDialog, /**< Showing the options dialog. */
25                         SetAngle      /**< Setting angle in command line. */
26                 };
27
28         public:
29                 ActionModifyMoveRotate(EntityContainer & container, GraphicView & graphicView);
30                 ~ActionModifyMoveRotate();
31
32                 virtual RS2::ActionType rtti();
33                 virtual void init(int status = 0);
34                 virtual void trigger();
35                 virtual void mouseMoveEvent(QMouseEvent * e);
36                 virtual void mouseReleaseEvent(QMouseEvent * e);
37                 virtual void coordinateEvent(Vector * e);
38                 virtual void commandEvent(CommandEvent * e);
39                 virtual QStringList getAvailableCommands();
40                 virtual void hideOptions();
41                 virtual void showOptions();
42                 virtual void updateMouseButtonHints();
43                 virtual void updateMouseCursor();
44                 virtual void updateToolBar();
45                 void setAngle(double a);
46                 double getAngle();
47
48         private:
49                 MoveRotateData data;
50                 Vector targetPoint;
51
52                 /** Last status before entering angle. */
53                 Status lastStatus;
54                 /**
55                  * Commands
56                  */
57                 QString cmdAngle;
58                 QString cmdAngle2;
59                 QString cmdAngle3;
60 };
61
62 #endif  // __ACTIONMODIFYMOVEROTATE_H__