taskswitcherapp/tsserviceplugin/src/tsdocumentloader.cpp
changeset 35 f9ce957a272c
child 36 cdae8c6c3876
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     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 QObject *TsDocumentLoader::createObject(const QString &type, const QString &name)
       
    23 {
       
    24     if (type == TsTasksGrid::staticMetaObject.className()) {
       
    25         QObject *object = new TsTasksGrid();
       
    26         object->setObjectName(name);
       
    27         return object;
       
    28     } else if (type == TsTasksGridItem::staticMetaObject.className()) {
       
    29         QObject *object = new TsTasksGridItem();
       
    30         object->setObjectName(name);
       
    31         return object;
       
    32     }
       
    33 
       
    34     return HbDocumentLoader::createObject(type, name);
       
    35 }