]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionmodifycut.h
Refactoring: Moved RS_GraphicView to GraphicView.
[architektonas] / src / actions / rs_actionmodifycut.h
1 #ifndef RS_ACTIONMODIFYCUT_H
2 #define RS_ACTIONMODIFYCUT_H
3
4 #include "rs_actioninterface.h"
5 #include "vector.h"
6
7 class RS_Entity;
8
9 /**
10  * This action class can handle user events to divide entities.
11  *
12  * @author Andrew Mustun
13  */
14 class RS_ActionModifyCut: public RS_ActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         ChooseCutEntity,      /**< Choosing the entity to cut in two. */
22                         SetCutCoord        /**< Choosing the cutting point. */
23                 };
24
25         public:
26                 RS_ActionModifyCut(RS_EntityContainer & container, GraphicView & graphicView);
27                 ~RS_ActionModifyCut();
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 updateMouseButtonHints();
34                 virtual void updateMouseCursor();
35                 virtual void updateToolBar();
36
37         private:
38                 RS_Entity * cutEntity;
39                 Vector cutCoord;
40 };
41
42 #endif