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