phoneapp/phoneui2/src/phoneuikeyeventadapter.cpp
changeset 22 6bb1b21d2484
parent 21 92ab7f8d0eab
child 27 2f8f8080a020
--- a/phoneapp/phoneui2/src/phoneuikeyeventadapter.cpp	Fri Mar 19 09:28:42 2010 +0200
+++ b/phoneapp/phoneui2/src/phoneuikeyeventadapter.cpp	Fri Apr 16 14:58:25 2010 +0300
@@ -17,14 +17,13 @@
 */
 
 #include <exception> // must be before e32base.h so uncaught_exception gets defined
+#include <qkeyevent>
 #include "phoneuikeyeventadapter.h"
 #include "phoneconstants.h"
-#include <QKeyEvent>
 
 PhoneUIKeyEventAdapter::PhoneUIKeyEventAdapter (MPhoneKeyEventHandler &keyEventHandler, QObject *parent) :
-    QObject (parent), m_handler (keyEventHandler)
+    QObject (parent), mHandler (keyEventHandler)
 {
-
 }
 
 PhoneUIKeyEventAdapter::~PhoneUIKeyEventAdapter ()
@@ -50,8 +49,7 @@
     symbianKeyEvent.iRepeats = 0;
     symbianKeyEvent.iScanCode = convertKeyCode(event);
     
-    TRAP_IGNORE(m_handler.HandleKeyEventL (symbianKeyEvent, symbianEventCode));
-    
+    TRAP_IGNORE(mHandler.HandleKeyEventL (symbianKeyEvent, symbianEventCode));  
 }
 
 int PhoneUIKeyEventAdapter::convertKeyCode(QKeyEvent *event)
@@ -75,7 +73,16 @@
             code = event->key();
             break;
         }
-
-    
+ 
     return code;
 }
+
+void PhoneUIKeyEventAdapter::endKeyLongPress()
+{
+    TKeyEvent symbianKeyEvent;
+    symbianKeyEvent.iCode = EKeyNo;
+    symbianKeyEvent.iRepeats = 0;
+    symbianKeyEvent.iScanCode = EKeyNo;
+    
+    TRAP_IGNORE(mHandler.HandleKeyEventL (symbianKeyEvent, (TEventCode)EEventLongPress));      
+}