controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp
author hgs
Fri, 14 May 2010 13:21:08 +0800
changeset 19 36aa4756ee82
parent 12 624337f114fe
child 21 2883a5458389
permissions -rw-r--r--
201019
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
 * All rights reserved.
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0""
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
 *
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
 * Initial Contributors:
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
 *
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
 * Contributors:
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
 *
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
 * Description:  
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
 *
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
 */
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include "cpprofilesettingform.h"
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    19
#include "cppersonalizationentryitemdata.h"
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#include <QStringList>
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
#include <hbdataformmodel.h>
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    22
#include <hbabstractviewitem.h>
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    23
#include <cpitemdatahelper.h>
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    24
#include <cpprofilemodel.h>
19
hgs
parents: 12
diff changeset
    25
#include <hbslider.h>
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    26
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    27
#include <QFileInfo>
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    28
#include <QFileIconProvider>
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    29
#include <QAbstractItemModel>
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    30
#include <QModelIndex>
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    31
#include <QMap>
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
19
hgs
parents: 12
diff changeset
    33
#include <xqsettingsmanager.h>
hgs
parents: 12
diff changeset
    34
#include <ProfileEngineInternalCRKeys.h>
hgs
parents: 12
diff changeset
    35
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
CpProfileSettingForm::CpProfileSettingForm()
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    37
    : mModel(0), mItemDataHelper(new CpItemDataHelper( this )),
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    38
    mProfileModel(new CpProfileModel()), mFileIconProvider(new QFileIconProvider),
