videoplayerapp/videoplayerengine/tsrc/testvideoplayerengine/stub/src/hbinstance.cpp
changeset 35 3738fe97f027
child 17 69946d1824c4
equal deleted inserted replaced
34:bbb98528c666 35:3738fe97f027
       
     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:  Stub-implementation of HbInstance
       
    15 *
       
    16 */
       
    17 
       
    18 #include "stub/inc/hbinstance.h"
       
    19 #include <hbmainwindow.h>
       
    20 
       
    21 bool initialised = false;
       
    22 HbInstance* mInstance = 0;
       
    23 QList<HbInstance *> mInstances;
       
    24 
       
    25 HbInstance::HbInstance()
       
    26 {
       
    27 }
       
    28 
       
    29 HbInstance::~HbInstance()
       
    30 {
       
    31 }
       
    32 
       
    33 HbInstance* HbInstance::instance()
       
    34 {
       
    35     if (!initialised)
       
    36     {
       
    37     	mInstance = new HbInstance();  
       
    38     	initialised = true;
       
    39     	mInstances.append(mInstance);
       
    40     }
       
    41     return mInstance;
       
    42 }
       
    43 
       
    44 HbInstance* HbInstance::primaryWindow() const
       
    45 {
       
    46 	return mInstance;
       
    47 }
       
    48 
       
    49 QList<HbInstance *> HbInstance::allMainWindows() const
       
    50 {
       
    51 	return mInstances;
       
    52 }
       
    53 
       
    54 void HbInstance::removeView( QGraphicsWidget* )
       
    55 {
       
    56 }
       
    57 
       
    58 void HbInstance::addView( QGraphicsWidget* )
       
    59 {
       
    60 }
       
    61 
       
    62 void HbInstance::setCurrentView( HbView*, bool animation )
       
    63 {
       
    64 }
       
    65