equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <QSymbianEvent> |
|
19 |
|
20 #include "application.h" |
|
21 |
|
22 #ifdef Q_OS_SYMBIAN |
|
23 #include <w32std.h> |
|
24 |
|
25 #endif |
|
26 |
|
27 Application::Application(int &argc, char *argv[]) : |
|
28 HbApplication(argc, argv) |
|
29 { |
|
30 } |
|
31 |
|
32 #ifdef Q_OS_SYMBIAN |
|
33 bool Application::symbianEventFilter(const QSymbianEvent * event) |
|
34 { |
|
35 if (event->type() == QSymbianEvent::WindowServerEvent) |
|
36 { |
|
37 const TWsEvent *aEvent = event->windowServerEvent(); |
|
38 |
|
39 if (aEvent->Type() == EEventFocusLost) { |
|
40 emit foregroundEvent(false); |
|
41 } |
|
42 |
|
43 if (aEvent->Type() == EEventFocusGained) { |
|
44 emit foregroundEvent(true); |
|
45 } |
|
46 } |
|
47 return HbApplication::symbianEventFilter(event); |
|
48 } |
|
49 #endif |
|