]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actiondimaligned.h
Last checkin before major refactor...
[architektonas] / src / actions / rs_actiondimaligned.h
1 #ifndef RS_ACTIONDIMALIGNED_H
2 #define RS_ACTIONDIMALIGNED_H
3
4 #include "rs_actiondimension.h"
5 #include "rs_dimaligned.h"
6
7 /**
8  * This action class can handle user events to draw
9  * aligned dimensions.
10  *
11  * @author Andrew Mustun
12  */
13 class RS_ActionDimAligned: public RS_ActionDimension
14 {
15         public:
16                 /**
17                  * Action States.
18                  */
19                 enum Status {
20                         SetExtPoint1,    /**< Setting the 1st ext point.  */
21                         SetExtPoint2,    /**< Setting the 2nd ext point. */
22                         SetDefPoint,     /**< Setting the common def point */
23                         SetText          /**< Setting the text label in command line */
24                 };
25
26         public:
27                 RS_ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView);
28                 ~RS_ActionDimAligned();
29
30                 virtual RS2::ActionType rtti();
31                 virtual void reset();
32                 virtual void trigger();
33                 void preparePreview();
34                 virtual void mouseMoveEvent(QMouseEvent * e);
35                 virtual void mouseReleaseEvent(QMouseEvent * e);
36                 virtual void coordinateEvent(Vector * e);
37                 virtual void commandEvent(RS_CommandEvent * e);
38                 virtual QStringList getAvailableCommands();
39                 virtual void hideOptions();
40                 virtual void showOptions();
41                 virtual void updateMouseButtonHints();
42
43         protected:
44                 /**
45                  * Aligned dimension data.
46                  */
47                 RS_DimAlignedData edata;
48
49                 /** Last status before entering text. */
50                 Status lastStatus;
51 };
52
53 #endif