From d593fa58e641aa90d7e1f0759299c59d2665cca6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 31 May 2014 13:41:23 +0300 Subject: Move keyeventtype into separate file. --- src/events/keyevent.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/events/keyevent.h') diff --git a/src/events/keyevent.h b/src/events/keyevent.h index 16bc707c1..03e85438e 100644 --- a/src/events/keyevent.h +++ b/src/events/keyevent.h @@ -64,7 +64,9 @@ #ifndef EVENTS_KEYEVENT_H #define EVENTS_KEYEVENT_H +#include "events/keyeventtype.h" #include "events/inputguievent.h" + #include "input/key.h" #include @@ -77,15 +79,6 @@ class Widget; class KeyEvent: public InputGuiEvent { public: - /** - * Key event types. - */ - enum - { - PRESSED = 0, - RELEASED - }; - /** * Constructor. * @@ -95,7 +88,7 @@ class KeyEvent: public InputGuiEvent * @param key The key of the event. */ KeyEvent(Widget *const source, - const unsigned int type, + KeyEventType::Type type, const int actionId, const Key &key) : InputGuiEvent(source), @@ -118,7 +111,7 @@ class KeyEvent: public InputGuiEvent * * @return The type of the event. */ - unsigned int getType() const A_WARN_UNUSED + KeyEventType::Type getType() const A_WARN_UNUSED { return mType; } /** @@ -153,7 +146,7 @@ class KeyEvent: public InputGuiEvent /** * Holds the type of the key event. */ - unsigned int mType; + KeyEventType::Type mType; int mActionId; }; -- cgit v1.2.3-70-g09d2