]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actiondrawcircle2p.h
Refactoring: Moved RS_GraphicView to GraphicView.
[architektonas] / src / actions / rs_actiondrawcircle2p.h
1 #ifndef RS_ACTIONDRAWCIRCLE2P_H
2 #define RS_ACTIONDRAWCIRCLE2P_H
3
4 #include "rs_circle.h"
5 #include "rs_previewactioninterface.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 Andrew Mustun
13  */
14 class RS_ActionDrawCircle2P: public RS_PreviewActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         SetPoint1,       /**< Setting the 1st point. */
22                         SetPoint2        /**< Setting the 2nd point. */
23                 };
24
25         public:
26                 RS_ActionDrawCircle2P(RS_EntityContainer & container, GraphicView & graphicView);
27                 ~RS_ActionDrawCircle2P();
28
29                 void reset();
30                 virtual void init(int status = 0);
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(RS_CommandEvent * e);
37                 virtual QStringList getAvailableCommands();
38                 virtual void updateMouseButtonHints();
39                 virtual void updateMouseCursor();
40                 virtual void updateToolBar();
41
42         protected:
43                 /**
44                  * Circle data defined so far.
45                  */
46                 RS_CircleData data;
47                 /**
48                  * 1st point.
49                  */
50                 Vector point1;
51                 /**
52                  * 2nd point.
53                  */
54                 Vector point2;
55 };
56
57 #endif