]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionmodifytrim.h
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionmodifytrim.h
1 #ifndef RS_ACTIONMODIFYTRIM_H
2 #define RS_ACTIONMODIFYTRIM_H
3
4 #include "rs_previewactioninterface.h"
5 #include "vector.h"
6
7 class RS_Entity;
8
9 /**
10  * This action class can handle user events to trim entities.
11  *
12  * @author Andrew Mustun
13  */
14 class RS_ActionModifyTrim: public RS_PreviewActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         ChooseLimitEntity, /**< Choosing the limiting entity. */
22                         ChooseTrimEntity /**< Choosing the entity to trim. */
23                 };
24
25         public:
26                 RS_ActionModifyTrim(RS_EntityContainer & container, RS_GraphicView & graphicView, bool both = false);
27                 ~RS_ActionModifyTrim();
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 * limitEntity;
39                 Vector limitCoord;
40                 RS_Entity * trimEntity;
41                 Vector trimCoord;
42                 bool both;
43 };
44
45 #endif