]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionselectintersected.h
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionselectintersected.h
1 #ifndef RS_ACTIONSELECTINTERSECTED_H
2 #define RS_ACTIONSELECTINTERSECTED_H
3
4 #include "rs_previewactioninterface.h"
5 #include "vector.h"
6
7 /**
8  * This action class can handle user events to select all entities.
9  *
10  * @author Andrew Mustun
11  */
12 class RS_ActionSelectIntersected: public RS_PreviewActionInterface
13 {
14         public:
15                 /**
16                  * Action States.
17                  */
18                 enum Status {
19                         SetPoint1, /**< Setting the 1st corner of the window.  */
20                         SetPoint2 /**< Setting the 2nd corner of the window. */
21                 };
22
23         public:
24                 RS_ActionSelectIntersected(RS_EntityContainer & container, RS_GraphicView & graphicView, bool select);
25                 ~RS_ActionSelectIntersected();
26
27                 virtual RS2::ActionType rtti();
28                 virtual void init(int status = 0);
29                 virtual void trigger();
30                 virtual void mouseMoveEvent(QMouseEvent * e);
31                 virtual void mousePressEvent(QMouseEvent * e);
32                 virtual void mouseReleaseEvent(QMouseEvent * e);
33                 virtual void updateMouseButtonHints();
34                 virtual void updateMouseCursor();
35                 virtual void updateToolBar();
36
37         protected:
38                 Vector v1;
39                 Vector v2;
40
41                 bool select;
42 };
43
44 #endif