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