controlpanel/src/cpframework/src/cpbasesettingview.cpp
changeset 18 e3554c9069b6
child 23 7e4c5a2ff1a2
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 #include "cpbasesettingview.h"
       
    19 #include "cpbasesettingview_p.h"
       
    20 #include <hbdataform.h>
       
    21 #include "cpitemdatahelper.h"
       
    22 
       
    23 
       
    24 /*!
       
    25     \class CpBaseSettingView
       
    26     \brief The CpBaseSettingView is base class for all setting views in control panel application.
       
    27     This class is responsible for processing some common properties, such as setting view's title, content widget and back key action.
       
    28  */
       
    29 
       
    30 /*!
       
    31     Constructor of CpBaseSettingView.
       
    32  */
       
    33 CpBaseSettingView::CpBaseSettingView(QGraphicsWidget *widget /*= 0*/,QGraphicsItem *parent /*= 0*/) :
       
    34     HbView(parent),d_ptr(new CpBaseSettingViewPrivate())
       
    35 {
       
    36     d_ptr->init(widget,this);
       
    37 }
       
    38 
       
    39 /*!
       
    40     Destructor of CpBaseSettingView.
       
    41  */
       
    42 CpBaseSettingView::~CpBaseSettingView()
       
    43 {
       
    44     delete d_ptr;
       
    45 }
       
    46 
       
    47 /*!
       
    48 	\deprecated  void CpBaseSettingView::setSettingForm(HbDataForm *settingForm) will be deprecated, please
       
    49 	use setWidget(QGraphicsWidget* widget) to instead.
       
    50     Set the data form for the setting view.
       
    51  */
       
    52 void CpBaseSettingView::setSettingForm(HbDataForm *settingForm)
       
    53 {
       
    54     d_ptr->setSettingForm(settingForm);
       
    55 }
       
    56 
       
    57 /*!
       
    58 	\deprecated  HbDataForm *CpBaseSettingView::settingForm() const will be deprecated, please
       
    59 	use widget() const to instead.
       
    60     Get the data form for the setting view.
       
    61  */
       
    62 HbDataForm *CpBaseSettingView::settingForm() const
       
    63 {
       
    64     return qobject_cast<HbDataForm*>(widget());
       
    65 }
       
    66 
       
    67 //