1 #ifndef __EVENTHANDLER_H__
2 #define __EVENTHANDLER_H__
7 #define RS_MAXACTIONS 16
10 class RS_CommandEvent;
14 * The event handler owns and manages all actions that are currently
15 * active. All events going from the view to the actions come over
21 RS_EventHandler(GraphicView * graphicView);
26 void mousePressEvent(QMouseEvent * e);
27 void mouseReleaseEvent(QMouseEvent * e);
28 void mouseMoveEvent(QMouseEvent * e);
29 void mouseLeaveEvent();
30 void mouseEnterEvent();
31 void keyPressEvent(QKeyEvent * e);
32 void keyReleaseEvent(QKeyEvent * e);
33 void commandEvent(RS_CommandEvent * e);
34 void enableCoordinateInput();
35 void disableCoordinateInput();
36 void setDefaultAction(ActionInterface * action);
37 ActionInterface * getDefaultAction();
38 void setCurrentAction(ActionInterface * action);
39 ActionInterface * getCurrentAction();
40 void killSelectActions();
41 void killAllActions();
45 void setSnapMode(RS2::SnapMode sm);
46 void setSnapRestriction(RS2::SnapRestriction sr);
49 GraphicView * graphicView;
50 ActionInterface * defaultAction;
51 ActionInterface * currentActions[RS_MAXACTIONS];
53 bool coordinateInputEnabled;
56 #endif // __EVENTHANDLER_H__