|
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: Clock widget |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "hsclockwidgetdocumentloader.h" |
|
19 |
|
20 #include "hsanalogclockwidget.h" |
|
21 #include "hsdigitalclockwidget.h" |
|
22 |
|
23 /*! |
|
24 \class HsClockWidgetDocumentLoader |
|
25 \ingroup group_hsclockwidgetplugin |
|
26 \brief Custom homescreen themable clock docml layout loader. |
|
27 */ |
|
28 |
|
29 /*! |
|
30 Creates the homescreen themable clock custom docml objects. |
|
31 \param type Static type name. |
|
32 \param name Object name. |
|
33 \retval Created object. |
|
34 */ |
|
35 QObject *HsClockWidgetDocumentLoader::createObject(const QString &type, const QString &name) |
|
36 { |
|
37 if (type == HsAnalogClockWidget::staticMetaObject.className()) { |
|
38 QObject *object = new HsAnalogClockWidget(); |
|
39 object->setObjectName(name); |
|
40 return object; |
|
41 } |
|
42 else if (type == HsDigitalClockWidget::staticMetaObject.className()) { |
|
43 QObject *object = new HsDigitalClockWidget(); |
|
44 object->setObjectName(name); |
|
45 return object; |
|
46 } |
|
47 |
|
48 return HbDocumentLoader::createObject(type, name); |
|
49 } |