97 // |
97 // |
98 TInt |
98 TInt |
99 CCamStaticSettingsModel::IntegerSettingValue( TInt aSettingItem ) const |
99 CCamStaticSettingsModel::IntegerSettingValue( TInt aSettingItem ) const |
100 { |
100 { |
101 TInt value = KErrNotFound; |
101 TInt value = KErrNotFound; |
|
102 const RPointerArray<TIntSetting> *iStaticIntSettings=NULL; |
102 // If setting item is in the static photo settings return it's value. |
103 // If setting item is in the static photo settings return it's value. |
103 if( ECamSettingItemStaticPhotoRangeMax > aSettingItem |
104 if( ECamSettingItemStaticPhotoRangeMax > aSettingItem |
104 && ECamSettingItemStaticPhotoRangeMin < aSettingItem ) |
105 && ECamSettingItemStaticPhotoRangeMin < aSettingItem ) |
105 { |
106 { |
106 TInt settingIndex = SearchInSettingsListFor( |
107 iStaticIntSettings=&iStaticPhotoIntSettings; |
107 iStaticPhotoIntSettings, |
|
108 aSettingItem ); |
|
109 value = iStaticPhotoIntSettings[settingIndex]->iValueId; |
|
110 } |
108 } |
111 // Otherwise, if setting item is in the static video settings return it's value. |
109 // Otherwise, if setting item is in the static video settings return it's value. |
112 else if( ECamSettingItemStaticVideoRangeMax > aSettingItem |
110 else if( ECamSettingItemStaticVideoRangeMax > aSettingItem |
113 && ECamSettingItemStaticVideoRangeMin < aSettingItem ) |
111 && ECamSettingItemStaticVideoRangeMin < aSettingItem ) |
114 { |
112 { |
115 TInt settingIndex = SearchInSettingsListFor( iStaticVideoIntSettings, aSettingItem ); |
113 iStaticIntSettings=&iStaticVideoIntSettings; |
116 value = iStaticVideoIntSettings[settingIndex]->iValueId; |
|
117 } |
114 } |
118 // Look in static common settings. |
115 // Look in static common settings. |
119 else if( ECamSettingItemStaticCommonRangeMax > aSettingItem |
116 else if( ECamSettingItemStaticCommonRangeMax > aSettingItem |
120 && ECamSettingItemStaticCommonRangeMin < aSettingItem ) |
117 && ECamSettingItemStaticCommonRangeMin < aSettingItem ) |
121 { |
118 { |
122 TInt settingIndex = SearchInSettingsListFor( iStaticCommonIntSettings, aSettingItem ); |
119 iStaticIntSettings=&iStaticCommonIntSettings; |
123 value = iStaticCommonIntSettings[settingIndex]->iValueId; |
|
124 } |
120 } |
125 else |
121 else |
126 { |
122 { |
127 PRINT( _L("Camera <> Not found, PANIC !! ECamPanicUnknownSettingItem" )) |
123 PRINT( _L("Camera <> Not found, PANIC !! ECamPanicUnknownSettingItem" )) |
128 CamPanic( ECamPanicUnknownSettingItem ); |
124 CamPanic( ECamPanicUnknownSettingItem ); |
129 } |
125 } |
|
126 |
|
127 if( iStaticIntSettings ) |
|
128 { |
|
129 TInt settingIndex = SearchInSettingsListFor( |
|
130 *iStaticIntSettings, |
|
131 aSettingItem ); |
|
132 if( settingIndex < iStaticIntSettings->Count() && settingIndex >= 0 ) |
|
133 { |
|
134 value = (*iStaticIntSettings)[settingIndex]->iValueId; |
|
135 } |
|
136 } |
130 return value; |
137 return value; |
131 } |
138 } |
132 |
139 |
133 |
140 |
134 // --------------------------------------------------------------------------- |
141 // --------------------------------------------------------------------------- |
730 case ECamSettingItemDefaultAlbumName: crKey = KCamCrDefaultAlbumTitle; break; |
737 case ECamSettingItemDefaultAlbumName: crKey = KCamCrDefaultAlbumTitle; break; |
731 case ECamSettingItemRecLocation: crKey = KCamCrPhotoStoreLocation; break; |
738 case ECamSettingItemRecLocation: crKey = KCamCrPhotoStoreLocation; break; |
732 case ECamSettingItemPhotoEditorSupport: crKey = KCamCrPhotoEditorSupport; break; |
739 case ECamSettingItemPhotoEditorSupport: crKey = KCamCrPhotoEditorSupport; break; |
733 case ECamSettingItemVideoEditorSupport: crKey = KCamCrVideoEditorSupport; break; |
740 case ECamSettingItemVideoEditorSupport: crKey = KCamCrVideoEditorSupport; break; |
734 case ECamSettingItemRemovePhoneMemoryUsage: crKey = KCamCrRemovePhoneMemoryUsage; break; |
741 case ECamSettingItemRemovePhoneMemoryUsage: crKey = KCamCrRemovePhoneMemoryUsage; break; |
|
742 case ECamSettingItemStopRecordingInHdmiMode: crKey = KCamCrStopRecordingInHdmiMode; break; |
735 |
743 |
736 default: CamPanic( ECamPanicUnknownSettingItem ); |
744 default: CamPanic( ECamPanicUnknownSettingItem ); |
737 break; |
745 break; |
738 } |
746 } |
739 } |
747 } |