X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Frs_eventhandler.h;h=55e0dc7ffcf20572227800ef1383e2bbb417571f;hb=d774c2655ba2c3657a565f325411144452392277;hp=ff92d5d81577b6addcd69dc99f91a2f309774281;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/base/rs_eventhandler.h b/src/base/rs_eventhandler.h index ff92d5d..55e0dc7 100644 --- a/src/base/rs_eventhandler.h +++ b/src/base/rs_eventhandler.h @@ -1,11 +1,14 @@ #ifndef RS_EVENTHANDLER_H #define RS_EVENTHANDLER_H -#include "rs_actioninterface.h" +#include +#include "rs.h" #define RS_MAXACTIONS 16 -class RS_ActionInterface; +class ActionInterface; +class RS_CommandEvent; +class GraphicView; /** * The event handler owns and manages all actions that are currently @@ -15,34 +18,27 @@ class RS_ActionInterface; class RS_EventHandler { public: - RS_EventHandler(RS_GraphicView * graphicView); + RS_EventHandler(GraphicView * graphicView); ~RS_EventHandler(); void back(); void enter(); - void mousePressEvent(QMouseEvent * e); void mouseReleaseEvent(QMouseEvent * e); void mouseMoveEvent(QMouseEvent * e); void mouseLeaveEvent(); void mouseEnterEvent(); - void keyPressEvent(QKeyEvent * e); void keyReleaseEvent(QKeyEvent * e); - void commandEvent(RS_CommandEvent * e); void enableCoordinateInput(); void disableCoordinateInput(); - - void setDefaultAction(RS_ActionInterface * action); - RS_ActionInterface * getDefaultAction(); - - void setCurrentAction(RS_ActionInterface * action); - RS_ActionInterface * getCurrentAction(); - + void setDefaultAction(ActionInterface * action); + ActionInterface * getDefaultAction(); + void setCurrentAction(ActionInterface * action); + ActionInterface * getCurrentAction(); void killSelectActions(); void killAllActions(); - bool hasAction(); void cleanUp(); void debugActions(); @@ -50,9 +46,9 @@ class RS_EventHandler void setSnapRestriction(RS2::SnapRestriction sr); protected: - RS_GraphicView * graphicView; - RS_ActionInterface * defaultAction; - RS_ActionInterface * currentActions[RS_MAXACTIONS]; + GraphicView * graphicView; + ActionInterface * defaultAction; + ActionInterface * currentActions[RS_MAXACTIONS]; int actionIndex; bool coordinateInputEnabled; };