X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Feventhandler.h;h=203e9b4a4ead5c87eaa828acf27bcc08ef7152af;hb=bfd926cd5fd98e95b8b172fabd5340c9b1957e01;hp=aab7f3931d2eed39ed2800a025e0b498902504c2;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/base/eventhandler.h b/src/base/eventhandler.h index aab7f39..203e9b4 100644 --- a/src/base/eventhandler.h +++ b/src/base/eventhandler.h @@ -2,12 +2,11 @@ #define __EVENTHANDLER_H__ #include -#include "rs.h" #define RS_MAXACTIONS 16 class ActionInterface; -class RS_CommandEvent; +class CommandEvent; class GraphicView; /** @@ -15,38 +14,35 @@ class GraphicView; * active. All events going from the view to the actions come over * this class. */ -class RS_EventHandler +class EventHandler { public: - RS_EventHandler(GraphicView * graphicView); - ~RS_EventHandler(); + EventHandler(); + ~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(ActionInterface * action); - ActionInterface * getDefaultAction(); - void setCurrentAction(ActionInterface * action); - ActionInterface * getCurrentAction(); - void killSelectActions(); - void killAllActions(); - bool hasAction(); - void cleanUp(); - void debugActions(); - void setSnapMode(RS2::SnapMode sm); - void setSnapRestriction(RS2::SnapRestriction sr); + 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 HandleCommandEvent(GraphicView *, CommandEvent * e); + void EnableCoordinateInput(); + void DisableCoordinateInput(); + void SetDefaultAction(ActionInterface * action); + ActionInterface * GetDefaultAction(); + void SetCurrentAction(ActionInterface * action); + ActionInterface * GetCurrentAction(); + void KillSelectActions(); + void KillAllActions(); + bool HasAction(); + void CleanUp(); + void DebugActions(); protected: - GraphicView * graphicView; ActionInterface * defaultAction; ActionInterface * currentActions[RS_MAXACTIONS]; int actionIndex;