35
|
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 media wall view custom document loader.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <hgmediawall.h>
|
|
19 |
#include <hbtoolbutton.h>
|
|
20 |
|
|
21 |
#include "mpmediawalldocumentloader.h"
|
|
22 |
#include "mpcommondefs.h"
|
|
23 |
#include "mptrace.h"
|
|
24 |
|
|
25 |
|
|
26 |
/*!
|
|
27 |
\class MpMediaWallDocumentLoader
|
|
28 |
\brief Music Player media wall view custom document loader.
|
|
29 |
|
|
30 |
Media wall view document loader extends Orbit document loader to enable
|
|
31 |
loading of custom widgets.
|
|
32 |
*/
|
|
33 |
|
|
34 |
/*!
|
|
35 |
Creates and returns the object of the given \a type.
|
|
36 |
|
|
37 |
\reimp
|
|
38 |
*/
|
|
39 |
QObject *MpMediaWallDocumentLoader::createObject(const QString& type, const QString &name)
|
|
40 |
{
|
|
41 |
TX_ENTRY_ARGS("type=" << type << ", name=" << name);
|
|
42 |
|
|
43 |
if ( type == HgMediawall::staticMetaObject.className() ) {
|
|
44 |
QObject *object = new HgMediawall();
|
|
45 |
object->setObjectName(name);
|
|
46 |
TX_EXIT
|
|
47 |
return object;
|
|
48 |
}
|
|
49 |
else if ( type == HbToolButton::staticMetaObject.className() ) {
|
|
50 |
QObject *object = new HbToolButton();
|
|
51 |
object->setObjectName(name);
|
|
52 |
TX_EXIT
|
|
53 |
return object;
|
|
54 |
}
|
|
55 |
|
|
56 |
TX_EXIT
|
|
57 |
return HbDocumentLoader::createObject(type, name);
|
|
58 |
}
|
|
59 |
|