]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondrawcirclecr.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondrawcirclecr.h
1 #ifndef __ACTIONDRAWCIRCLECR_H__
2 #define __ACTIONDRAWCIRCLECR_H__
3
4 #include "circle.h"
5 #include "actioninterface.h"
6
7 /**
8  * This action class can handle user events to draw simple arcs with the
9  * center, radius, start and end angle given.
10  *
11  * @author James Hammons
12  * @author Andrew Mustun
13  */
14 class ActionDrawCircleCR: public ActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         SetCenter,         /**< Setting the center point. */
22                         SetRadius          /**< Setting radius in command line. */
23                 };
24
25         public:
26                 ActionDrawCircleCR(EntityContainer & container, GraphicView & graphicView);
27                 ~ActionDrawCircleCR();
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                 double getRadius();
44                 void setRadius(double r);
45
46         protected:
47                 /**
48                  * Circle data defined so far.
49                  */
50                 CircleData data;
51 };
52
53 #endif  // __ACTIONDRAWCIRCLECR_H__