clock/clockui/clockviewmanager/src/clockdocloader.cpp
changeset 45 b6db4fd4947b
parent 18 c198609911f9
child 57 bb2d3e476f29
equal deleted inserted replaced
23:fd30d51f876b 45:b6db4fd4947b
    13 *
    13 *
    14 * Description:   Definition file for class ClockDocLoader.
    14 * Description:   Definition file for class ClockDocLoader.
    15  *
    15  *
    16 */
    16 */
    17 
    17 
    18 // System includes.
       
    19 #include <QDebug>
       
    20 
       
    21 // User includes
    18 // User includes
    22 #include "clockdocloader.h"
    19 #include "clockdocloader.h"
    23 #include "clockcommon.h"
    20 #include "clockcommon.h"
    24 #include "clockmainview.h"
    21 #include "clockmainview.h"
    25 #include "skinnableclock.h"
    22 #include "clockwidget.h"
    26 #include "clockworldview.h"
    23 #include "clockworldview.h"
       
    24 #include "clockhomecityitem.h"
    27 
    25 
    28 /*!
    26 /*!
    29 	\class ClockDocLoader
    27 	\class ClockDocLoader
    30 
    28 
    31 	Inherits from HbDocumentLoader
    29 	Inherits from HbDocumentLoader
    37 
    35 
    38 	\return QObject* Pointer to the created object
    36 	\return QObject* Pointer to the created object
    39  */
    37  */
    40 QObject *ClockDocLoader::createObject(const QString &type, const QString &name)
    38 QObject *ClockDocLoader::createObject(const QString &type, const QString &name)
    41 {
    39 {
    42 	qDebug() << "clock: ClockDocLoader::createObject -->";
       
    43 
       
    44 	if (CLOCK_MAIN_VIEW == name) {
    40 	if (CLOCK_MAIN_VIEW == name) {
    45 		QObject *object = new ClockMainView();
    41 		QObject *object = new ClockMainView();
    46 		object->setObjectName(name);
    42 		object->setObjectName(name);
    47 		return object;
    43 		return object;
    48 	} else if (CLOCK_WIDGET == name) {
    44 	} else if (CLOCK_WIDGET == name) {
    49 		QObject *object = new SkinnableClock();
    45 		QObject *object = new ClockWidget();
    50 		object->setObjectName(name);
    46 		object->setObjectName(name);
    51 		return object;
    47 		return object;
    52     } else if (WORLD_CLOCK_VIEW == name) {
    48 	} else if (CLOCK_WORLD_VIEW == name) {
    53 		QObject *object = new ClockWorldView();
    49 		QObject *object = new ClockWorldView();
    54 		object->setObjectName(name);
    50 		object->setObjectName(name);
    55 		return object;
    51 		return object;
    56     }
    52 	} else if (CLOCK_WORLD_HOMECITY == name) {
    57 
    53 		QObject *object = new ClockHomeCityItem();
    58 	qDebug() << "clock: ClockDocLoader::createObject <--";
    54 		object->setObjectName(name);
       
    55 		return object;
       
    56 	}
    59 
    57 
    60 	return HbDocumentLoader::createObject(type, name);
    58 	return HbDocumentLoader::createObject(type, name);
    61 }
    59 }
    62 
    60 
    63 // End of file	--Don't remove this.
    61 // End of file	--Don't remove this.