wlanutilities/wlanplugin/src/wlanplugin.cpp
branchRCL_3
changeset 15 dff6ebfd236f
parent 0 56b72877c1cb
equal deleted inserted replaced
8:c2bc3f8c7777 15:dff6ebfd236f
   230 // CWlanPlugin::CreateIconL
   230 // CWlanPlugin::CreateIconL
   231 // ---------------------------------------------------------    
   231 // ---------------------------------------------------------    
   232 CGulIcon* CWlanPlugin::CreateIconL( const TUid aIconType )
   232 CGulIcon* CWlanPlugin::CreateIconL( const TUid aIconType )
   233     {
   233     {
   234 
   234 
   235     CLOG_ENTERFN( "CWlanPlugin::CreateIconL()" );    
   235     CLOG_ENTERFN( "CWlanPlugin::CreateIconL()" );  
   236 
   236 
   237     TFileName iconsFileName;
   237     TFileName iconsFileName;
   238 
   238 
   239     iconsFileName.Append( KDriveZ );
   239     iconsFileName.Append( KDriveZ );
   240     iconsFileName.Append( KDC_APP_BITMAP_DIR );
   240     iconsFileName.Append( KDC_APP_BITMAP_DIR );
   243     CGulIcon* icon;
   243     CGulIcon* icon;
   244        
   244        
   245     TInt pic, picmask;
   245     TInt pic, picmask;
   246     TAknsItemID itemid;
   246     TAknsItemID itemid;
   247     //if the main icon is asked   
   247     //if the main icon is asked   
   248     if( aIconType == KGSIconTypeLbxItem )
   248     if ( aIconType == KGSIconTypeLbxItem )
   249         {
   249         {
   250         if( iWlanState->GetMainIconL( pic, picmask, itemid ) )
   250         if ( iWlanState->GetMainIconL( pic, picmask, itemid ) )
   251             {
   251             {
   252             icon = AknsUtils::CreateGulIconL(
   252             icon = AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(),
   253             AknsUtils::SkinInstance(), 
   253                                               itemid, 
   254             itemid, 
   254                                               iconsFileName, 
   255             iconsFileName,
   255                                               pic, 
   256             pic,
   256                                               picmask );
   257             picmask );
       
   258             }
   257             }
   259         else
   258         else
   260             {
   259             {
   261             icon = CGSPluginInterface::CreateIconL( aIconType );
   260             icon = CGSPluginInterface::CreateIconL( aIconType );
   262             }
   261             }
   263         }
   262         }
   264      //if the secondary icon is asked   
   263     //if the secondary icon is asked   
   265      else if( aIconType == KGSIconTypeDColumn )
   264     else if ( aIconType == KGSIconTypeDColumn )
   266         {
   265         {
   267          //if there should be icon
   266         //if there should be icon
   268          if( iWlanState->GetStrengthIconL( pic, picmask, itemid ) )
   267         if ( iWlanState->GetStrengthIconL( pic, picmask, itemid ) )
   269             {
   268             {
   270             icon = AknsUtils::CreateGulIconL(
   269             icon = CGulIcon::NewLC();
   271             AknsUtils::SkinInstance(), 
   270             CFbsBitmap* bitmap;
   272             itemid, 
   271             CFbsBitmap* mask;
   273             iconsFileName,
   272 
   274             pic,
   273             // Creates bitmap an icon. 
   275             picmask );
   274             AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), 
   276 
   275                                          itemid,
       
   276                                          KAknsIIDQsnIconColors, 
       
   277                                          EAknsCIQsnIconColorsCG13, 
       
   278                                          bitmap,
       
   279                                          mask, 
       
   280                                          iconsFileName, 
       
   281                                          pic, 
       
   282                                          picmask, 
       
   283                                          KRgbBlack );
       
   284 
       
   285             icon->SetBitmap( bitmap );
       
   286             icon->SetMask( mask );
       
   287             CleanupStack::Pop( icon );
   277             }
   288             }
   278          //if there should be no icons
   289         //if there should be no icons
   279          else
   290         else
   280             {
   291             {
   281             icon = CGSPluginInterface::CreateIconL( aIconType );
   292             icon = CGSPluginInterface::CreateIconL( aIconType );
   282             }
   293             }
   283         }
   294         }
   284      //in other case of icons
   295      //in other case of icons