clock/clockui/clockapplication/src/main.cpp
changeset 55 2c54b51f39c4
parent 45 b6db4fd4947b
child 57 bb2d3e476f29
equal deleted inserted replaced
51:0b38fc5b94c6 55:2c54b51f39c4
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // System includes
    18 // System includes
    19 #include <QtGui>
    19 #include <QtGui>
    20 #include <QScopedPointer>
       
    21 #include <HbTranslator>
    20 #include <HbTranslator>
    22 #include <HbApplication>
       
    23 #include <HbMainWindow>
    21 #include <HbMainWindow>
    24 
    22 
    25 // User includes
    23 // User includes
    26 #include "clockappcontroller.h"
    24 #include "clockapplication.h"
    27 
    25 
    28 /*!
    26 /*!
    29 	The main entry point of the clock application.
    27 	The main entry point of the clock application.
    30 
    28 
    31 	Constructs the view manager object.
    29 	Constructs the view manager object.
    32  */
    30  */
    33 int main(int argc, char *argv[])
    31 int main(int argc, char *argv[])
    34 {
    32 {
    35 	// Initialization
    33 	// Create and initialize an ClockApplication instance
    36 	HbApplication app(argc, argv);
    34 	QScopedPointer<ClockApplication> application(
    37 
    35 				new ClockApplication(argc, argv));
       
    36 	
    38 	// Main window widget.
    37 	// Main window widget.
    39 	// Includes decorator such as signal strength and battery life indicator.
    38 	// Includes decorator such as signal strength and battery life indicator.
    40 	HbMainWindow window;
    39 	HbMainWindow window;
    41 	window.setRenderHints(
    40 	window.setRenderHints(
    42 			QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform);
    41 			QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform);
    45 	// Load the translation file.
    44 	// Load the translation file.
    46 	HbTranslator translator("clock");
    45 	HbTranslator translator("clock");
    47 	translator.loadCommon();
    46 	translator.loadCommon();
    48 	
    47 	
    49 	// Construct the application controller.
    48 	// Construct the application controller.
    50 	QScopedPointer<ClockAppController> controller(new ClockAppController);
    49 	application->createController();
    51 	Q_UNUSED(controller)
       
    52 
    50 
    53 	// Show widget
    51 	// Show widget
    54 	window.show();
    52 	window.show();
    55 
    53 
    56 	// Enter event loop
    54 	// Start the event loop for the application
    57 	return app.exec();
    55 	return application->execution();
    58 }
    56 }
    59 
    57 
    60 // End of file	--Don't remove this.
    58 // End of file	--Don't remove this.