notes/notesui/notesapplication/src/main.cpp
branchRCL_3
changeset 65 12af337248b1
equal deleted inserted replaced
60:96907930389d 65:12af337248b1
       
     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 notes application.
       
    15 *
       
    16 */
       
    17 
       
    18 // System includes
       
    19 #include <hbmainwindow.h>
       
    20 #include <hbtranslator.h>
       
    21 
       
    22 // User includes
       
    23 #include "notesapplication.h"
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "mainTraces.h"
       
    27 #endif
       
    28 
       
    29 
       
    30 /*!
       
    31 	The main() function.
       
    32 
       
    33 	Responsible for constructing the NotesApplication object and showing the
       
    34 	main window.
       
    35  */
       
    36 int main(int argc, char *argv[])
       
    37 {
       
    38 	OstTraceFunctionEntry0( _MAIN_ENTRY );
       
    39 	// Create and initialize an NotesApplication instance
       
    40 	QScopedPointer<NotesApplication> application(
       
    41 			new NotesApplication(argc, argv));
       
    42 	//NotesApplication *application = new NotesApplication(argc, argv);
       
    43 
       
    44 	// Main window for providing the scene context
       
    45 	HbMainWindow window;
       
    46 	window.setRenderHints(
       
    47 			QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
       
    48 	window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
       
    49 
       
    50 	// Load the translation file.
       
    51 	HbTranslator notesViewsTranslator("notes");
       
    52 	notesViewsTranslator.loadCommon();
       
    53 
       
    54 	// Construct the application controller.
       
    55 	application->createController();
       
    56 	
       
    57 	// Show the main window.
       
    58 	window.show();
       
    59 	
       
    60 	// Start the event loop for the application
       
    61 	return application->execution();
       
    62 }
       
    63 
       
    64 // End of file	--Don't remove this.