controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.cpp
changeset 10 0a74be98a8bc
child 11 10d0dd0e43f1
equal deleted inserted replaced
0:254040eb3b7d 10:0a74be98a8bc
       
     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 #include "cpcommunicationgroupitemdata.h"
       
    18 #include <QStringList>
       
    19 
       
    20 CpCommunicationGroupItemData::CpCommunicationGroupItemData(const QString &configFile,
       
    21                                                            const HbDataFormModelItem *parent):
       
    22 CpCategorySettingFormItemData(configFile,parent)
       
    23 {
       
    24 
       
    25 }
       
    26 
       
    27 CpCommunicationGroupItemData::CpCommunicationGroupItemData(HbDataFormModelItem::DataItemType type,
       
    28                                                            const QString &label,
       
    29                                                            const QString &configFile,
       
    30                                                            const HbDataFormModelItem *parent):
       
    31 CpCategorySettingFormItemData(type, label, configFile, parent)
       
    32 {
       
    33 
       
    34 }
       
    35 CpCommunicationGroupItemData::~CpCommunicationGroupItemData()
       
    36 {
       
    37     
       
    38 }
       
    39 void CpCommunicationGroupItemData::beforeLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
       
    40 {
       
    41     HbDataFormModelItem *airPlaneMode = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem,
       
    42                                                                 QString("Airplane Mode"));
       
    43     QStringList airModeList;
       
    44     airModeList << QObject::tr("On") << QObject::tr("Off");
       
    45     
       
    46     airPlaneMode->setContentWidgetData("text",airModeList.at(1));
       
    47     airPlaneMode->setContentWidgetData("additionalText",airModeList.at(0));
       
    48 
       
    49     this->appendChild(airPlaneMode);
       
    50     
       
    51 }