]> Shamusworld >> Repos - architektonas/blob - src/actions/actionmodifytrimamount.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actionmodifytrimamount.h
1 #ifndef __ACTIONMODIFYTRIMAMOUNT_H__
2 #define __ACTIONMODIFYTRIMAMOUNT_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 by a given
11  * amount.
12  *
13  * @author James Hammons
14  * @author Andrew Mustun
15  */
16 class ActionModifyTrimAmount: public ActionInterface
17 {
18         public:
19                 /**
20                  * Action States.
21                  */
22                 enum Status {
23                         ChooseTrimEntity /**< Choosing the entity to trim. */
24                 };
25
26         public:
27                 ActionModifyTrimAmount(EntityContainer & container, GraphicView & graphicView);
28                 ~ActionModifyTrimAmount();
29
30                 virtual RS2::ActionType rtti();
31                 virtual void init(int status = 0);
32                 virtual void trigger();
33                 //virtual void mouseMoveEvent(QMouseEvent* e);
34                 virtual void mouseReleaseEvent(QMouseEvent * e);
35                 virtual void commandEvent(CommandEvent * e);
36                 virtual QStringList getAvailableCommands();
37                 virtual void hideOptions();
38                 virtual void showOptions();
39                 virtual void updateMouseButtonHints();
40                 virtual void updateMouseCursor();
41                 virtual void updateToolBar();
42                 double getDistance();
43                 void setDistance(double d);
44
45         private:
46                 Entity * trimEntity;
47                 Vector trimCoord;
48                 double distance;
49 };
50
51 #endif  // __ACTIONMODIFYTRIMAMOUNT_H__