74
|
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();
|
76
|
38 |
if ( wsevent->Type() == EEventWindowVisibilityChanged ){
|
|
39 |
TUint visible = wsevent->VisibilityChanged()->iFlags;
|
78
|
40 |
if ( visible & TWsVisibilityChangedEvent::EPartiallyVisible ){
|
74
|
41 |
emit focusGained();
|
76
|
42 |
}else if (visible & TWsVisibilityChangedEvent::ENotVisible){
|
74
|
43 |
emit focusLost();
|
76
|
44 |
}
|
74
|
45 |
}
|
|
46 |
}
|
|
47 |
return HbApplication::symbianEventFilter(event);
|
|
48 |
}
|
|
49 |
#endif
|