mpviewplugins/mpmediawallviewplugin/tsrc/unittest_mptracklistwidget/stub/src/hbinstancestub.cpp
changeset 48 af3740e3753f
equal deleted inserted replaced
42:79c49924ae23 48:af3740e3753f
       
     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 for hbinstance
       
    15 *
       
    16 */
       
    17 
       
    18 #include "stub/inc/hbinstancestub.h"
       
    19 
       
    20 /*!
       
    21  Constructor
       
    22  */
       
    23 HbInstanceStub::HbInstanceStub()
       
    24 {    
       
    25     HbMainWindowStub *mainwindowStub = new HbMainWindowStub();
       
    26     mList.append( mainwindowStub );
       
    27 }
       
    28 
       
    29 /*!
       
    30  Destructor
       
    31  */
       
    32 HbInstanceStub::~HbInstanceStub()
       
    33 {
       
    34     mList.clear();
       
    35 }
       
    36 
       
    37 HbInstanceStub *HbInstanceStub::instance() 
       
    38 {
       
    39     static HbInstanceStub hbInstanceStub;
       
    40     return &hbInstanceStub;    
       
    41 }
       
    42 
       
    43 QList<HbMainWindowStub *> HbInstanceStub::allMainWindows() const 
       
    44 {
       
    45     return mList;    
       
    46 }