|
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 */ |
|
18 |
|
19 #include <QApplication> |
|
20 |
|
21 #include <hbapplication.h> |
|
22 #include <hbmainwindow.h> |
|
23 #include <QTranslator> |
|
24 #include "satappmainhandler.h" |
|
25 |
|
26 #include "tflogger.h" |
|
27 |
|
28 int main(int argc, char *argv[]) |
|
29 { |
|
30 TFLOGSTRING("SATAPP: main") |
|
31 |
|
32 HbApplication app(argc, argv); |
|
33 TFLOGSTRING("SATAPP: main app created") |
|
34 |
|
35 QTranslator translator; |
|
36 bool ok = translator.load(":/translations/satapp_en"); |
|
37 TFLOGSTRING2("SATUI: main, translation %d (1=OK, 0=fail)", ok ) |
|
38 app.installTranslator(&translator); |
|
39 |
|
40 HbMainWindow window; |
|
41 TFLOGSTRING("SATAPP: main window created") |
|
42 |
|
43 // the code is only for test, currently, dphone79 only support |
|
44 // lanscape, remove it before official release |
|
45 #ifndef __WINSCW |
|
46 //window.setOrientation(Qt::Horizontal); |
|
47 #endif |
|
48 |
|
49 SatAppMainHandler *mainHandler = new SatAppMainHandler(window); |
|
50 |
|
51 window.show(); |
|
52 TFLOGSTRING("SATAPP: main view showed") |
|
53 |
|
54 int result = app.exec(); |
|
55 TFLOGSTRING2("SATAPP: main exit %d", result) |
|
56 |
|
57 delete mainHandler; |
|
58 return result; |
|
59 } |
|
60 |
|
61 //End of file |