calendarui/application/src/main.cpp
changeset 26 a949c2543c15
parent 23 fd30d51f876b
child 49 5de72ea7a065
equal deleted inserted replaced
23:fd30d51f876b 26:a949c2543c15
    29     {
    29     {
    30     HbApplication app(argc, argv);
    30     HbApplication app(argc, argv);
    31     
    31     
    32     // Main window for providing the scene context
    32     // Main window for providing the scene context
    33 	HbMainWindow window;
    33 	HbMainWindow window;
    34 	window.setRenderHints(
       
    35 			QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
       
    36 	window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
       
    37 	
    34 	
    38     //For translation, loading and installing translator
    35     //For translation, loading and installing translator
    39 	QTranslator translator;
    36 	QTranslator translator;
    40     QString lang = QLocale::system().name();
    37     QString lang = QLocale::system().name();
    41     QString path = "Z:/resource/qt/translations/";
    38     QString path = "Z:/resource/qt/translations/";
    42     // TODO: Load the appropriate .qm file based on locale
    39     // TODO: Load the appropriate .qm file based on locale
    43     //bool loaded = translator.load("calendar_" + lang, path);
       
    44     bool loaded = translator.load("calendar_en_GB",":/translations");
    40     bool loaded = translator.load("calendar_en_GB",":/translations");
    45     app.installTranslator(&translator);
    41     app.installTranslator(&translator);
    46 
    42 
    47     //Backup and restore code  need to write here.
    43     //Backup and restore code  need to write here.
    48 	
    44 	
    54     CalenServiceProvider service(controller);
    50     CalenServiceProvider service(controller);
    55     
    51     
    56     int retValue = app.exec();
    52     int retValue = app.exec();
    57     
    53     
    58     // delete the controller
    54     // delete the controller
       
    55     controller->ReleaseCustomisations();
    59     controller->Release();
    56     controller->Release();
    60     
    57     
    61     return retValue;
    58     return retValue;
    62     }
    59     }
    63 
    60