|
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: Contains main, the entry point for clock application. |
|
15 * |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include <QtGui> |
|
20 #include <QScopedPointer> |
|
21 #include <QTranslator> |
|
22 #include <HbApplication> |
|
23 #include <HbMainWindow> |
|
24 |
|
25 // User includes |
|
26 #include "clockappcontroller.h" |
|
27 |
|
28 /*! |
|
29 The main entry point of the clock application. |
|
30 |
|
31 Constructs the view manager object. |
|
32 */ |
|
33 int main(int argc, char *argv[]) |
|
34 { |
|
35 qDebug("clock: main() -->"); |
|
36 |
|
37 // Initialization |
|
38 HbApplication app(argc, argv); |
|
39 |
|
40 // Main window widget. |
|
41 // Includes decorator such as signal strength and battery life indicator. |
|
42 HbMainWindow window; |
|
43 window.setRenderHints( |
|
44 QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform); |
|
45 window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate); |
|
46 |
|
47 // Load the translation file. |
|
48 QTranslator translator; |
|
49 translator.load("clock", ":/translations"); |
|
50 app.installTranslator(&translator); |
|
51 |
|
52 // Construct the application controller. |
|
53 QScopedPointer<ClockAppController> controller(new ClockAppController); |
|
54 Q_UNUSED(controller) |
|
55 |
|
56 // Show widget |
|
57 window.show(); |
|
58 |
|
59 qDebug("clock: main() <--"); |
|
60 |
|
61 // Enter event loop |
|
62 return app.exec(); |
|
63 } |
|
64 |
|
65 // End of file --Don't remove this. |