161 iPercentTextVisual = CAlfTextVisual::AddNewL(*this,iValueGridVisual); |
161 iPercentTextVisual = CAlfTextVisual::AddNewL(*this,iValueGridVisual); |
162 |
162 |
163 // BackGround Visual |
163 // BackGround Visual |
164 iBackgroundImageVisual->EnableBrushesL(); |
164 iBackgroundImageVisual->EnableBrushesL(); |
165 iBackgroundImageVisual->SetOpacity( KHalfOpacityOpaque ); |
165 iBackgroundImageVisual->SetOpacity( KHalfOpacityOpaque ); |
166 |
|
167 // Get the icon file |
|
168 TFileName mifFile( KDC_APP_BITMAP_DIR ); |
|
169 mifFile.Append( KIconsFilename ); |
|
170 User::LeaveIfError( CompleteWithAppPath( mifFile ) ); |
|
171 // Get the texture manager |
|
172 CGlxTextureManager& textureMgr = iUtility.GlxTextureManager(); |
|
173 // Load the background texture |
|
174 |
|
175 // Below given icon ID is to be changed once the Capped_element Icon |
|
176 // is available in the build |
|
177 CAlfTexture& backgroundTexture = textureMgr.CreateIconTextureL |
|
178 ( EMbmGlxiconsQgn_graf_adapt_search_bg, mifFile ); |
|
179 |
|
180 // apply an image brush to the visual |
|
181 iBrush = CAlfImageBrush::NewL(iAlfEnv, TAlfImage( backgroundTexture ) ); |
|
182 iBackgroundImageVisual->Brushes()->AppendL( iBrush, EAlfHasOwnership ); |
|
183 iBackgroundImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside ); |
|
184 // Muted visual |
|
185 CAlfTexture& textureMuted = iUtility.GlxTextureManager().CreateIconTextureL |
|
186 ( EMbmGlxiconsQgn_indi_mup_speaker_muted, mifFile ); |
|
187 iMuteImageVisual->SetImage( textureMuted ); |
|
188 iMuteImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside ); |
|
189 |
|
190 // Speaker visual |
|
191 CAlfTexture& textureSpkr = iUtility.GlxTextureManager().CreateIconTextureL |
|
192 ( EMbmGlxiconsQgn_indi_mup_speaker, mifFile ); |
|
193 iSpeakerImageVisual->SetImage( textureSpkr ); |
|
194 iSpeakerImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside ); |
|
195 |
166 |
196 //hide the volume level visualation by default |
167 //hide the volume level visualation by default |
197 iMainVisual->SetOpacity(KOpacityTransperent); |
168 iMainVisual->SetOpacity(KOpacityTransperent); |
198 |
169 |
199 // Only create the timer if an interval's been specified - |
170 // Only create the timer if an interval's been specified - |
252 { |
223 { |
253 CAlfRoster& roster = display->Roster(); |
224 CAlfRoster& roster = display->Roster(); |
254 roster.Hide( *group ); |
225 roster.Hide( *group ); |
255 } |
226 } |
256 } |
227 } |
|
228 |
|
229 // --------------------------------------------------------------------------- |
|
230 // InitControlTextureL |
|
231 // --------------------------------------------------------------------------- |
|
232 void CShwSlideshowVolumeControl::InitControlTextureL() |
|
233 { |
|
234 TRACER("CShwSlideshowVolumeControl::InitControlTextureL"); |
|
235 // Get the icon file |
|
236 TFileName mifFile( KDC_APP_BITMAP_DIR ); |
|
237 mifFile.Append( KIconsFilename ); |
|
238 User::LeaveIfError( CompleteWithAppPath( mifFile ) ); |
|
239 // Get the texture manager |
|
240 CGlxTextureManager& textureMgr = iUtility.GlxTextureManager(); |
|
241 // Load the background texture |
|
242 |
|
243 // Below given icon ID is to be changed once the Capped_element Icon |
|
244 // is available in the build |
|
245 CAlfTexture& backgroundTexture = textureMgr.CreateIconTextureL |
|
246 ( EMbmGlxiconsQgn_graf_adapt_search_bg, mifFile ); |
|
247 |
|
248 // apply an image brush to the visual |
|
249 iBrush = CAlfImageBrush::NewL(iAlfEnv, TAlfImage( backgroundTexture ) ); |
|
250 iBackgroundImageVisual->Brushes()->AppendL( iBrush, EAlfHasOwnership ); |
|
251 iBackgroundImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside ); |
|
252 // Muted visual |
|
253 CAlfTexture& textureMuted = iUtility.GlxTextureManager().CreateIconTextureL |
|
254 ( EMbmGlxiconsQgn_indi_mup_speaker_muted, mifFile ); |
|
255 iMuteImageVisual->SetImage( textureMuted ); |
|
256 iMuteImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside ); |
|
257 |
|
258 // Speaker visual |
|
259 CAlfTexture& textureSpkr = iUtility.GlxTextureManager().CreateIconTextureL |
|
260 ( EMbmGlxiconsQgn_indi_mup_speaker, mifFile ); |
|
261 iSpeakerImageVisual->SetImage( textureSpkr ); |
|
262 iSpeakerImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside ); |
|
263 } |
|
264 |
257 // --------------------------------------------------------------------------- |
265 // --------------------------------------------------------------------------- |
258 // ShowControlL |
266 // ShowControlL |
259 // --------------------------------------------------------------------------- |
267 // --------------------------------------------------------------------------- |
260 TBool CShwSlideshowVolumeControl::ShowControlL() |
268 TBool CShwSlideshowVolumeControl::ShowControlL() |
261 { |
269 { |