|
1 /* |
|
2 * Copyright (c) 2010 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: Definition of the class AgendaEventViewerDocLoader |
|
15 * |
|
16 */ |
|
17 |
|
18 // User includes. |
|
19 #include "agendaeventviewerdocloader.h" |
|
20 #include "agendaeventvieweritem.h" |
|
21 #include "agendaeventviewercommon.h" |
|
22 |
|
23 /*! |
|
24 \class AgendaEventViewerDocLoader |
|
25 |
|
26 Custom document loader class for constructing custom widgets/objects. |
|
27 */ |
|
28 |
|
29 /*! |
|
30 From HbDocumentLoader. |
|
31 Creates and returns an object of type and assigns name as its object name. |
|
32 |
|
33 \param type The type name as mentioned in docml. |
|
34 \param name The name of the object as mentioned in docml. |
|
35 \return QObject* Pointer to the constructed QObject. |
|
36 \sa HbDocumentLoader |
|
37 */ |
|
38 QObject* AgendaEventViewerDocLoader::createObject(const QString &type, |
|
39 const QString &name) |
|
40 { |
|
41 if (name == QString(AGENDA_EVENT_VIEWER_SUBJECT_WIDGET) |
|
42 || name == QString(AGENDA_EVENT_VIEWER_DATE_TIME_WIDGET) |
|
43 || name == QString(AGENDA_EVENT_VIEWER_LOCATION_WIDGET) |
|
44 || name == QString(AGENDA_EVENT_VIEWER_REPEAT_WIDGET) |
|
45 || name == QString(AGENDA_EVENT_VIEWER_REMINDER_WIDGET) |
|
46 || name == QString(AGENDA_EVENT_VIEWER_DESCRIPTION_WIDGET)) { |
|
47 |
|
48 QObject *agendaEventViewerItem = new AgendaEventViewerItem(); |
|
49 agendaEventViewerItem->setObjectName(name); |
|
50 return agendaEventViewerItem; |
|
51 } else { |
|
52 return HbDocumentLoader::createObject(type, name); |
|
53 } |
|
54 } |
|
55 |
|
56 // End of file --Don't remove this. |