diff -r f979ecb2b13e -r c198609911f9 notes/notesui/notesviewmanager/src/notesdocloader.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/notes/notesui/notesviewmanager/src/notesdocloader.cpp Fri Apr 16 14:57:40 2010 +0300 @@ -0,0 +1,75 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition file for class NotesDocLoader. +* +*/ + +// System includes +#include + +// User includes +#include "notesdocloader.h" +#include "notesmainview.h" +#include "notescollectionview.h" +#include "notestodoview.h" +#include "notesfavoriteview.h" +#include "notesnoteview.h" +#include "notescommon.h" + +/*! + \class NotesDocLoader + + Custom document loader class for notes view manager. + */ +/*! + From HbDocumentLoader. + Creates and returns an object of type and assigns name as its object name. + + \param type The type name as mentioned in docml. + \param name The name of the object as mentioned in docml. + \return QObject* Pointer to the constructed QObject. + \sa HbDocumentLoader + */ +QObject* NotesDocLoader::createObject(const QString &type, const QString &name) +{ + qDebug() << "notes: NotesDocLoader::createObject -->"; + + if (NOTES_MAIN_VIEW == name) { + QObject *object = new NotesMainView(); + object->setObjectName(name); + return object; + } else if (NOTES_COLLECTION_VIEW == name) { + QObject *object = new NotesCollectionView(); + object->setObjectName(name); + return object; + } else if (NOTES_TODO_VIEW == name) { + QObject *object = new NotesTodoView(); + object->setObjectName(name); + return object; + } else if (NOTES_FAVORITES_VIEW == name) { + QObject *object = new NotesFavoriteView(); + object->setObjectName(name); + return object; + } else if (NOTES_NOTE_VIEW == name) { + QObject *object = new NotesNoteView(); + object->setObjectName(name); + return object; + } + + qDebug() << "notes: NotesDocLoader::createObject <--"; + + return HbDocumentLoader::createObject(type, name); +} + +// End of file --Don't remove this.