19
hgs
parents: 12
diff changeset
    39
    mGeneralPage(0),mMeetingPage(0),mCurrentPage( 0 ), mSettingManager(0)
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
{
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    41
    this->setHeading(hbTrId("txt_cp_button_advanced_settings"));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    42
    this->setDescription(hbTrId("txt_cp_info_select_tones_that_play_when_you_select"));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    43
    
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
    initModel();
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
}
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
CpProfileSettingForm::~CpProfileSettingForm()
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
{
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
    delete mModel;
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    50
    delete mProfileModel;
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    51
    delete mFileIconProvider;
19
hgs
parents: 12
diff changeset
    52
    delete mSettingManager;
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
}
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
void CpProfileSettingForm::initModel()
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
{
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
    mModel = new HbDataFormModel();
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    59
    QString generalString( mProfileModel->profileName( EProfileWrapperGeneralId ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    60
    if( generalString.isEmpty() ) {
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    61
        qDebug( "warning: general profile name is empty");
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    62
        generalString = hbTrId("txt_cp_list_general"); 
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    63
    }
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    64
    QString meetingString( mProfileModel->profileName( EProfileWrapperMeetingId ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    65
    if( meetingString.isEmpty() ) {
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    66
        qDebug( "warning: meeting profile name is empty");
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    67
        meetingString = hbTrId("txt_cp_list_meeting"); 
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
    }
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    69
    
19
hgs
parents: 12
diff changeset
    70
    mSettingManager = new XQSettingsManager();   
hgs
parents: 12
diff changeset
    71
    
hgs
parents: 12
diff changeset
    72
    XQCentralRepositorySettingsKey key(KCRUidProfileEngine.iUid,KProEngSilenceMode);
hgs
parents: 12
diff changeset
    73
    
hgs
parents: 12
diff changeset
    74
    QVariant silenceMode = mSettingManager->readItemValue(key,XQSettingsManager::TypeInt);
hgs
parents: 12
diff changeset
    75
hgs
parents: 12
diff changeset
    76
    mSettingManager->startMonitoring(key,XQSettingsManager::TypeInt);
hgs
parents: 12
diff changeset
    77
    connect(mSettingManager, SIGNAL(valueChanged (XQSettingsKey, QVariant)),
hgs
parents: 12
diff changeset
    78
            this, SLOT(settingValueChanged(XQSettingsKey, QVariant)));
hgs
parents: 12
diff changeset
    79
    
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    80
    mGeneralPage = mModel->appendDataFormPage( generalString );
19
hgs
parents: 12
diff changeset
    81
    initProfileItems(EProfileWrapperGeneralId,mGeneralPage);
hgs
parents: 12
diff changeset
    82
    
hgs
parents: 12
diff changeset
    83
    //initGeneralTonesGroup();
hgs
parents: 12
diff changeset
    84
    
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    85
    //initGeneralVibraGroup();
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    86
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    87
    mMeetingPage = mModel->appendDataFormPage( meetingString );
19
hgs
parents: 12
diff changeset
    88
    initProfileItems(EProfileWrapperMeetingId,mMeetingPage);
hgs
parents: 12
diff changeset
    89
    //initMeetingTonesGroup();
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
    90
    //initMeetingVibraGroup();
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
    setModel(mModel);
19
hgs
parents: 12
diff changeset
    92
    settingValueChanged(key,silenceMode);
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
}
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
19
hgs
parents: 12
diff changeset
    95
void CpProfileSettingForm::initProfileItems(int profileId,HbDataFormModelItem *parent)
hgs
parents: 12
diff changeset
    96
{
hgs
parents: 12
diff changeset
    97
    CpProfileSettings profileSettings;
hgs
parents: 12
diff changeset
    98
    mProfileModel->profileSettings( profileId, profileSettings );
hgs
parents: 12
diff changeset
    99
    
hgs
parents: 12
diff changeset
   100
    QHash<int,HbDataFormModelItem*> modelItems;
hgs
parents: 12
diff changeset
   101
    
hgs
parents: 12
diff changeset
   102
    //ring tone item
hgs
parents: 12
diff changeset
   103
    QFileInfo ringToneFileInfo( profileSettings.mRingTone );
hgs
parents: 12
diff changeset
   104
    HbDataFormModelItem *modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
hgs
parents: 12
diff changeset
   105
            hbTrId("txt_cp_dblist_ringtone"), ringToneFileInfo.fileName(), mFileIconProvider->icon( ringToneFileInfo ),
hgs
parents: 12
diff changeset
   106
            CpPersonalizationEntryItemData::TONE_Ring, profileId );
hgs
parents: 12
diff changeset
   107
    mModel->appendDataFormItem(modelItem, parent);
hgs
parents: 12
diff changeset
   108
    modelItems.insert(ProfileItemRingTone,modelItem);
hgs
parents: 12
diff changeset
   109
    
hgs
parents: 12
diff changeset
   110
    //message tone item
hgs
parents: 12
diff changeset
   111
    QFileInfo messageToneFileInfo( profileSettings.mMessageTone );
hgs
parents: 12
diff changeset
   112
    modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
hgs
parents: 12
diff changeset
   113
            hbTrId("txt_cp_dblist_message_tone"), messageToneFileInfo.fileName(), mFileIconProvider->icon( messageToneFileInfo ),
hgs
parents: 12
diff changeset
   114
            CpPersonalizationEntryItemData::TONE_Message,
hgs
parents: 12
diff changeset
   115
            profileId );
hgs
parents: 12
diff changeset
   116
    mModel->appendDataFormItem(modelItem , parent);
hgs
parents: 12
diff changeset
   117
    modelItems.insert(ProfileItemMessageTone,modelItem);
hgs
parents: 12
diff changeset
   118
    
hgs
parents: 12
diff changeset
   119
    //email tone item
hgs
parents: 12
diff changeset
   120
    QFileInfo emailToneFileInfo( profileSettings.mEmailTone );
hgs
parents: 12
diff changeset
   121
    modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
hgs
parents: 12
diff changeset
   122
            hbTrId("txt_cp_dblist_email_tone"),  emailToneFileInfo.fileName(), mFileIconProvider->icon( emailToneFileInfo ),
hgs
parents: 12
diff changeset
   123
            CpPersonalizationEntryItemData::TONE_Email,
hgs
parents: 12
diff changeset
   124
            profileId );
hgs
parents: 12
diff changeset
   125
    mModel->appendDataFormItem(modelItem , parent);
hgs
parents: 12
diff changeset
   126
    modelItems.insert(ProfileItemEmailTone,modelItem);
hgs
parents: 12
diff changeset
   127
    
hgs
parents: 12
diff changeset
   128
    //reminder tone item
hgs
parents: 12
diff changeset
   129
    QFileInfo reminderToneFileInfo( profileSettings.mReminderTone );
hgs
parents: 12
diff changeset
   130
    modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
hgs
parents: 12
diff changeset
   131
            hbTrId("txt_cp_dblist_reminder_tone"), reminderToneFileInfo.fileName(), mFileIconProvider->icon( reminderToneFileInfo ),
hgs
parents: 12
diff changeset
   132
            CpPersonalizationEntryItemData::TONE_Reminder,
hgs
parents: 12
diff changeset
   133
            profileId );
hgs
parents: 12
diff changeset
   134
    mModel->appendDataFormItem(modelItem , parent);
hgs
parents: 12
diff changeset
   135
    modelItems.insert(ProfileItemReminderTone,modelItem);
hgs
parents: 12
diff changeset
   136
    
hgs
parents: 12
diff changeset
   137
    //notification tones item
hgs
parents: 12
diff changeset
   138
    modelItem= mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,QString(),parent);
hgs
parents: 12
diff changeset
   139
    modelItem->setContentWidgetData("text", hbTrId("txt_cp_list_notification_tones"));
hgs
parents: 12
diff changeset
   140
    modelItem->setContentWidgetData( "checkState", profileSettings.mNotificationTone ? 2 : 0 );
hgs
parents: 12
diff changeset
   141
    if (profileId == EProfileWrapperGeneralId) {
hgs
parents: 12
diff changeset
   142
        addConnection( modelItem, SIGNAL( stateChanged( int )), this, SLOT( on_general_notificationTones_stateChanged( int )));
hgs
parents: 12
diff changeset
   143
    }
hgs
parents: 12
diff changeset
   144
    else if (profileId == EProfileWrapperMeetingId) {
hgs
parents: 12
diff changeset
   145
        addConnection( modelItem, SIGNAL( stateChanged( int )), this, SLOT( on_meeting_notificationTones_stateChanged( int )));
hgs
parents: 12
diff changeset
   146
    }
