profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfileSettingsContainer.cpp
branchRCL_3
changeset 11 bc161388e3ce
parent 10 b79ee333c41d
child 14 232e127a1fe4
equal deleted inserted replaced
10:b79ee333c41d 11:bc161388e3ce
    49 #include    <eikapp.h>
    49 #include    <eikapp.h>
    50 #include    <csxhelp/mode.hlp.hrh>
    50 #include    <csxhelp/mode.hlp.hrh>
    51 #include    <featmgr.h>
    51 #include    <featmgr.h>
    52 #include    <MProfileExtended.h>
    52 #include    <MProfileExtended.h>
    53 
    53 
       
    54 #include    <MProfileTones.h>
    54 #include    <MProfile3DToneSettings.h>
    55 #include    <MProfile3DToneSettings.h>
    55 #include    <MProfileFeedbackSettings.h>
    56 #include    <MProfileFeedbackSettings.h>
    56 #include    <MProfileExtraSettings.h>
    57 #include    <MProfileExtraSettings.h>
    57 
    58 
    58 #include    <MProfileEngineExtended.h>
    59 #include    <MProfileEngineExtended.h>
    74 // for power save mode handling
    75 // for power save mode handling
    75 #include    <psmsettings.h>
    76 #include    <psmsettings.h>
    76 #include    <psmsrvdomaincrkeys.h>
    77 #include    <psmsrvdomaincrkeys.h>
    77 #include    <e32property.h>
    78 #include    <e32property.h>
    78 #include    <ProfileEnginePrivatePSKeys.h>
    79 #include    <ProfileEnginePrivatePSKeys.h>
       
    80 #include    <TProfileToneSettings.h>
    79 
    81 
    80 namespace
    82 namespace
    81 	{
    83 	{
    82 	// CONSTANTS
    84 	// CONSTANTS
    83 	const TUid KUidProfileApp = { 0x100058F8 }; // UID of the application
    85 	const TUid KUidProfileApp = { 0x100058F8 }; // UID of the application
   534 void CProfileSettingsContainer::SetHiddenFlagsL()
   536 void CProfileSettingsContainer::SetHiddenFlagsL()
   535     {
   537     {
   536     CAknSettingItemArray* array = SettingItemArray();
   538     CAknSettingItemArray* array = SettingItemArray();
   537     TUint32 flags( iProfile->VisibleFlags() );
   539     TUint32 flags( iProfile->VisibleFlags() );
   538     TInt profileId( 0 );
   540     TInt profileId( 0 );
   539 
   541 	const MProfileTones& tones = iProfile->ProfileTones();
       
   542 	const TProfileToneSettings& toneSettings = tones.ToneSettings();
       
   543 	
   540     TBool hide3DEcho = EFalse;
   544     TBool hide3DEcho = EFalse;
   541     TInt effect = iProfile->ProfileExtraSettings().Profile3DToneSettings().Effect();
   545     TInt effect = iProfile->ProfileExtraSettings().Profile3DToneSettings().Effect();
   542     if ( effect == EProfile3DEffectOff || effect == EProfile3DEffectStereoWidening )
   546     if ( effect == EProfile3DEffectOff || effect == EProfile3DEffectStereoWidening )
   543         {
   547         {
   544         hide3DEcho = ETrue;
   548         hide3DEcho = ETrue;
   612 		!( ( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) ) &&
   616 		!( ( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) ) &&
   613 		( flags & EProfileFlagMediaVolume ) ) );
   617 		( flags & EProfileFlagMediaVolume ) ) );
   614 		
   618 		
   615 	SetItemHidden( EProfileSettingVibratingAlertId, array,
   619 	SetItemHidden( EProfileSettingVibratingAlertId, array,
   616         ~flags & EProfileFlagVibratingAlert );
   620         ~flags & EProfileFlagVibratingAlert );
   617         
   621 
   618 	SetItemHidden( EProfileSettingEmailVibratingAlertId, array,
   622 	if(!iCopyProfile->iVibratingAlert)
   619         ~flags & EProfileFlagVibratingAlert );
   623 	   {
   620     SetItemHidden( EProfileSettingKeypadVolumeId, array,
   624 	   SetItemHidden( EProfileSettingEmailVibratingAlertId, array,ETrue );	
       
   625 	   }
       
   626 	else
       
   627 	   {
       
   628 	   SetItemHidden( EProfileSettingEmailVibratingAlertId, array,EFalse );
       
   629 	   }         
       
   630 
       
   631 	SetItemHidden( EProfileSettingKeypadVolumeId, array,
   621         ~flags & EProfileFlagKeypadVolume );
   632         ~flags & EProfileFlagKeypadVolume );
   622         
   633         
   623     SetItemHidden( EProfileSettingWarningAndGameTonesId, array,
   634     SetItemHidden( EProfileSettingWarningAndGameTonesId, array,
   624         ~flags & EProfileFlagWarningTones );
   635         ~flags & EProfileFlagWarningTones );
   625 
   636 
   786     TInt threeDEffect = iCopyProfile->i3DEffect;
   797     TInt threeDEffect = iCopyProfile->i3DEffect;
   787     if( identifier == EProfileSetting3dEffectId && iIndexHandler )
   798     if( identifier == EProfileSetting3dEffectId && iIndexHandler )
   788     	{
   799     	{
   789     	iIndexHandler->StoreIndices();
   800     	iIndexHandler->StoreIndices();
   790     	}
   801     	}
   791 
   802     
       
   803     TInt vibratingAlert = iCopyProfile->iVibratingAlert;
       
   804     if( identifier == EProfileSettingVibratingAlertId && iIndexHandler )
       
   805       	{
       
   806       	iIndexHandler->StoreIndices();
       
   807       	}
       
   808     
   792     // Set boolean value to ETrue that we know that the settings container
   809     // Set boolean value to ETrue that we know that the settings container
   793     // is in editing mode.
   810     // is in editing mode.
   794     iItemEdited = ETrue;
   811     iItemEdited = ETrue;
   795     // Store currently active profile id
   812     // Store currently active profile id
   796     TInt activeProfileId( iEngineHandler.Engine()->ActiveProfileId() );
   813     TInt activeProfileId( iEngineHandler.Engine()->ActiveProfileId() );
   832             
   849             
   833         if ( threeDEffect != iCopyProfile->i3DEffect )
   850         if ( threeDEffect != iCopyProfile->i3DEffect )
   834             {
   851             {
   835             UpdateSettingsL( EFalse );  // hide 3DEcho if 3DEffect is off
   852             UpdateSettingsL( EFalse );  // hide 3DEcho if 3DEffect is off
   836             }
   853             }
       
   854         
       
   855         if ( vibratingAlert != iCopyProfile->iVibratingAlert )
       
   856           	{
       
   857           	UpdateSettingsL( EFalse ); //hide emailVibrating alert if vibrating alert is off
       
   858            	}
   837         }
   859         }
   838     // If the setting is an external (= only in Tones View):
   860     // If the setting is an external (= only in Tones View):
   839     iExternalSettingsHandler.StoreIfChangedL( identifier );
   861     iExternalSettingsHandler.StoreIfChangedL( identifier );
   840 
   862 
   841     if( titleText )
   863     if( titleText )