photosgallery/slideshow/view/src/shwslideshowvolumecontrol.cpp
branchRCL_3
changeset 75 01504893d9cb
parent 60 5b3385a43d68
equal deleted inserted replaced
68:5b238bc8ffb6 75:01504893d9cb
   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 );	
   166 	
   195 	
   167 	//hide the volume level visualation by default
   196 	//hide the volume level visualation by default
   168 	iMainVisual->SetOpacity(KOpacityTransperent);
   197 	iMainVisual->SetOpacity(KOpacityTransperent);
   169 
   198 
   170 	// Only create the timer if an interval's been specified - 
   199 	// Only create the timer if an interval's been specified - 
   223 		{
   252 		{
   224 		CAlfRoster& roster = display->Roster();
   253 		CAlfRoster& roster = display->Roster();
   225 		roster.Hide( *group );
   254 		roster.Hide( *group );
   226 		}	
   255 		}	
   227 	}
   256 	}
   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 
       
   265 // ---------------------------------------------------------------------------
   257 // ---------------------------------------------------------------------------
   266 // ShowControlL
   258 // ShowControlL
   267 // ---------------------------------------------------------------------------
   259 // ---------------------------------------------------------------------------
   268 TBool CShwSlideshowVolumeControl::ShowControlL()
   260 TBool CShwSlideshowVolumeControl::ShowControlL()
   269     {
   261     {