]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondimangular.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondimangular.h
1 #ifndef __ACTIONDIMANGULAR_H__
2 #define __ACTIONDIMANGULAR_H__
3
4 #include "actiondimension.h"
5 #include "dimangular.h"
6 #include "vector.h"
7
8 class Line;
9
10 /**
11  * This action class can handle user events to draw angular dimensions.
12  *
13  * @author Andrew Mustun
14  */
15 class ActionDimAngular: public ActionDimension
16 {
17         private:
18                 enum Status {
19                         SetLine1,      /**< Choose 1st line. */
20                         SetLine2,      /**< Choose 2nd line. */
21                         SetPos,        /**< Choose position. */
22                         SetText        /**< Setting text label in consle. */
23                 };
24
25         public:
26                 ActionDimAngular(EntityContainer & container, GraphicView & graphicView);
27                 ~ActionDimAngular();
28
29                 virtual RS2::ActionType rtti();
30                 virtual void reset();
31                 virtual void trigger();
32                 virtual void mouseMoveEvent(QMouseEvent * e);
33                 virtual void mouseReleaseEvent(QMouseEvent * e);
34                 virtual void coordinateEvent(Vector * e);
35                 virtual void commandEvent(CommandEvent * e);
36                 virtual QStringList getAvailableCommands();
37                 virtual void hideOptions();
38                 virtual void showOptions();
39                 virtual void updateMouseButtonHints();
40
41         private:
42                 /** 1st chosen line */
43                 Line * line1;
44                 /** 2nd chosen line */
45                 Line * line2;
46                 /** Center of arc */
47                 Vector center;
48                 /** Data of new dimension */
49                 DimAngularData edata;
50                 /** Last status before entering text. */
51                 Status lastStatus;
52 };
53
54 #endif  // __ACTIONDIMANGULAR_H__