]> Shamusworld >> Repos - architektonas/blob - src/actions/actionmodifytrim.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actionmodifytrim.h
1 #ifndef __ACTIONMODIFYTRIM_H__
2 #define __ACTIONMODIFYTRIM_H__
3
4 #include "actioninterface.h"
5 #include "vector.h"
6
7 class Entity;
8
9 /**
10  * This action class can handle user events to trim entities.
11  *
12  * @author James Hammons
13  * @author Andrew Mustun
14  */
15 class ActionModifyTrim: public ActionInterface
16 {
17         public:
18                 /**
19                  * Action States.
20                  */
21                 enum Status {
22                         ChooseLimitEntity, /**< Choosing the limiting entity. */
23                         ChooseTrimEntity /**< Choosing the entity to trim. */
24                 };
25
26         public:
27                 ActionModifyTrim(EntityContainer & container, GraphicView & graphicView, bool both = false);
28                 ~ActionModifyTrim();
29
30                 virtual void init(int status = 0);
31                 virtual void trigger();
32                 virtual void mouseMoveEvent(QMouseEvent * e);
33                 virtual void mouseReleaseEvent(QMouseEvent * e);
34                 virtual void updateMouseButtonHints();
35                 virtual void updateMouseCursor();
36                 virtual void updateToolBar();
37
38         private:
39                 Entity * limitEntity;
40                 Vector limitCoord;
41                 Entity * trimEntity;
42                 Vector trimCoord;
43                 bool both;
44 };
45
46 #endif  // __ACTIONMODIFYTRIM_H__