diff -r 3f8368f032cf -r e3554c9069b6 controlpanel/controlpanel_plat/inc/cpsettingformentryitemdataimpl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/controlpanel/controlpanel_plat/inc/cpsettingformentryitemdataimpl.h Fri Mar 19 09:34:30 2010 +0200 @@ -0,0 +1,76 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0"" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H +#define CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H + +#include "cpsettingformentryitemdata.h" + + +/*! + \class CpSettingFormEntryItemDataImpl + \brief The template class CpSettingFormEntryItemDataImpl provide a defaut implementation of CpSettingFormEntryItemData. + By implementing pure virtual function CpSettingFormEntryItemData::createSettingView. + */ +class CpItemDataHelper; +template +class CpSettingFormEntryItemDataImpl : public CpSettingFormEntryItemData +{ +public: + + /*! + Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent. + */ + explicit CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper, + const QString &text = QString(), + const QString &description = QString(), + const HbIcon &icon = HbIcon(), + const HbDataFormModelItem *parent = 0) : + CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent) + { + } + + /*! + Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent. + */ + explicit CpSettingFormEntryItemDataImpl(HbDataForm *dataForm, + const QString &text = QString(), + const QString &description = QString(), + const HbIcon &icon = HbIcon(), + const HbDataFormModelItem *parent = 0) : + CpSettingFormEntryItemData(dataForm,text,description,icon,parent) + + { + } + + /*! + Destructor. + */ + virtual ~CpSettingFormEntryItemDataImpl() + { + } + + /*! + Implement CpSettingFormEntryItemData::createSettingView + */ + virtual CpBaseSettingView *createSettingView() const + { + return new PLUGIN_VIEW(); + } +}; + +#endif // CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H