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: |
|
15 * |
|
16 */ |
|
17 #include <QtGui> |
|
18 #include <QTranslator> |
|
19 |
|
20 #include <hbapplication.h> |
|
21 #include <hbinstance.h> |
|
22 |
|
23 #include "cbsuimainwindow.h" |
|
24 #include "cbslog.h" |
|
25 |
|
26 int main(int argc, char *argv[]) |
|
27 { |
|
28 LOG(NORMAL,"CBSUI: main IN"); |
|
29 |
|
30 // Initialization |
|
31 HbApplication app(argc, argv); |
|
32 |
|
33 QTranslator translator; |
|
34 bool ok = translator.load(":/translations/cbsui_en"); |
|
35 LOG2(NORMAL, "CBSUI: main, translation %d (1=OK, 0=fail)", ok ) |
|
36 app.installTranslator(&translator); |
|
37 |
|
38 // Main window widget. |
|
39 // Includes decorators such as signal strength and battery life indicator. |
|
40 CbsUiMainWindow mainWindow; |
|
41 #ifndef __WINSCW |
|
42 LOG(NORMAL,"CBSUI: main set LANDSCAPE mode"); |
|
43 hbInstance->setOrientation(Qt::Horizontal); |
|
44 #endif |
|
45 mainWindow.show(); |
|
46 LOG(NORMAL,"CBSUI: main mainwindow show over"); |
|
47 // Enter event loop |
|
48 int result = app.exec(); |
|
49 LOG2(NORMAL,"CBSUI: main exit %d", result); |
|
50 return result; |
|
51 } |
|