hgs
parents: 12
diff changeset
   147
    modelItems.insert(ProfileItemNotificationTones,modelItem);
hgs
parents: 12
diff changeset
   148
    
hgs
parents: 12
diff changeset
   149
    
hgs
parents: 12
diff changeset
   150
    //Key and Touch Screen Tones item
hgs
parents: 12
diff changeset
   151
    modelItem = 
hgs
parents: 12
diff changeset
   152
            mModel->appendDataFormItem(HbDataFormModelItem::SliderItem ,QString(hbTrId("txt_cp_setlabel_key_and_touchscreen_tones")),parent);
hgs
parents: 12
diff changeset
   153
    
hgs
parents: 12
diff changeset
   154
    QList<QVariant> sliderElements;
hgs
parents: 12
diff changeset
   155
    sliderElements << QVariant(HbSlider::IncreaseElement) << QVariant(HbSlider::TrackElement)
hgs
parents: 12
diff changeset
   156
            << QVariant(HbSlider::DecreaseElement) << QVariant(HbSlider::IconElement)
hgs
parents: 12
diff changeset
   157
            << QVariant(HbSlider::TextElement);
hgs
parents: 12
diff changeset
   158
    modelItem->setContentWidgetData("sliderElements",sliderElements);
hgs
parents: 12
diff changeset
   159
    
hgs
parents: 12
diff changeset
   160
    
hgs
parents: 12
diff changeset
   161
    
hgs
parents: 12
diff changeset
   162
    //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
hgs
parents: 12
diff changeset
   163
    modelItem->setContentWidgetData( QString( "minimum" ), 0 );
hgs
parents: 12
diff changeset
   164
    modelItem->setContentWidgetData( QString( "maximum" ), 5 );
hgs
parents: 12
diff changeset
   165
    modelItem->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenTone );
hgs
parents: 12
diff changeset
   166
    QMap< QString, QVariant > elements;
hgs
parents: 12
diff changeset
   167
    elements.insert(QString("IncreaseElement") , QVariant(":/icon/hb_vol_slider_increment.svg"));
hgs
parents: 12
diff changeset
   168
    elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg") );
hgs
parents: 12
diff changeset
   169
    if (profileSettings.mKeyTouchScreenTone != 0) {
hgs
parents: 12
diff changeset
   170
        elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_unmuted.svg") );
hgs
parents: 12
diff changeset
   171
    }
hgs
parents: 12
diff changeset
   172
    else {
hgs
parents: 12
diff changeset
   173
        elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg") );
hgs
parents: 12
diff changeset
   174
    }
hgs
parents: 12
diff changeset
   175
    
hgs
parents: 12
diff changeset
   176
    modelItem->setContentWidgetData( QString( "elementIcons" ), elements );
hgs
parents: 12
diff changeset
   177
    
hgs
parents: 12
diff changeset
   178
    if (profileId == EProfileWrapperGeneralId) {
hgs
parents: 12
diff changeset
   179
        addConnection( modelItem, SIGNAL( valueChanged( int )), this, SLOT( on_general_keysAndScreenToneSlider_ValueChanged( int )));
hgs
parents: 12
diff changeset
   180
    }
hgs
parents: 12
diff changeset
   181
    else if (profileId == EProfileWrapperMeetingId) {
hgs
parents: 12
diff changeset
   182
        addConnection( modelItem, SIGNAL( valueChanged( int )), this, SLOT( on_meeting_keysAndScreenToneSlider_ValueChanged( int )));
hgs
parents: 12
diff changeset
   183
    }
hgs
parents: 12
diff changeset
   184
  
hgs
parents: 12
diff changeset
   185
    modelItems.insert(ProfileItemKeyandTouchScreenTones,modelItem);
hgs
parents: 12
diff changeset
   186
    
hgs
parents: 12
diff changeset
   187
    
hgs
parents: 12
diff changeset
   188
    //Touch Screen Vibra item
hgs
parents: 12
diff changeset
   189
    modelItem = mModel->appendDataFormItem( HbDataFormModelItem::SliderItem, QString( hbTrId( "txt_cp_setlabel_touch_screen_vibra" ) ), parent );
hgs
parents: 12
diff changeset
   190
     //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
hgs
parents: 12
diff changeset
   191
    modelItem->setContentWidgetData( QString( "minimum" ), 0 );
hgs
parents: 12
diff changeset
   192
    modelItem->setContentWidgetData( QString( "maximum" ), 5 );
hgs
parents: 12
diff changeset
   193
    modelItem->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenVibra );
hgs
parents: 12
diff changeset
   194
    
hgs
parents: 12
diff changeset
   195
    if (profileId == EProfileWrapperGeneralId) {
hgs
parents: 12
diff changeset
   196
        addConnection( modelItem, SIGNAL( valueChanged( int )), this, SLOT( on_general_screenVibra_ValueChanged( int )));
hgs
parents: 12
diff changeset
   197
    }
hgs
parents: 12
diff changeset
   198
    else if (profileId == EProfileWrapperMeetingId) {
hgs
parents: 12
diff changeset
   199
        addConnection( modelItem, SIGNAL( valueChanged( int )), this, SLOT( on_meeting_screenVibra_ValueChanged( int )));
hgs
parents: 12
diff changeset
   200
    }
