locationpickerservice/src/locationpickerdocumentloader.cpp
changeset 17 0f22fb80ebba
child 20 cd10d5b85554
equal deleted inserted replaced
15:13ae750350c9 17:0f22fb80ebba
       
     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: locationpickerdocumentloader implementation
       
    15 *
       
    16 */
       
    17 
       
    18 #include "locationpickerdocumentloader.h"
       
    19 #include "locationpickerpotraitview.h"
       
    20 #include "locationpickersearchview.h"
       
    21 #include "locationpickerlandscapeview.h"
       
    22 
       
    23 // ---------------------------------------------------------------------------
       
    24 // LocationPickerDocumentLoader::LocationPickerDocumentLoader()
       
    25 // ---------------------------------------------------------------------------
       
    26 //
       
    27 LocationPickerDocumentLoader::LocationPickerDocumentLoader()
       
    28 {
       
    29 }
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 // LocationPickerDocumentLoader::~LocationPickerDocumentLoader()
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 LocationPickerDocumentLoader::~LocationPickerDocumentLoader()
       
    36 {
       
    37 }
       
    38 
       
    39 // ---------------------------------------------------------------------------
       
    40 // LocationPickerDocumentLoader::createObject
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 QObject *LocationPickerDocumentLoader::createObject(const QString& type, const QString &name)
       
    44 {   
       
    45     //for locationpickerpotraitview
       
    46     if (name == LocationPickerPotraitView::staticMetaObject.className() )
       
    47     {
       
    48         QObject *object = new LocationPickerPotraitView(this);
       
    49         object->setObjectName(name);
       
    50         return object;
       
    51     }
       
    52     //for locationpickerlandscapeview
       
    53     if (name == LocationPickerLandscapeView::staticMetaObject.className())
       
    54     {
       
    55         QObject *object = new LocationPickerLandscapeView(this);
       
    56         object->setObjectName(name);
       
    57         return object;
       
    58     }
       
    59     //for locationpickersearchview
       
    60     if (name == LocationPickerSearchView::staticMetaObject.className())
       
    61     {
       
    62         QObject *object = new LocationPickerSearchView(*this);
       
    63         object->setObjectName(name);
       
    64         return object;
       
    65     }
       
    66     //default case
       
    67     return HbDocumentLoader::createObject(type, name);
       
    68 }