controlpanel/controlpanel_plat/inc/cpsettingformentryitemdata.h
changeset 18 e3554c9069b6
child 21 851e19007849
equal deleted inserted replaced
4:3f8368f032cf 18:e3554c9069b6
       
     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_H
       
    19 #define CP_SETTINGFORM_ENTRY_ITEM_DATA_H
       
    20 
       
    21 #include <cpglobal.h>
       
    22 #include <QObject>
       
    23 #include <cpsettingformitemdata.h>
       
    24 #include <hbicon.h>
       
    25 
       
    26 class CpItemDataHelper;
       
    27 class CpBaseSettingView;
       
    28 class HbDataForm;
       
    29 
       
    30 class CP_EXPORT CpSettingFormEntryItemData : public CpSettingFormItemData 
       
    31 {
       
    32 	Q_OBJECT
       
    33 public:
       
    34 	enum ItemType{ EntryItem = HbDataFormModelItem::CustomItemBase + 1};
       
    35 
       
    36 	explicit CpSettingFormEntryItemData(const HbDataFormModelItem *parent = 0);
       
    37 
       
    38 	explicit CpSettingFormEntryItemData(CpItemDataHelper &itemDataHelper,
       
    39 			const QString &text = QString(),
       
    40 	        const QString &description = QString(),
       
    41 			const HbIcon &icon = HbIcon(),
       
    42 			const HbDataFormModelItem *parent = 0);	 
       
    43 
       
    44 	explicit CpSettingFormEntryItemData(HbDataForm *dataForm,
       
    45 			const QString &text = QString(),
       
    46 	        const QString &description = QString(),
       
    47 			const HbIcon &icon = HbIcon(),
       
    48 			const HbDataFormModelItem *parent = 0);	
       
    49 
       
    50 	virtual ~CpSettingFormEntryItemData();	
       
    51 	
       
    52 	QString text() const;
       
    53 	void setText(const QString &text);
       
    54 	
       
    55 	QString description() const;
       
    56 	void setDescription(const QString &description);
       
    57 
       
    58 	HbIcon entryItemIcon() const;
       
    59 	void setEntryItemIcon(const HbIcon &icon);
       
    60 
       
    61 private slots:
       
    62 	void onLaunchView();
       
    63 private:
       
    64 	virtual CpBaseSettingView *createSettingView() const = 0;
       
    65 	friend class CpPluginLauncher;
       
    66 };
       
    67 
       
    68 #endif