]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionsnapintersectionmanual.h
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionsnapintersectionmanual.h
1 #ifndef RS_ACTIONSNAPINTERSECTIONMANUAL_H
2 #define RS_ACTIONSNAPINTERSECTIONMANUAL_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_ActionSnapIntersectionManual: public RS_PreviewActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         ChooseEntity1, /**< Choosing the 1st entity. */
22                         ChooseEntity2 /**< Choosing the 2nd entity. */
23                 };
24
25         public:
26                 RS_ActionSnapIntersectionManual(RS_EntityContainer & container, RS_GraphicView & graphicView);
27                 ~RS_ActionSnapIntersectionManual();
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 * entity1;
39                 RS_Entity * entity2;
40                 Vector coord;
41 };
42
43 #endif