|
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: |
|
15 * Implementation file for class ClockSettingsDocLoader. |
|
16 * |
|
17 */ |
|
18 |
|
19 // System includes. |
|
20 #include <QDebug> |
|
21 |
|
22 // User includes |
|
23 #include "clocksettingsdocloader.h" |
|
24 #include "clocksettingsdefines.h" |
|
25 #include "skinnableclock.h" |
|
26 #include "clocksettingsview.h" |
|
27 |
|
28 /*! |
|
29 \class ClockSettingsDocLoader |
|
30 |
|
31 Inherits from HbDocumentLoader |
|
32 Called whenever the docml file is parsed to create objects |
|
33 Over-riding it since we need to create custom views and widgets. |
|
34 |
|
35 \param type The object type which is being created. For ex: HbWidget |
|
36 \param name The name of the created object |
|
37 |
|
38 \return QObject* Pointer to the created object |
|
39 */ |
|
40 QObject *ClockSettingsDocLoader::createObject(const QString &type, const QString &name) |
|
41 { |
|
42 qDebug() << "clock: ClockSettingsDocLoader::createObject -->"; |
|
43 |
|
44 if (CLOCK_WIDGET == name) { |
|
45 QObject *object = new SkinnableClock(); |
|
46 object->setObjectName(name); |
|
47 return object; |
|
48 } |
|
49 |
|
50 qDebug() << "clock: ClockSettingsDocLoader::createObject <--"; |
|
51 |
|
52 return HbDocumentLoader::createObject(type, name); |
|
53 } |
|
54 |
|
55 // End of file --Don't remove this. |