]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondrawcircle.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondrawcircle.h
1 #ifndef __ACTIONDRAWCIRCLE_H__
2 #define __ACTIONDRAWCIRCLE_H__
3
4 #include "circle.h"
5 #include "actioninterface.h"
6
7 /**
8  * This action class can handle user events to draw
9  * circles with a given center and a point on the circle line.
10  *
11  * @author James Hammons
12  * @author Andrew Mustun
13  */
14 class ActionDrawCircle: public ActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         SetCenter,       /**< Setting the center point. */
22                         SetRadius        /**< Setting the radius. */
23                 };
24
25         public:
26                 ActionDrawCircle(EntityContainer & container, GraphicView & graphicView);
27                 ~ActionDrawCircle();
28
29                 virtual RS2::ActionType rtti();
30                 void reset();
31                 virtual void init(int status = 0);
32                 virtual void trigger();
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                 virtual void updateMouseCursor();
42                 virtual void updateToolBar();
43
44         protected:
45                 /**
46                  * Circle data defined so far.
47                  */
48                 CircleData data;
49 };
50
51 #endif  // __ACTIONDRAWCIRCLE_H__