mpviewplugins/mpmediawallviewplugin/tsrc/unittest_mpmediawallview/stub/src/mpmediawalldocumentloader.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 Music Player media wall view custom document loader.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "mpmediawalldocumentloader.h"
       
    19 #include "mpcommondefs.h"
       
    20 #include "hgmediawall.h"
       
    21 #include "mptrace.h"
       
    22 
       
    23 #include <HbToolButton>
       
    24 
       
    25 /*!
       
    26 Stub implementation - load real widgets
       
    27  */
       
    28 QObject *MpMediaWallDocumentLoader::createObject(const QString& type, const QString &name)
       
    29 {
       
    30     TX_LOG_ARGS("MpMediaWallDocumentLoader::createObject() Stub");
       
    31     TX_ENTRY_ARGS("type=" << type << ", name=" << name);
       
    32 
       
    33     if ( type == HgMediawall::staticMetaObject.className() ) {
       
    34         QObject *object = new HgMediawall();
       
    35         object->setObjectName(name);
       
    36         TX_EXIT
       
    37         return object;
       
    38     }
       
    39     else if ( type == HbToolButton::staticMetaObject.className() ) {
       
    40         QObject *object = new HbToolButton();
       
    41         object->setObjectName(name);
       
    42         TX_EXIT
       
    43         return object;
       
    44     }
       
    45 
       
    46     TX_EXIT
       
    47     return HbDocumentLoader::createObject(type, name);
       
    48 }
       
    49