hgs
parents: 12
diff changeset
   201
    
hgs
parents: 12
diff changeset
   202
    modelItems.insert(ProfileItemTouchScreenVibra,modelItem);
hgs
parents: 12
diff changeset
   203
    
hgs
parents: 12
diff changeset
   204
    mProfileModelItems.insert(profileId,modelItems);
hgs
parents: 12
diff changeset
   205
    
hgs
parents: 12
diff changeset
   206
}
hgs
parents: 12
diff changeset
   207
hgs
parents: 12
diff changeset
   208
/*
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   209
void CpProfileSettingForm::initGeneralTonesGroup()
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   210
{
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   211
    CpProfileSettings profileSettings;
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   212
    mProfileModel->profileSettings( EProfileWrapperGeneralId, profileSettings );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   213
    
19
hgs
parents: 12
diff changeset
   214
    //HbDataFormModelItem *tonesGroup = mModel->appendDataFormGroup(
hgs
parents: 12
diff changeset
   215
     //   hbTrId("txt_cp_subhead_tones"),mGeneralPage);
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   216
    QFileInfo ringToneFileInfo( profileSettings.mRingTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   217
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   218
        hbTrId("txt_cp_dblist_ringtone"), ringToneFileInfo.fileName(), mFileIconProvider->icon( ringToneFileInfo ) ), mGeneralPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   219
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   220
    QFileInfo messageToneFileInfo( profileSettings.mMessageTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   221
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   222
        hbTrId("txt_cp_dblist_message_tone"), messageToneFileInfo.fileName(), mFileIconProvider->icon( messageToneFileInfo ) ), mGeneralPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   223
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   224
    QFileInfo emailToneFileInfo( profileSettings.mEmailTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   225
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   226
        hbTrId("txt_cp_dblist_email_tone"),  emailToneFileInfo.fileName(), mFileIconProvider->icon( emailToneFileInfo ) ), mGeneralPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   227
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   228
    QFileInfo reminderToneFileInfo( profileSettings.mReminderTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   229
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   230
        hbTrId("txt_cp_dblist_reminder_tone"), reminderToneFileInfo.fileName(), mFileIconProvider->icon( reminderToneFileInfo ) ), mGeneralPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   231
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   232
    HbDataFormModelItem *notificationTones = mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,QString(),mGeneralPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   233
    notificationTones->setContentWidgetData("text", hbTrId("txt_cp_list_notification_tones"));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   234
    notificationTones->setContentWidgetData( "checkState", profileSettings.mNotificationTone?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   235
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   236
    mGeneralKeysAndScreenToneSlider = 
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   237
            mModel->appendDataFormItem(HbDataFormModelItem::SliderItem ,QString(hbTrId("txt_cp_setlabel_key_and_touchscreen_tones")),mGeneralPage);
19
hgs
parents: 12
diff changeset
   238
    
hgs
parents: 12
diff changeset
   239
    //QMap< QString, QVariant > elements;
hgs
parents: 12
diff changeset
   240
    //elements.insert(QString("IncreaseElement") , QVariant(":/icon/hb_vol_slider_increment.svg"));
hgs
parents: 12
diff changeset
   241
    //elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg") );
hgs
parents: 12
diff changeset
   242
    //elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg") );
hgs
parents: 12
diff changeset
   243
    //mGeneralKeysAndScreenToneSlider->setContentWidgetData( QString( "elementIcons" ), elements );
hgs
parents: 12
diff changeset
   244
     
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   245
    //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   246
    mGeneralKeysAndScreenToneSlider->setContentWidgetData( QString( "minimum" ), 0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   247
    mGeneralKeysAndScreenToneSlider->setContentWidgetData( QString( "maximum" ), 5 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   248
    mGeneralKeysAndScreenToneSlider->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   249
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   250
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   251
    mGeneralSreenVibra = mModel->appendDataFormItem( HbDataFormModelItem::SliderItem, QString( hbTrId( "txt_cp_setlabel_touch_screen_vibra" ) ), mGeneralPage );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   252
     //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   253
    mGeneralSreenVibra->setContentWidgetData( QString( "minimum" ), 0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   254
    mGeneralSreenVibra->setContentWidgetData( QString( "maximum" ), 5 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   255
    mGeneralSreenVibra->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenVibra );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   256
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   257
    addConnection( notificationTones, SIGNAL( stateChanged( int )), this, SLOT( on_general_notificationTones_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   258
    addConnection( mGeneralKeysAndScreenToneSlider, SIGNAL( valueChanged( int )), this, SLOT( on_general_keysAndScreenToneSlider_ValueChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   259
    addConnection( mGeneralSreenVibra, SIGNAL( valueChanged( int )), this, SLOT( on_general_screenVibra_ValueChanged( int )));    
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   260
}
19
hgs
parents: 12
diff changeset
   261
*/
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   262
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   263
/*void CpProfileSettingForm::initGeneralVibraGroup()
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   264
{
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   265
    CpProfileSettings profileSettings;
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   266
    mProfileModel->profileSettings( EProfileWrapperGeneralId, profileSettings );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   267
        
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   268
    HbDataFormModelItem *vibraGroup = mModel->appendDataFormGroup(
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   269
        hbTrId( "txt_cp_subhead_vibra" ), mGeneralPage );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   270
    HbDataFormModelItem *ringVibar = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   271
    ringVibar->setContentWidgetData( "text", hbTrId( "txt_cp_list_ring_alet" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   272
    ringVibar->setContentWidgetData( "checkState", profileSettings.mRingAlertVibra?2:0 );    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   273
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   274
    HbDataFormModelItem *messageVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   275
    messageVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_received_message" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   276
    messageVibra->setContentWidgetData( "checkState", profileSettings.mMessageVibra?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   277
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   278
    HbDataFormModelItem *emailVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   279
    emailVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_received_email" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   280
    emailVibra->setContentWidgetData( "checkState", profileSettings.mEmailVibra?2:0 );
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   281
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   282
    HbDataFormModelItem *reminderVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   283
    reminderVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_reminder_alert" ));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   284
    reminderVibra->setContentWidgetData( "checkState", profileSettings.mReminderAlertVibra?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   285
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   286
    HbDataFormModelItem *notificationVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   287
    notificationVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_notification" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   288
    notificationVibra->setContentWidgetData( "checkState", profileSettings.mNotificationVibra?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   289
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   290
    mGeneralSreenVibra = mModel->appendDataFormItem( HbDataFormModelItem::SliderItem, QString( hbTrId( "txt_cp_setlabel_touch_screen_vibra" ) ), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   291
    //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   292
    mGeneralSreenVibra->setContentWidgetData( QString( "minimum" ), 0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   293
    mGeneralSreenVibra->setContentWidgetData( QString( "maximum" ), 5 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   294
    mGeneralSreenVibra->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenVibra );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   295
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   296
    addConnection( ringVibar, SIGNAL( stateChanged( int )), this, SLOT( on_general_ringVibar_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   297
    addConnection( messageVibra, SIGNAL( stateChanged( int )), this, SLOT( on_general_messageVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   298
    addConnection( emailVibra, SIGNAL( stateChanged( int )), this, SLOT( on_general_emailVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   299
    addConnection( reminderVibra, SIGNAL( stateChanged( int )), this, SLOT( on_general_reminderVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   300
    addConnection( notificationVibra, SIGNAL( stateChanged( int )), this, SLOT( on_general_notificationVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   301
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   302
    addConnection( mGeneralSreenVibra, SIGNAL( valueChanged( int )), this, SLOT( on_general_screenVibra_ValueChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   303
}*/
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   304
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   305
////////////////////////////////////////////////////////////
19
hgs
parents: 12
diff changeset
   306
