]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondrawcircle2p.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondrawcircle2p.h
1 #ifndef __ACTIONDRAWCIRCLE2P_H__
2 #define __ACTIONDRAWCIRCLE2P_H__
3
4 #include "circle.h"
5 #include "actioninterface.h"
6 #include "vector.h"
7
8 /**
9  * This action class can handle user events to draw
10  * simple arcs with the center, radius, start- and endangle given.
11  *
12  * @author James Hammons
13  * @author Andrew Mustun
14  */
15 class ActionDrawCircle2P: public ActionInterface
16 {
17         public:
18                 /**
19                  * Action States.
20                  */
21                 enum Status {
22                         SetPoint1,       /**< Setting the 1st point. */
23                         SetPoint2        /**< Setting the 2nd point. */
24                 };
25
26         public:
27                 ActionDrawCircle2P(EntityContainer & container, GraphicView & graphicView);
28                 ~ActionDrawCircle2P();
29
30                 void reset();
31                 virtual void init(int status = 0);
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(CommandEvent * e);
38                 virtual QStringList getAvailableCommands();
39                 virtual void updateMouseButtonHints();
40                 virtual void updateMouseCursor();
41                 virtual void updateToolBar();
42
43         protected:
44                 /**
45                  * Circle data defined so far.
46                  */
47                 CircleData data;
48                 /**
49                  * 1st point.
50                  */
51                 Vector point1;
52                 /**
53                  * 2nd point.
54                  */
55                 Vector point2;
56 };
57
58 #endif  // __ACTIONDRAWCIRCLE2P_H__