]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionselectwindow.h
62aafc7a78dd3ad519a4e1205f27ed75ff92f0a4
[architektonas] / src / actions / rs_actionselectwindow.h
1 #ifndef RS_ACTIONSELECTWINDOW_H
2 #define RS_ACTIONSELECTWINDOW_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_ActionSelectWindow: public RS_PreviewActionInterface
13 {
14         public:
15                 /**
16                  * Action States.
17                  */
18                 enum Status {
19                         SetCorner1, /**< Setting the 1st corner of the window.  */
20                         SetCorner2 /**< Setting the 2nd corner of the window. */
21                 };
22
23         public:
24                 RS_ActionSelectWindow(RS_EntityContainer & container, GraphicView & graphicView, bool select);
25                 ~RS_ActionSelectWindow();
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