/*void CpProfileSettingForm::initMeetingTonesGroup()
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   307
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   308
    CpProfileSettings profileSettings;
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   309
    mProfileModel->profileSettings( EProfileWrapperMeetingId, profileSettings );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   310
    
19
hgs
parents: 12
diff changeset
   311
   //HbDataFormModelItem *tonesGroup = mModel->appendDataFormGroup(
hgs
parents: 12
diff changeset
   312
   //     hbTrId("txt_cp_subhead_tones"),mMeetingPage);
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   313
    QFileInfo ringToneFileInfo( profileSettings.mRingTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   314
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   315
        hbTrId("txt_cp_dblist_ringtone"), ringToneFileInfo.fileName(), mFileIconProvider->icon( ringToneFileInfo ) ), mMeetingPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   316
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   317
    QFileInfo messageToneFileInfo( profileSettings.mMessageTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   318
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   319
        hbTrId("txt_cp_dblist_message_tone"), messageToneFileInfo.fileName(), mFileIconProvider->icon( messageToneFileInfo ) ), mMeetingPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   320
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   321
    QFileInfo emailToneFileInfo( profileSettings.mEmailTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   322
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   323
        hbTrId("txt_cp_dblist_email_tone"),  emailToneFileInfo.fileName(), mFileIconProvider->icon( emailToneFileInfo ) ), mMeetingPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   324
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   325
    QFileInfo reminderToneFileInfo( profileSettings.mReminderTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   326
    mModel->appendDataFormItem( new CpPersonalizationEntryItemData( *mItemDataHelper,
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   327
        hbTrId("txt_cp_dblist_reminder_tone"), reminderToneFileInfo.fileName(), mFileIconProvider->icon( reminderToneFileInfo ) ), mMeetingPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   328
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   329
    HbDataFormModelItem *notificationTones = mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,QString(),mMeetingPage);
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   330
    notificationTones->setContentWidgetData("text", hbTrId("txt_cp_list_notification_tones"));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   331
    notificationTones->setContentWidgetData( "checkState", profileSettings.mNotificationTone?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   332
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   333
    mMeetingKeysAndScreenToneSlider = 
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   334
            mModel->appendDataFormItem(HbDataFormModelItem::SliderItem ,QString(hbTrId("txt_cp_setlabel_key_and_touchscreen_tones")),mMeetingPage);
19
hgs
parents: 12
diff changeset
   335
    
hgs
parents: 12
diff changeset
   336
    //QMap< QString, QVariant > elements;
hgs
parents: 12
diff changeset
   337
    //elements.insert(QString("IncreaseElement") , QVariant(":/icon/hb_vol_slider_increment.svg"));
hgs
parents: 12
diff changeset
   338
    //elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg") );
hgs
parents: 12
diff changeset
   339
    //elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg") );
hgs
parents: 12
diff changeset
   340
    //mMeetingkeysAndScreenSlider->setContentWidgetData( QString( "elementIcons" ), elements );
hgs
parents: 12
diff changeset
   341
    
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   342
    //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   343
    mMeetingKeysAndScreenToneSlider->setContentWidgetData( QString( "minimum" ), 0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   344
    mMeetingKeysAndScreenToneSlider->setContentWidgetData( QString( "maximum" ), 5 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   345
    mMeetingKeysAndScreenToneSlider->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenTone );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   346
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   347
    mMeetingSreenVibra = mModel->appendDataFormItem( HbDataFormModelItem::SliderItem, QString( hbTrId( "txt_cp_setlabel_touch_screen_vibra" ) ), mMeetingPage );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   348
    //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   349
    mMeetingSreenVibra->setContentWidgetData( QString( "minimum" ), 0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   350
    mMeetingSreenVibra->setContentWidgetData( QString( "maximum" ), 5 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   351
    mMeetingSreenVibra->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenVibra );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   352
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   353
    addConnection( notificationTones, SIGNAL( stateChanged( int )), this, SLOT( on_meeting_notificationTones_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   354
    addConnection( mMeetingKeysAndScreenToneSlider, SIGNAL( valueChanged( int )), this, SLOT( on_meeting_keysAndScreenSlider_ValueChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   355
    addConnection( mMeetingSreenVibra, SIGNAL( valueChanged( int )), this, SLOT( on_meeting_screenVibra_ValueChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   356
}
19
hgs
parents: 12
diff changeset
   357
*/
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   358
/*void CpProfileSettingForm::initMeetingVibraGroup()
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   359
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   360
    CpProfileSettings profileSettings;
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   361
    mProfileModel->profileSettings( EProfileWrapperMeetingId, profileSettings );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   362
        
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   363
    HbDataFormModelItem *vibraGroup = mModel->appendDataFormGroup(
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   364
        hbTrId( "txt_cp_subhead_vibra" ), mMeetingPage );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   365
    HbDataFormModelItem *ringVibar = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   366
    ringVibar->setContentWidgetData( "text", hbTrId( "txt_cp_list_ring_alet" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   367
    ringVibar->setContentWidgetData( "checkState", profileSettings.mRingAlertVibra?2:0 );    
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   368
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   369
    HbDataFormModelItem *messageVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   370
    messageVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_received_message" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   371
    messageVibra->setContentWidgetData( "checkState", profileSettings.mMessageVibra?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   372
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   373
    HbDataFormModelItem *emailVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   374
    emailVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_received_email" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   375
    emailVibra->setContentWidgetData( "checkState", profileSettings.mEmailVibra?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   376
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   377
    HbDataFormModelItem *reminderVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   378
    reminderVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_reminder_alert" ));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   379
    reminderVibra->setContentWidgetData( "checkState", profileSettings.mReminderAlertVibra?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   380
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   381
    HbDataFormModelItem *notificationVibra = mModel->appendDataFormItem( HbDataFormModelItem::CheckBoxItem, QString(), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   382
    notificationVibra->setContentWidgetData( "text", hbTrId( "txt_cp_list_notification" ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   383
    notificationVibra->setContentWidgetData( "checkState", profileSettings.mNotificationVibra?2:0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   384
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   385
    mMeetingSreenVibra = mModel->appendDataFormItem( HbDataFormModelItem::SliderItem, QString( hbTrId( "txt_cp_setlabel_touch_screen_vibra" ) ), vibraGroup );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   386
    //TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   387
    mMeetingSreenVibra->setContentWidgetData( QString( "minimum" ), 0 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   388
    mMeetingSreenVibra->setContentWidgetData( QString( "maximum" ), 5 );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   389
    mMeetingSreenVibra->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenVibra );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   390
    
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   391
    addConnection( ringVibar, SIGNAL( stateChanged( int )), this, SLOT( on_meeting_ringVibar_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   392
    addConnection( messageVibra, SIGNAL( stateChanged( int )), this, SLOT( on_meeting_messageVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   393
    addConnection( emailVibra, SIGNAL( stateChanged( int )), this, SLOT( on_meeting_emailVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   394
    addConnection( reminderVibra, SIGNAL( stateChanged( int )), this, SLOT( on_meeting_reminderVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   395
    addConnection( notificationVibra, SIGNAL( stateChanged( int )), this, SLOT( on_meeting_notificationVibra_stateChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   396
        
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   397
    addConnection( mMeetingSreenVibra, SIGNAL( valueChanged( int )), this, SLOT( on_meeting_screenVibra_ValueChanged( int )));
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   398
}*/
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   399
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   400
////////////////////////////////////////////////////
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   401
//general tones
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   402
void CpProfileSettingForm::on_general_notificationTones_stateChanged(int state)
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   403
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   404
    mProfileModel->setNotificationTone( EProfileWrapperGeneralId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   405
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   406
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   407
void CpProfileSettingForm::on_general_keysAndScreenToneSlider_ValueChanged( int value )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   408
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   409
    mProfileModel->setKeyTouchScreenTone( EProfileWrapperGeneralId, value );
19
hgs
parents: 12
diff changeset
   410
    HbDataFormModelItem *modelItem = profileItem(EProfileWrapperGeneralId,ProfileItemKeyandTouchScreenTones);
hgs
parents: 12
diff changeset
   411
    if (modelItem) {
hgs
parents: 12
diff changeset
   412
        modelItem->setContentWidgetData( QString("value"), value );
hgs
parents: 12
diff changeset
   413
        QMap< QString, QVariant > elements;
hgs
parents: 12
diff changeset
   414
        if (value != 0) {      
hgs
parents: 12
diff changeset
   415
            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
hgs
parents: 12
diff changeset
   416
            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
hgs
parents: 12
diff changeset
   417
            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_unmuted.svg") );            
hgs
parents: 12
diff changeset
   418
        }
hgs
parents: 12
diff changeset
   419
        else {
hgs
parents: 12
diff changeset
   420
            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
hgs
parents: 12
diff changeset
   421
            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
hgs
parents: 12
diff changeset
   422
            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg") );  
hgs
parents: 12
diff changeset
   423
        }
hgs
parents: 12
diff changeset
   424
        modelItem->setContentWidgetData( QString( "elementIcons" ), elements );            
hgs
parents: 12
diff changeset
   425
    }
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   426
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   427
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   428
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   429
//general vibra
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   430
void CpProfileSettingForm::on_general_ringVibar_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   431
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   432
    mProfileModel->setRingAlertVibra( EProfileWrapperGeneralId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   433
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   434
void CpProfileSettingForm::on_general_messageVibra_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   435
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   436
    mProfileModel->setMessageVibra( EProfileWrapperGeneralId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   437
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   438
void CpProfileSettingForm::on_general_emailVibra_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   439
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   440
    mProfileModel->setEmailVibra( EProfileWrapperGeneralId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   441
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   442
void CpProfileSettingForm::on_general_reminderVibra_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   443
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   444
    mProfileModel->setReminderVibra( EProfileWrapperGeneralId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   445
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   446
void CpProfileSettingForm::on_general_notificationVibra_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   447
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   448
    mProfileModel->setNotificationVibra( EProfileWrapperGeneralId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   449
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   450
void CpProfileSettingForm::on_general_screenVibra_ValueChanged( int value )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   451
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   452
    mProfileModel->setKeyTouchScreenVibra( EProfileWrapperGeneralId, value );
19
hgs
parents: 12
diff changeset
   453
    
hgs
parents: 12
diff changeset
   454
    HbDataFormModelItem *modelItem = profileItem(EProfileWrapperGeneralId,ProfileItemTouchScreenVibra);
hgs
parents: 12
diff changeset
   455
    if (modelItem) {
hgs
parents: 12
diff changeset
   456
        modelItem->setContentWidgetData( QString("value"), value );
hgs
parents: 12
diff changeset
   457
    }
11
10d0dd0e43f1 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   458
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   459
}
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   460
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   461
////////////////////////////////////////////////////
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   462
//meeting Tones
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   463
void CpProfileSettingForm::on_meeting_notificationTones_stateChanged(int state)
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   464
{
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   465
    mProfileModel->setNotificationTone( EProfileWrapperMeetingId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   466
}
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   467
19
hgs
parents: 12
diff changeset
   468
void CpProfileSettingForm::on_meeting_keysAndScreenToneSlider_ValueChanged( int value )
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   469
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   470
    mProfileModel->setKeyTouchScreenTone( EProfileWrapperMeetingId, value );
19
hgs
parents: 12
diff changeset
   471
    
hgs
parents: 12
diff changeset
   472
    HbDataFormModelItem *modelItem = profileItem(EProfileWrapperMeetingId,ProfileItemKeyandTouchScreenTones);
hgs
parents: 12
diff changeset
   473
    if (modelItem) {
hgs
parents: 12
diff changeset
   474
        modelItem->setContentWidgetData( QString("value"), value );
hgs
parents: 12
diff changeset
   475
        QMap< QString, QVariant > elements;
hgs
parents: 12
diff changeset
   476
        if (value != 0) {
hgs
parents: 12
diff changeset
   477
            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
hgs
parents: 12
diff changeset
   478
            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
hgs
parents: 12
diff changeset
   479
            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_unmuted.svg") );            
hgs
parents: 12
diff changeset
   480
        }
hgs
parents: 12
diff changeset
   481
        else {
hgs
parents: 12
diff changeset
   482
            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
hgs
parents: 12
diff changeset
   483
            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
hgs
parents: 12
diff changeset
   484
            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg") );  
hgs
parents: 12
diff changeset
   485
        }
hgs
parents: 12
diff changeset
   486
        modelItem->setContentWidgetData( QString( "elementIcons" ), elements );            
hgs
parents: 12
diff changeset
   487
    }
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   488
}
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   489
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   490
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   491
//meeting vibra
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   492
void CpProfileSettingForm::on_meeting_ringVibar_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   493
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   494
    mProfileModel->setRingAlertVibra( EProfileWrapperMeetingId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   495
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   496
void CpProfileSettingForm::on_meeting_messageVibra_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   497
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   498
    mProfileModel->setMessageVibra( EProfileWrapperMeetingId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   499
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   500
void CpProfileSettingForm::on_meeting_emailVibra_stateChanged( int state )
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   501
{
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   502
    mProfileModel->setEmailVibra( EProfileWrapperMeetingId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   503
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   504
void CpProfileSettingForm::on_meeting_reminderVibra_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   505
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   506
    mProfileModel->setReminderVibra( EProfileWrapperMeetingId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   507
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   508
void CpProfileSettingForm::on_meeting_notificationVibra_stateChanged( int state )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   509
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   510
    mProfileModel->setNotificationVibra( EProfileWrapperMeetingId, checkBoxStateToBool( state ) );
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   511
}
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   512
void CpProfileSettingForm::on_meeting_screenVibra_ValueChanged( int value )
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   513
{
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   514
    mProfileModel->setKeyTouchScreenVibra( EProfileWrapperMeetingId, value );
19
hgs
parents: 12
diff changeset
   515
    
hgs
parents: 12
diff changeset
   516
    HbDataFormModelItem *modelItem = profileItem(EProfileWrapperMeetingId,ProfileItemTouchScreenVibra);
hgs
parents: 12
diff changeset
   517
    if (modelItem) {
hgs
parents: 12
diff changeset
   518
        modelItem->setContentWidgetData( QString("value"), value );
hgs
parents: 12
diff changeset
   519
    }
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   520
}
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   521
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   522
bool CpProfileSettingForm::checkBoxStateToBool( int state )
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   523
{
12
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   524
    if( state == Qt::Checked ) {
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   525
        return true;
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   526
    } else {
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   527
        return false;
624337f114fe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   528
    }
10
0a74be98a8bc Revision: 201005
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   529
}
19
hgs
parents: 12
diff changeset
   530
hgs
parents: 12
diff changeset
   531
hgs
parents: 12
diff changeset
   532
void CpProfileSettingForm::settingValueChanged(const XQSettingsKey &key, const QVariant &value)
hgs
parents: 12
diff changeset
   533
{
hgs
parents: 12
diff changeset
   534
    if (key.uid() == KCRUidProfileEngine.iUid && key.key() == KProEngSilenceMode && value.isValid()) {
hgs
parents: 12
diff changeset
   535
    
hgs
parents: 12
diff changeset
   536
		static const int silenceSensitiveModelItemIds[] = 
hgs
parents: 12
diff changeset
   537
		{       
hgs
parents: 12
diff changeset
   538
			CpProfileSettingForm::ProfileItemRingTone,
hgs
parents: 12
diff changeset
   539
			CpProfileSettingForm::ProfileItemMessageTone,
hgs
parents: 12
diff changeset
   540
			CpProfileSettingForm::ProfileItemEmailTone,
hgs
parents: 12
diff changeset
   541
			CpProfileSettingForm::ProfileItemReminderTone,
hgs
parents: 12
diff changeset
   542
			CpProfileSettingForm::ProfileItemNotificationTones,
hgs
parents: 12
diff changeset
   543
			CpProfileSettingForm::ProfileItemKeyandTouchScreenTones
hgs
parents: 12
diff changeset
   544
		};
hgs
parents: 12
diff changeset
   545
    
hgs
parents: 12
diff changeset
   546
        QHash< int,QHash<int,HbDataFormModelItem*>  >::const_iterator it (mProfileModelItems.begin());
hgs
parents: 12
diff changeset
   547
        for(; it != mProfileModelItems.end(); ++it ) {          
hgs
parents: 12
diff changeset
   548
            for (int i = 0; i < sizeof(silenceSensitiveModelItemIds)/sizeof(silenceSensitiveModelItemIds[0]);++i) {           
hgs
parents: 12
diff changeset
   549
                QHash<int,HbDataFormModelItem*>::const_iterator found = it.value().find(silenceSensitiveModelItemIds[i]);
hgs
parents: 12
diff changeset
   550
                if (found != it.value().end()) {
hgs
parents: 12
diff changeset
   551
                    found.value()->setEnabled(!value.toBool());
hgs
parents: 12
diff changeset
   552
                }
hgs
parents: 12
diff changeset
   553
            }   
hgs
parents: 12
diff changeset
   554
        }
hgs
parents: 12
diff changeset
   555
    }
hgs
parents: 12
diff changeset
   556
}
hgs
parents: 12
diff changeset
   557
hgs
parents: 12
diff changeset
   558
HbDataFormModelItem *CpProfileSettingForm::profileItem(int profileId,int profileItemId)
hgs
parents: 12
diff changeset
   559
{
hgs
parents: 12
diff changeset
   560
    return mProfileModelItems.value(profileId).value(profileItemId);
hgs
parents: 12
diff changeset
   561
}
hgs
parents: 12
diff changeset
   562
hgs
parents: 12
diff changeset
   563
//End of File