]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondrawarc.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondrawarc.h
1 #ifndef __ACTIONDRAWARC_H__
2 #define __ACTIONDRAWARC_H__
3
4 #include "actioninterface.h"
5 #include "arc.h"
6
7 /**
8  * This action class can handle user events to draw simple arcs with the
9  * center, radius, start- and endangle given.
10  *
11  * @author James Hammons
12  * @author Andrew Mustun
13  */
14 class ActionDrawArc: 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                         SetAngle1,       /**< Setting the startpoint.  */
24                         SetAngle2,       /**< Setting the endpoint. */
25                         SetIncAngle,     /**< Setting the included angle. */
26                         SetChordLength   /**< Setting carc chord length. */
27                 };
28
29         public:
30                 ActionDrawArc(EntityContainer & container, GraphicView & graphicView);
31                 ~ActionDrawArc();
32
33                 virtual RS2::ActionType rtti();
34                 void reset();
35                 virtual void init(int status = 0);
36                 virtual void trigger();
37                 virtual void mouseMoveEvent(QMouseEvent * e);
38                 virtual void mouseReleaseEvent(QMouseEvent * e);
39                 virtual void coordinateEvent(Vector * e);
40                 virtual void commandEvent(CommandEvent * e);
41                 virtual QStringList getAvailableCommands();
42                 virtual void hideOptions();
43                 virtual void showOptions();
44                 virtual void updateMouseButtonHints();
45                 virtual void updateMouseCursor();
46                 virtual void updateToolBar();
47                 bool isReversed();
48                 void setReversed(bool r);
49
50         protected:
51                 /**
52                  * Arc data defined so far.
53                  */
54                 ArcData data;
55 };
56
57 #endif  // __ACTIONDRAWARC_H__