htiui/HtiAdminQt/main.cpp
branchRCL_3
changeset 11 454d022d514b
equal deleted inserted replaced
9:404ad6c9bc20 11:454d022d514b
       
     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:  Implementation of HtiAdmin main.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <hbmainwindow.h>
       
    19 //#include <hbview.h>
       
    20 #include <coecntrl.h>
       
    21 #include <hbapplication.h>
       
    22 
       
    23 
       
    24 #include "mainview.h"
       
    25 #include "htienginewrapper.h"
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 
       
    31 int main(int argc, char *argv[])
       
    32 {
       
    33 	// Initialization
       
    34     HbApplication app(argc, argv);
       
    35     
       
    36     // Create HtiEngineWrapper
       
    37     HtiEngineWrapper engineWrapper;
       
    38     
       
    39     if (!engineWrapper.init()) {
       
    40             return EXIT_FAILURE;
       
    41         }
       
    42  
       
    43     // Main window widget. 
       
    44     // Includes decorators such as signal strength and battery life indicator.
       
    45     HbMainWindow mainWindow;
       
    46 
       
    47     //Create main view
       
    48 	MainView* view = new MainView(mainWindow, engineWrapper);
       
    49 
       
    50 	//initialize main view
       
    51 	view->init(app);
       
    52 	
       
    53 	// Add View to main window and reveal it.
       
    54 	mainWindow.addView(view);
       
    55 
       
    56     // Show widget
       
    57     //mainWindow.show();
       
    58     mainWindow.showFullScreen();
       
    59 
       
    60     int result = app.exec();
       
    61       
       
    62     return result;
       
    63 }