]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionmodifybevel.h
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionmodifybevel.h
1 #ifndef RS_ACTIONMODIFYBEVEL_H
2 #define RS_ACTIONMODIFYBEVEL_H
3
4 #include "rs_previewactioninterface.h"
5 #include "rs_modification.h"
6
7 /**
8  * This action class can handle user events to bevel corners.
9  *
10  * @author Andrew Mustun
11  */
12 class RS_ActionModifyBevel: public RS_PreviewActionInterface
13 {
14         public:
15                 /**
16                  * Action States.
17                  */
18                 enum Status {
19                         SetEntity1,      /**< Choosing the 1st entity. */
20                         SetEntity2,      /**< Choosing the 2nd entity. */
21                         SetLength1,      /**< Setting length 1 in command line. */
22                         SetLength2       /**< Setting length 2 in command line. */
23                         //SetTrim             /**< Setting trim flag in command line. */
24                 };
25
26         public:
27                 RS_ActionModifyBevel(RS_EntityContainer & container, RS_GraphicView & graphicView);
28                 ~RS_ActionModifyBevel();
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(RS_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                 void setLength1(double l1);
43                 double getLength1();
44                 void setLength2(double l2);
45                 double getLength2();
46                 void setTrim(bool t);
47                 bool isTrimOn();
48
49         private:
50                 RS_Entity * entity1;
51                 Vector coord1;
52                 RS_Entity * entity2;
53                 Vector coord2;
54                 RS_BevelData data;
55                 /** Last status before entering angle. */
56                 Status lastStatus;
57 };
58
59 #endif