messagingapp/msgui/msgapp/src/msgapplication.cpp
changeset 76 60a8a215b0ec
parent 67 fc91263aee62
equal deleted inserted replaced
73:ecf6a73a9186 76:60a8a215b0ec
    16 */
    16 */
    17 
    17 
    18 //include
    18 //include
    19 #include <hbmainwindow.h>
    19 #include <hbmainwindow.h>
    20 #include <hbinstance.h>
    20 #include <hbinstance.h>
       
    21 #include <EIKENV.H>
       
    22 #include <QSymbianEvent>
    21 
    23 
    22 //userinclude
    24 //userinclude
    23 #include "msgapplication.h"
    25 #include "msgapplication.h"
    24 #include "debugtraces.h"
    26 #include "debugtraces.h"
    25 
    27 
    45 	QDEBUG_WRITE("MsgApplication::handleAppReady:applicationReady signal is emited")
    47 	QDEBUG_WRITE("MsgApplication::handleAppReady:applicationReady signal is emited")
    46 	emit applicationReady();
    48 	emit applicationReady();
    47 	HbMainWindow *window = hbInstance->allMainWindows().first();
    49 	HbMainWindow *window = hbInstance->allMainWindows().first();
    48 	disconnect(window, SIGNAL(viewReady()),this,SLOT(handleAppReady()));
    50 	disconnect(window, SIGNAL(viewReady()),this,SLOT(handleAppReady()));
    49 	}
    51 	}
       
    52 
       
    53 /*
       
    54  * Overloaded method
       
    55  * handles S60 events
       
    56  */
       
    57 bool MsgApplication::symbianEventFilter(const QSymbianEvent *event)
       
    58 {
       
    59     QSymbianEvent::Type eventType = event->type();
       
    60     
       
    61     // handle close event
       
    62     if (eventType == QSymbianEvent::CommandEvent && 
       
    63             event->command() == EEikCmdExit) {
       
    64         emit closeEvent();
       
    65         return true;
       
    66     }
       
    67     return false;
       
    68 }
       
    69