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