]> Shamusworld >> Repos - architektonas/blob - src/actions/actiondimleader.h
Last checkin before major refactor...
[architektonas] / src / actions / actiondimleader.h
1 #ifndef __ACTIONDIMLEADER_H__
2 #define __ACTIONDIMLEADER_H__
3
4 #include <QtCore>
5 #include "actioninterface.h"
6 #include "rs_leader.h"
7
8 class Vector;
9
10 /**
11  * This action class can handle user events to draw leaders (arrows).
12  *
13  * @author James Hammons
14  * @author Andrew Mustun
15  */
16 class ActionDimLeader: public ActionInterface
17 {
18         public:
19                 /**
20                  * Action States.
21                  */
22                 enum Status {
23                         SetStartpoint,   /**< Setting the startpoint.  */
24                         SetEndpoint      /**< Setting the endpoint. */
25                 };
26
27         public:
28                 ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView);
29                 ~ActionDimLeader();
30
31                 virtual RS2::ActionType rtti();
32                 void reset();
33                 virtual void init(int status = 0);
34                 virtual void trigger();
35                 virtual void mouseMoveEvent(QMouseEvent * e);
36                 virtual void mouseReleaseEvent(QMouseEvent * e);
37                 virtual void keyPressEvent(QKeyEvent *);
38                 virtual void coordinateEvent(Vector * e);
39                 virtual void commandEvent(RS_CommandEvent * e);
40                 virtual QStringList getAvailableCommands();
41                 virtual void showOptions();
42                 virtual void hideOptions();
43                 virtual void updateMouseButtonHints();
44                 virtual void updateMouseCursor();
45                 virtual void updateToolBar();
46
47         protected:
48                 /**
49                  * Leader entity.
50                  */
51                 RS_Leader * leader;
52                 /**
53                  * Points set so far.
54                  */
55                 //      Q3PtrList<Vector> points;
56                 QList<Vector *> points;
57 };
58
59 #endif  // __ACTIONDIMLEADER_H__