phoneapp/phoneui2/src/phoneapplication.cpp
changeset 77 2be0b271d017
child 76 cfea66083b62
equal deleted inserted replaced
72:c76a0b1755b9 77:2be0b271d017
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Phone application class
       
    15 *
       
    16 */
       
    17 
       
    18 #include "phoneapplication.h"
       
    19 
       
    20 #ifdef Q_OS_SYMBIAN
       
    21 #include <QSymbianEvent>
       
    22 #include <w32std.h>
       
    23 #endif
       
    24 
       
    25 PhoneApplication::PhoneApplication(
       
    26         int &argc, 
       
    27         char *argv[], 
       
    28         Hb::ApplicationFlags flags):
       
    29     HbApplication(argc, argv, flags)
       
    30 {
       
    31 }
       
    32 
       
    33 #ifdef Q_OS_SYMBIAN
       
    34 bool PhoneApplication::symbianEventFilter(const QSymbianEvent *event)
       
    35 {
       
    36     if (event->type() == QSymbianEvent::WindowServerEvent){
       
    37         const TWsEvent *wsevent = event->windowServerEvent();
       
    38         switch( wsevent->Type()){
       
    39             case EEventFocusGained:
       
    40                 emit focusGained();
       
    41                 break;
       
    42             case EEventFocusLost:
       
    43                 emit focusLost();
       
    44                 break;
       
    45             default:
       
    46                 break;
       
    47         }
       
    48     }
       
    49     return HbApplication::symbianEventFilter(event);
       
    50 }
       
    51 #endif