videoplayerapp/hbvideoplayer/src/main.cpp
changeset 30 4f111d64a341
child 34 bbb98528c666
equal deleted inserted replaced
2:dec420019252 30:4f111d64a341
       
     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 main.cpp
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: 8 %
       
    19 
       
    20 
       
    21 #include <QObject>
       
    22 #include <hbapplication.h>
       
    23 #include <hbmainwindow.h>
       
    24 #include <xqserviceutil.h>
       
    25 
       
    26 #include "videoplayerengine.h"
       
    27 
       
    28 int main(int argc, char *argv[])
       
    29 {
       
    30     HbApplication app(argc, argv);
       
    31 
       
    32     // has the application been launched via XQ Service Framework
       
    33     bool isService = XQServiceUtil::isService(); 
       
    34     
       
    35      if (!isService)
       
    36      {
       
    37     	 app.setApplicationName( QObject::tr("Videos") );
       
    38      }
       
    39 
       
    40     HbMainWindow mainWindow( 0, Hb::WindowFlagTransparent );
       
    41     mainWindow.setAttribute( Qt::WA_OpaquePaintEvent );
       
    42     
       
    43     QVideoPlayerEngine *engine = new QVideoPlayerEngine(isService);
       
    44     engine->initialize();
       
    45     mainWindow.show();
       
    46     return app.exec();
       
    47    
       
    48 }