]> Shamusworld >> Repos - architektonas/blobdiff - src/base/rs_eventhandler.h
In the middle of major refactoring...
[architektonas] / src / base / rs_eventhandler.h
index ff92d5d81577b6addcd69dc99f91a2f309774281..55e0dc7ffcf20572227800ef1383e2bbb417571f 100644 (file)
@@ -1,11 +1,14 @@
 #ifndef RS_EVENTHANDLER_H
 #define RS_EVENTHANDLER_H
 
-#include "rs_actioninterface.h"
+#include <QtGui>
+#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;
 };