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