locationpickerservice/src/locationpickerdocumentloader.cpp
branchRCL_3
changeset 17 1fc85118c3ae
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
       
     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 "locationpickerview.h"
       
    20 #include "locationpickersearchview.h"
       
    21 
       
    22 // ---------------------------------------------------------------------------
       
    23 // LocationPickerDocumentLoader::LocationPickerDocumentLoader()
       
    24 // ---------------------------------------------------------------------------
       
    25 //
       
    26 LocationPickerDocumentLoader::LocationPickerDocumentLoader()
       
    27 {
       
    28 }
       
    29 
       
    30 // ---------------------------------------------------------------------------
       
    31 // LocationPickerDocumentLoader::~LocationPickerDocumentLoader()
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 LocationPickerDocumentLoader::~LocationPickerDocumentLoader()
       
    35 {
       
    36 }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // LocationPickerDocumentLoader::createObject
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 QObject *LocationPickerDocumentLoader::createObject( const QString& type, const QString &name )
       
    43 {   
       
    44     //for locationpickerview
       
    45     if ( name == LocationPickerView::staticMetaObject.className() )
       
    46     {
       
    47         QObject *object = new LocationPickerView(this);
       
    48         object->setObjectName( name );
       
    49         return object;
       
    50     }
       
    51     //for locationpickersearchview
       
    52     if ( name == LocationPickerSearchView::staticMetaObject.className() )
       
    53     {
       
    54         QObject *object = new LocationPickerSearchView(*this);
       
    55         object->setObjectName( name );
       
    56         return object;
       
    57     }
       
    58     //default case
       
    59     return HbDocumentLoader::createObject( type, name );
       
    60 }