--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneapp/phoneui2/src/phoneapplication.cpp Mon Oct 04 00:16:48 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Phone application class
+*
+*/
+
+#include "phoneapplication.h"
+
+#ifdef Q_OS_SYMBIAN
+#include <QSymbianEvent>
+#include <w32std.h>
+#endif
+
+PhoneApplication::PhoneApplication(
+ int &argc,
+ char *argv[],
+ Hb::ApplicationFlags flags):
+ HbApplication(argc, argv, flags)
+{
+}
+
+#ifdef Q_OS_SYMBIAN
+bool PhoneApplication::symbianEventFilter(const QSymbianEvent *event)
+{
+ if (event->type() == QSymbianEvent::WindowServerEvent){
+ const TWsEvent *wsevent = event->windowServerEvent();
+ switch( wsevent->Type()){
+ case EEventFocusGained:
+ emit focusGained();
+ break;
+ case EEventFocusLost:
+ emit focusLost();
+ break;
+ default:
+ break;
+ }
+ }
+ return HbApplication::symbianEventFilter(event);
+}
+#endif