mpviewplugins/mpplaybackviewplugin/src/mpplaybackdocumentloader.cpp
changeset 43 0f32e550d9d8
equal deleted inserted replaced
38:b93f525c9244 43:0f32e550d9d8
       
     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: Music Player Playback view custom document loader.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "mpplaybackdocumentloader.h"
       
    20 #include "mpalbumcoverwidget.h"
       
    21 #include "mptrace.h"
       
    22 
       
    23 
       
    24 /*!
       
    25     \class MpPlaybackDocumentLoader
       
    26     \brief Music Player playback view custom document loader.
       
    27 
       
    28     Playback view document loader extends Orbit document loader to enable
       
    29     loading of custom widgets.
       
    30 */
       
    31 
       
    32 /*!
       
    33  Creates and returns the object of the given \a type.
       
    34 
       
    35  \reimp
       
    36  */
       
    37 QObject *MpPlaybackDocumentLoader::createObject(const QString& type, const QString &name)
       
    38 {
       
    39     TX_ENTRY_ARGS("type=" << type << ", name=" << name);
       
    40 
       
    41     if ( type == MpAlbumCoverWidget::staticMetaObject.className() ) {
       
    42         QObject *object = new MpAlbumCoverWidget();
       
    43         object->setObjectName(name);
       
    44         TX_EXIT
       
    45         return object;
       
    46     }
       
    47 
       
    48     TX_EXIT
       
    49     return HbDocumentLoader::createObject(type, name);
       
    50 }
       
    51