]> Shamusworld >> Repos - architektonas/blob - src/actions/actionmodifybevel.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actionmodifybevel.h
1 #ifndef __ACTIONMODIFYBEVEL_H__
2 #define __ACTIONMODIFYBEVEL_H__
3
4 #include "actioninterface.h"
5 #include "modification.h"
6
7 /**
8  * This action class can handle user events to bevel corners.
9  *
10  * @author James Hammons
11  * @author Andrew Mustun
12  */
13 class ActionModifyBevel: public ActionInterface
14 {
15         public:
16                 /**
17                  * Action States.
18                  */
19                 enum Status {
20                         SetEntity1,      /**< Choosing the 1st entity. */
21                         SetEntity2,      /**< Choosing the 2nd entity. */
22                         SetLength1,      /**< Setting length 1 in command line. */
23                         SetLength2       /**< Setting length 2 in command line. */
24                         //SetTrim             /**< Setting trim flag in command line. */
25                 };
26
27         public:
28                 ActionModifyBevel(EntityContainer & container, GraphicView & graphicView);
29                 ~ActionModifyBevel();
30
31                 virtual RS2::ActionType rtti();
32                 virtual void init(int status = 0);
33                 virtual void trigger();
34                 virtual void mouseMoveEvent(QMouseEvent * e);
35                 virtual void mouseReleaseEvent(QMouseEvent * e);
36                 virtual void commandEvent(CommandEvent * e);
37                 virtual QStringList getAvailableCommands();
38                 virtual void hideOptions();
39                 virtual void showOptions();
40                 virtual void updateMouseButtonHints();
41                 virtual void updateMouseCursor();
42                 virtual void updateToolBar();
43                 void setLength1(double l1);
44                 double getLength1();
45                 void setLength2(double l2);
46                 double getLength2();
47                 void setTrim(bool t);
48                 bool isTrimOn();
49
50         private:
51                 Entity * entity1;
52                 Vector coord1;
53                 Entity * entity2;
54                 Vector coord2;
55                 BevelData data;
56                 /** Last status before entering angle. */
57                 Status lastStatus;
58 };
59
60 #endif  // __ACTIONMODIFYBEVEL_H__