phoneapp/phoneui2/src/phoneapplication.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 04 Oct 2010 00:16:48 +0300
changeset 77 2be0b271d017
child 76 cfea66083b62
permissions -rw-r--r--
Revision: 201037 Kit: 201039

/*
* 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