]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondrawlinetangent1.h
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondrawlinetangent1.h
1 #ifndef __ACTIONDRAWLINETANGENT1_H__
2 #define __ACTIONDRAWLINETANGENT1_H__
3
4 #include "line.h"
5 #include "actioninterface.h"
6 #include "vector.h"
7
8 class Line;
9 class Entity;
10
11 /**
12  * This action class can handle user events to draw tangents from points
13  * to circles.
14  *
15  * @author James Hammons
16  * @author Andrew Mustun
17  */
18 class ActionDrawLineTangent1: public ActionInterface
19 {
20         private:
21                 enum Status {
22                         SetPoint,     /**< Choose the startpoint. */
23                         SetCircle      /**< Choose the circle / arc. */
24                 };
25
26         public:
27                 ActionDrawLineTangent1(EntityContainer & container, GraphicView & graphicView);
28                 ~ActionDrawLineTangent1();
29
30                 virtual void trigger();
31                 virtual void mouseMoveEvent(QMouseEvent * e);
32                 virtual void mouseReleaseEvent(QMouseEvent * e);
33                 virtual void coordinateEvent(Vector * e);
34                 virtual void updateMouseButtonHints();
35                 virtual void updateMouseCursor();
36                 virtual void updateToolBar();
37
38         private:
39                 /** Closest tangent. */
40                 Line * tangent;
41                 /** Chosen startpoint */
42                 Vector point;
43                 /** Chosen entity */
44                 Entity * circle;
45                 /** Data of new tangent */
46                 LineData data;
47 };
48
49 #endif  // __ACTIONDRAWLINETANGENT1_H__