tsdevicedialog/tsdevicedialogplugin/src/tsdocumentloader.cpp
changeset 104 9b022b1f357c
child 107 b34d53f6acdf
equal deleted inserted replaced
103:b99b84bcd2d1 104:9b022b1f357c
       
     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: Screensaver custom document loader.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "tsdocumentloader.h"
       
    19 #include "tstasksgrid.h"
       
    20 #include "tstasksgriditem.h"
       
    21 
       
    22 /*!
       
    23     \class TsDocumentLoader
       
    24     \ingroup group_tsdevicedialogplugin
       
    25     \brief Document loader.
       
    26 
       
    27     TS implementation of document loader. It is creating TS objects used in UI
       
    28 */
       
    29 
       
    30 QObject *TsDocumentLoader::createObject(const QString &type, const QString &name)
       
    31 {
       
    32     if (type == TsTasksGrid::staticMetaObject.className()) {
       
    33         QObject *object = new TsTasksGrid();
       
    34         object->setObjectName(name);
       
    35         return object;
       
    36     } else if (type == TsTasksGridItem::staticMetaObject.className()) {
       
    37         QObject *object = new TsTasksGridItem();
       
    38         object->setObjectName(name);
       
    39         return object;
       
    40     }
       
    41 
       
    42     return HbDocumentLoader::createObject(type, name);
       
    43 }