99
|
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: Screensaver custom document loader.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "tsdocumentloader.h"
|
|
19 |
#include "tstasksgrid.h"
|
|
20 |
#include "tstasksgriditem.h"
|
112
|
21 |
#include "tsnoitemslabel.h"
|
99
|
22 |
|
|
23 |
/*!
|
|
24 |
\class TsDocumentLoader
|
|
25 |
\ingroup group_tsdevicedialogplugin
|
|
26 |
\brief Document loader.
|
|
27 |
|
|
28 |
TS implementation of document loader. It is creating TS objects used in UI
|
|
29 |
*/
|
|
30 |
|
107
|
31 |
QObject *TsDocumentLoader::createObject(const QString &type,
|
|
32 |
const QString &name)
|
99
|
33 |
{
|
|
34 |
if (type == TsTasksGrid::staticMetaObject.className()) {
|
|
35 |
QObject *object = new TsTasksGrid();
|
|
36 |
object->setObjectName(name);
|
|
37 |
return object;
|
|
38 |
} else if (type == TsTasksGridItem::staticMetaObject.className()) {
|
|
39 |
QObject *object = new TsTasksGridItem();
|
|
40 |
object->setObjectName(name);
|
|
41 |
return object;
|
112
|
42 |
} else if (type == TsNoItemsLabel::staticMetaObject.className()) {
|
|
43 |
QObject *object = new TsNoItemsLabel();
|
|
44 |
object->setObjectName(name);
|
|
45 |
return object;
|
99
|
46 |
}
|
|
47 |
|
|
48 |
return HbDocumentLoader::createObject(type, name);
|
|
49 |
}
|