diff -r 2c9d3aa5bea2 -r 20bd089f4aaa controlpanel/src/cpplugins/devicelockplugin/src/cpdevicelockpluginview.cpp --- a/controlpanel/src/cpplugins/devicelockplugin/src/cpdevicelockpluginview.cpp Thu Apr 01 03:17:51 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +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 "cpdevicelockpluginview.h" -#include -#include -#include -#include -#include -#include "cpremotelockdataformviewitem.h" - -CpDeviceLockPluginView::CpDeviceLockPluginView(QGraphicsItem *parent /*= 0*/) -: CpBaseSettingView(0,parent) -{ - if (HbDataForm *form = settingForm()) { - - QList protoTypeList = form->itemPrototypes(); - protoTypeList.append(new CpRemoteLockDataFormViewItem()); - form->setItemPrototypes(protoTypeList); - - HbDataFormModel *formModel = new HbDataFormModel(); - - form->setHeading(tr("Device lock")); - - HbDataFormModelItem *deviceLockItem = new HbDataFormModelItem( - HbDataFormModelItem::ToggleValueItem,tr("Device lock")); - - deviceLockItem->setContentWidgetData("text",tr("On")); - deviceLockItem->setContentWidgetData("additionalText",tr("Off")); - - formModel->appendDataFormItem(deviceLockItem); - - HbDataFormModelItem *lockCodeItem = new HbDataFormModelItem( - HbDataFormModelItem::TextItem,tr("Lock code")); - lockCodeItem->setContentWidgetData("echoMode",HbLineEdit::Password); - lockCodeItem->setContentWidgetData("text","1111"); - lockCodeItem->setContentWidgetData("readOnly",true); - - formModel->appendDataFormItem(lockCodeItem); - - HbDataFormModelItem *deviceLockAfterItem = new HbDataFormModelItem( - HbDataFormModelItem::RadioButtonListItem,tr("Device will be locked automatically after:")); - - QStringList items; - items << tr("15 minutes") << tr("30 minutes") << tr("1 hour") << tr("4 hours") ; - deviceLockAfterItem->setContentWidgetData("items",items); - deviceLockAfterItem->setContentWidgetData("selected",0); - - formModel->appendDataFormItem(deviceLockAfterItem); - - HbDataFormModelItem *remoteLockItem = new HbDataFormModelItem( - static_cast(CpRemoteLockDataFormViewItem::CpRemoteLockItem), - tr("Remote locking")); - remoteLockItem->setContentWidgetData("plainText", - tr("Device can be locked remotely by sending lock code to the device as SMS.")); - remoteLockItem->setContentWidgetData("TextWrapping",Hb::TextWordWrap); - - formModel->appendDataFormItem(remoteLockItem); - - form->setModel(formModel); - } -} - -CpDeviceLockPluginView::~CpDeviceLockPluginView() -{ -} - -