calendarui/application/src/main.cpp
changeset 55 2c54b51f39c4
parent 45 b6db4fd4947b
child 57 bb2d3e476f29
equal deleted inserted replaced
51:0b38fc5b94c6 55:2c54b51f39c4
    13 *
    13 *
    14 * Description:  main implementation.
    14 * Description:  main implementation.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 // system includes
    19 #include <QtGui>
    19 #include <QtGui>
    20 #include <xqserviceutil.h>
       
    21 #include <hbapplication.h>
       
    22 #include <hbmainwindow.h>
    20 #include <hbmainwindow.h>
    23 #include <hbtranslator.h>
    21 #include <hbtranslator.h>
    24 #include "calencontroller.h"
       
    25 #include "calenserviceprovider.h"
       
    26 
    22 
       
    23 // user includes
       
    24 #include "calenapplication.h"
    27 
    25 
    28  int main(int argc, char *argv[])
    26 /*!
    29     {
    27 	The main() function.
    30     HbApplication app(argc, argv);
    28 
    31     
    29 	Responsible for constructing the CalenApplication object and showing the
    32     // Main window for providing the scene context
    30 	main window.
       
    31  */
       
    32 int main(int argc, char *argv[])
       
    33 {
       
    34 	// Create and initialize an CalenApplication instance
       
    35 	QScopedPointer<CalenApplication> application(
       
    36 				new CalenApplication(argc, argv));
       
    37 	//CalenApplication *application = new CalenApplication(argc, argv);
       
    38 
       
    39 	// Main window for providing the scene context
    33 	HbMainWindow window;
    40 	HbMainWindow window;
    34 	
    41 	
    35     //For translation, loading and installing translator
    42 	//For translation, loading and installing translator
    36 	HbTranslator translator("calendar");
    43 	HbTranslator translator("calendar");
    37 	translator.loadCommon();
    44 	translator.loadCommon();
    38 	
    45 	
    39     // Backup and restore code need to write here.
    46 	// Backup and restore code need to write here.
    40 	
    47 	
    41     CCalenController *controller = new CCalenController();
    48 	application->createController();
    42 
    49 
    43 	int retValue = 0;
    50 	int retValue = 0;
    44 	if (controller) {
    51 	
    45 	    controller->constructController();
    52 	retValue = application->execution();
    46     	// Create the Calendar service provider
    53 	application->releaseController();
    47 	    CalenServiceProvider service(controller);
    54 	
    48     
    55 	return retValue;
    49     	retValue = app.exec();
    56 }
    50     
       
    51 	    // delete the controller
       
    52     	controller->ReleaseCustomisations();
       
    53 	    controller->Release();
       
    54 	}
       
    55     return retValue;
       
    56     }
       
    57 
    57 
       
    58 //End of file
    58 
    59 
    59  //End of file