controlpanel/controlpanel_plat/inc/cpsettingformentryitemdataimpl.h
changeset 68 13e71d907dc3
parent 40 6465d5bb863a
equal deleted inserted replaced
40:6465d5bb863a 68:13e71d907dc3
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H
       
    19 #define CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H
       
    20 
       
    21 #include "cpsettingformentryitemdata.h"
       
    22 
       
    23 
       
    24 /*!
       
    25     \class CpSettingFormEntryItemDataImpl
       
    26     \brief The template class CpSettingFormEntryItemDataImpl provide a defaut implementation of CpSettingFormEntryItemData. 
       
    27     By implementing pure virtual function CpSettingFormEntryItemData::createSettingView.
       
    28  */
       
    29 class CpItemDataHelper;
       
    30 template<typename PLUGIN_VIEW>
       
    31 class CpSettingFormEntryItemDataImpl : public CpSettingFormEntryItemData
       
    32 {
       
    33 public:
       
    34 
       
    35     /*!
       
    36         Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent.
       
    37     */
       
    38     explicit CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
       
    39 			const QString &text = QString(),
       
    40             const QString &description = QString(),
       
    41 			const HbIcon &icon = HbIcon(),
       
    42             const HbDataFormModelItem *parent = 0) : 
       
    43             CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent)
       
    44     { }
       
    45 
       
    46 	/*!
       
    47         Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent.
       
    48     */
       
    49 	explicit CpSettingFormEntryItemDataImpl(HbDataForm *dataForm,
       
    50 			const QString &text = QString(),
       
    51 	        const QString &description = QString(),
       
    52 			const HbIcon &icon = HbIcon(),
       
    53 			const HbDataFormModelItem *parent = 0) : 
       
    54             CpSettingFormEntryItemData(dataForm,text,description,icon,parent)
       
    55 
       
    56 	{ }
       
    57 	
       
    58     explicit CpSettingFormEntryItemDataImpl(
       
    59             EntryItemType type,
       
    60             CpItemDataHelper &itemDataHelper,
       
    61             const QString &text = QString(),
       
    62             const QString &description = QString(),
       
    63             const QString &icon = QString(),
       
    64             const HbDataFormModelItem *parent = 0) : 
       
    65             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent)
       
    66     { }
       
    67     
       
    68     explicit CpSettingFormEntryItemDataImpl(
       
    69             EntryItemType type,
       
    70             HbDataForm *dataForm,
       
    71             const QString &text = QString(),
       
    72             const QString &description = QString(),
       
    73             const QString &icon = QString(),
       
    74             const HbDataFormModelItem *parent = 0) : 
       
    75             CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent)
       
    76     { }
       
    77 
       
    78     /*!
       
    79          Destructor.
       
    80     */
       
    81     virtual ~CpSettingFormEntryItemDataImpl()
       
    82     { }
       
    83     
       
    84     /*!
       
    85          Implement CpSettingFormEntryItemData::createSettingView
       
    86     */
       
    87     virtual CpBaseSettingView *createSettingView() const
       
    88     { return new PLUGIN_VIEW(); }
       
    89 };
       
    90 
       
    91 #endif  // CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H