diff -r 6465d5bb863a -r 13e71d907dc3 controlpanel/src/cpframework/src/cpbasesettingview_p.cpp --- a/controlpanel/src/cpframework/src/cpbasesettingview_p.cpp Fri Jun 25 17:09:30 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* - * 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: - * - */ - -#include "cpbasesettingview_p.h" -#include "cpbasesettingview.h" -#include -#include -#include -#include -#include -#include -#include "cpitemdatahelper.h" -#include "cppluginutility.h" - - -CpBaseSettingViewPrivate::CpBaseSettingViewPrivate() : - mBaseSettingView(0), - mSoftKeyBackAction(0) -{ -} - -CpBaseSettingViewPrivate::~CpBaseSettingViewPrivate() -{ - if (mBaseSettingView) { - mBaseSettingView->setNavigationAction (0); - } - - delete mSoftKeyBackAction; - mSoftKeyBackAction = 0; -} - -void CpBaseSettingViewPrivate::init(QGraphicsWidget *widget,CpBaseSettingView *baseSettingView) -{ - mBaseSettingView = baseSettingView; - - if (!widget) { - widget = new HbDataForm(); - CpPluginUtility::addCpItemPrototype(qobject_cast(widget)); - } - - mBaseSettingView->setWidget(widget); - - mBaseSettingView->setTitle(hbTrId("txt_cp_title_control_panel")); //give a default title, sub classes need set it correctly - - mSoftKeyBackAction = new HbAction(Hb::BackNaviAction , mBaseSettingView); - QObject::connect(mSoftKeyBackAction, - SIGNAL(triggered()), - mBaseSettingView, - SLOT(_q_softkeyClicked()) ); - - mBaseSettingView->setNavigationAction (mSoftKeyBackAction); -} - -void CpBaseSettingViewPrivate::_q_softkeyClicked() -{ - mBaseSettingView->close(); -} - -#include "moc_cpbasesettingview.cpp" - -//End of File