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