uifw/AvKon/src/AknSignalIcon.cpp
changeset 0 2f259fa3e83a
child 10 9f56a4e1b8ab
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Signal pane icon control.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 
       
    21 #include <AknsDrawUtils.h>
       
    22 #include <eikenv.h>
       
    23 #include <akniconconfig.h>
       
    24 #include <avkon.mbg>
       
    25 
       
    26 #include <AknTasHook.h>
       
    27 #include "AknSignalIcon.h"
       
    28 #include "aknconsts.h"
       
    29 #include "AknUtils.h"
       
    30 #include "AknStatuspaneUtils.h"
       
    31 #include "aknappui.h"
       
    32 
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 // CAknSignalIcon::~CAknSignalIcon
       
    36 // Destructor
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 CAknSignalIcon::~CAknSignalIcon()
       
    40 	{
       
    41 	AKNTASHOOK_REMOVE();
       
    42     AknsUtils::DeregisterControlPosition( this );
       
    43     delete iSignalIcon;
       
    44     delete iSignalIconMask;
       
    45 	}
       
    46 
       
    47 
       
    48 // ---------------------------------------------------------------------------
       
    49 // CAknSignalIcon::NewL
       
    50 // Two-phased constructor.
       
    51 // ---------------------------------------------------------------------------
       
    52 //
       
    53 CAknSignalIcon* CAknSignalIcon::NewL()
       
    54 	{
       
    55 	CAknSignalIcon* self = CAknSignalIcon::NewLC();
       
    56 	CleanupStack::Pop( self );
       
    57 	return self;
       
    58 	}
       
    59 
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // CAknSignalIcon::NewLC
       
    63 // Two-phased constructor.
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 CAknSignalIcon* CAknSignalIcon::NewLC()
       
    67 	{
       
    68 	CAknSignalIcon* self = new (ELeave) CAknSignalIcon;
       
    69 	CleanupStack::PushL( self );
       
    70 	self->ConstructL();
       
    71 	AKNTASHOOK_ADDL( self, "CAknSignalIcon" );
       
    72 	return self;
       
    73 	}
       
    74 
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CAknSignalIcon::SetSignalIcon
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 void CAknSignalIcon::SetSignalIcon( CFbsBitmap* aIcon )
       
    81     {
       
    82     iSignalIcon = aIcon;
       
    83     AknIconUtils::SetSize( iSignalIcon, Size() );
       
    84     }
       
    85 
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CAknSignalIcon::SetSignalIconMask
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 void CAknSignalIcon::SetSignalIconMask( CFbsBitmap* aMask )
       
    92     {
       
    93     iSignalIconMask = aMask;
       
    94     }
       
    95 
       
    96 
       
    97 // ---------------------------------------------------------------------------
       
    98 // CAknSignalIcon::SetDrawBlank
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 void CAknSignalIcon::SetDrawBlank( TBool aDrawBlank )
       
   102     {
       
   103     iDrawBlank = aDrawBlank;
       
   104     }
       
   105 
       
   106 
       
   107 // ---------------------------------------------------------------------------
       
   108 // CAknSignalIcon::DrawBlank
       
   109 // ---------------------------------------------------------------------------
       
   110 //
       
   111 TBool CAknSignalIcon::DrawBlank()
       
   112     {
       
   113     return iDrawBlank;
       
   114     }
       
   115 
       
   116 
       
   117 // ---------------------------------------------------------------------------
       
   118 // CAknSignalIcon::SetOffLine
       
   119 // ---------------------------------------------------------------------------
       
   120 //
       
   121 void CAknSignalIcon::SetOffLine( TBool aOffLine )
       
   122     {
       
   123     TBool changedToOnline( !aOffLine && iOffLine );
       
   124     
       
   125     iOffLine = aOffLine;
       
   126     
       
   127     if ( changedToOnline )
       
   128         {
       
   129         // In offline mode the icon contains offline icon,
       
   130         // so a correct connection state icon must be re-loaded here.
       
   131         TRAP_IGNORE( LoadIconL( iIconState, iColorIndex, ETrue ) );
       
   132         }
       
   133     }
       
   134 
       
   135 
       
   136 // ---------------------------------------------------------------------------
       
   137 // CAknSignalIcon::OffLine
       
   138 // ---------------------------------------------------------------------------
       
   139 //
       
   140 TBool CAknSignalIcon::OffLine()
       
   141 	{
       
   142 	return iOffLine;	
       
   143 	}
       
   144 
       
   145 
       
   146 // ---------------------------------------------------------------------------
       
   147 // CAknSignalIcon::SetColorIndex
       
   148 // ---------------------------------------------------------------------------
       
   149 //
       
   150 void CAknSignalIcon::SetColorIndex( TInt aColorIndex )
       
   151 	{
       
   152 	iColorIndex = aColorIndex;	
       
   153 	}
       
   154 
       
   155 
       
   156 // ---------------------------------------------------------------------------
       
   157 // CAknSignalIcon::ColorIndex
       
   158 // ---------------------------------------------------------------------------
       
   159 //
       
   160 TInt CAknSignalIcon::ColorIndex()
       
   161 	{
       
   162 	return iColorIndex;	
       
   163 	}
       
   164 
       
   165 // ---------------------------------------------------------------------------
       
   166 // CAknSignalIcon::LoadIconL
       
   167 // ---------------------------------------------------------------------------
       
   168 //
       
   169 void CAknSignalIcon::LoadIconL( TInt aIconState,
       
   170                                 TInt aIconColorIndex,
       
   171                                 TBool aForceLoad )
       
   172     {
       
   173     if ( iIconState == aIconState &&
       
   174          aIconColorIndex == iColorIndex &&
       
   175          !aForceLoad )
       
   176         {
       
   177         // Icon already loaded.
       
   178         return;
       
   179         }
       
   180     
       
   181     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
   182     CFbsBitmap* bitmap      = NULL;
       
   183     CFbsBitmap* mask        = NULL;
       
   184 
       
   185     if ( iOffLine )
       
   186         {
       
   187         // Offline mode is not an actual signal state in the signal icon
       
   188         // control, but it needs to be represented by an offline signal
       
   189         // icon in the universal indicator popup.
       
   190         AknsUtils::CreateColorIconL( skin,
       
   191                                      KAknsIIDNone,
       
   192                                      KAknsIIDQsnIconColors,
       
   193                                      aIconColorIndex,
       
   194                                      bitmap,
       
   195                                      mask, 
       
   196                                      AknIconUtils::AvkonIconFileName(), 
       
   197                                      EMbmAvkonQgn_indi_signal_offline,
       
   198                                      EMbmAvkonQgn_indi_signal_offline_mask,
       
   199                                      KRgbGray ); 
       
   200         }
       
   201     else
       
   202         {
       
   203         switch( aIconState )
       
   204             {
       
   205             // Old legacy GPRS icons.
       
   206             case EAknSignalGprsIndicatorOff:
       
   207             case EAknSignalGprsIndicatorAvailable: // fallthrough
       
   208                 AknsUtils::CreateColorIconL( skin,
       
   209                                              KAknsIIDQgnPropSignalIcon,
       
   210                                              KAknsIIDQsnIconColors,
       
   211                                              aIconColorIndex,
       
   212                                              bitmap,
       
   213                                              mask,
       
   214                                              AknIconUtils::AvkonIconFileName(),
       
   215                                              EMbmAvkonQgn_prop_signal_icon,
       
   216                                              EMbmAvkonQgn_prop_signal_icon_mask,
       
   217                                              KRgbGray );
       
   218                 break;
       
   219             case EAknSignalGprsIndicatorAttached:
       
   220             case EAknSignalGprsIndicatorEstablishingContext: // fallthrough
       
   221                 AknsUtils::CreateColorIconL( skin,
       
   222                                              KAknsIIDQgnIndiSignalGprsContext,
       
   223                                              KAknsIIDQsnIconColors,
       
   224                                              aIconColorIndex,
       
   225                                              bitmap,
       
   226                                              mask, 
       
   227                                              AknIconUtils::AvkonIconFileName(),
       
   228                                              EMbmAvkonQgn_indi_signal_gprs_context,
       
   229                                              EMbmAvkonQgn_indi_signal_gprs_context_mask,
       
   230                                              KRgbGray  );
       
   231                 break;
       
   232             case EAknSignalGprsIndicatorContext:
       
   233                 AknsUtils::CreateColorIconL( skin,
       
   234                                              KAknsIIDQgnIndiSignalGprsContext,
       
   235                                              KAknsIIDQsnIconColors,
       
   236                                              aIconColorIndex,
       
   237                                              bitmap,
       
   238                                              mask, 
       
   239                                              AknIconUtils::AvkonIconFileName(),
       
   240                                              EMbmAvkonQgn_indi_signal_gprs_context,
       
   241                                              EMbmAvkonQgn_indi_signal_gprs_context_mask,
       
   242                                              KRgbGray  );
       
   243                 break;
       
   244             case EAknSignalGprsIndicatorSuspended:
       
   245                 AknsUtils::CreateColorIconL( skin,
       
   246                                              KAknsIIDQgnIndiSignalGprsSuspended,
       
   247                                              KAknsIIDQsnIconColors,
       
   248                                              aIconColorIndex,
       
   249                                              bitmap,
       
   250                                              mask, 
       
   251                                              AknIconUtils::AvkonIconFileName(),
       
   252                                              EMbmAvkonQgn_indi_signal_gprs_suspended,
       
   253                                              EMbmAvkonQgn_indi_signal_gprs_suspended_mask,
       
   254                                              KRgbGray  );       
       
   255                 break;
       
   256             case EAknSignalGprsIndicatorMultipdp:
       
   257                 AknsUtils::CreateColorIconL( skin,
       
   258                                              KAknsIIDQgnIndiSignalGprsMultipdp,
       
   259                                              KAknsIIDQsnIconColors,
       
   260                                              aIconColorIndex,
       
   261                                              bitmap,
       
   262                                              mask, 
       
   263                                              AknIconUtils::AvkonIconFileName(),
       
   264                                              EMbmAvkonQgn_indi_signal_gprs_multipdp,
       
   265                                              EMbmAvkonQgn_indi_signal_gprs_multipdp_mask,
       
   266                                              KRgbGray );
       
   267                 break;          
       
   268                 
       
   269             // Create common packet data indicator bitmaps.
       
   270             case EAknSignalCommonPacketDataIndicatorOff:
       
   271             case EAknSignalCommonPacketDataIndicatorAvailable: // fallthrough
       
   272                 AknsUtils::CreateColorIconL( skin,
       
   273                                              KAknsIIDQgnPropSignalIcon,
       
   274                                              KAknsIIDQsnIconColors,
       
   275                                              aIconColorIndex,
       
   276                                              bitmap,
       
   277                                              mask,
       
   278                                              AknIconUtils::AvkonIconFileName(), 
       
   279                                              EMbmAvkonQgn_prop_signal_icon,
       
   280                                              EMbmAvkonQgn_prop_signal_icon_mask,
       
   281                                              KRgbGray );     
       
   282                 break;
       
   283             case EAknSignalCommonPacketDataIndicatorAttached:
       
   284             case EAknSignalCommonPacketDataIndicatorEstablishingContext: // fallthrough
       
   285                 AknsUtils::CreateColorIconL( skin,
       
   286                                              KAknsIIDQgnIndiSignalPdAttach,
       
   287                                              KAknsIIDQsnIconColors,
       
   288                                              aIconColorIndex,
       
   289                                              bitmap,
       
   290                                              mask, 
       
   291                                              AknIconUtils::AvkonIconFileName(), 
       
   292                                              EMbmAvkonQgn_indi_signal_pd_attach,
       
   293                                              EMbmAvkonQgn_indi_signal_pd_attach_mask,
       
   294                                              KRgbGray );     
       
   295                 break;
       
   296             case EAknSignalCommonPacketDataIndicatorContext:
       
   297                 AknsUtils::CreateColorIconL( skin,
       
   298                                              KAknsIIDQgnIndiSignalPdContext,
       
   299                                              KAknsIIDQsnIconColors,
       
   300                                              aIconColorIndex,
       
   301                                              bitmap,
       
   302                                              mask, 
       
   303                                              AknIconUtils::AvkonIconFileName(), 
       
   304                                              EMbmAvkonQgn_indi_signal_pd_context,
       
   305                                              EMbmAvkonQgn_indi_signal_pd_context_mask,
       
   306                                              KRgbGray );     
       
   307                 break;
       
   308             case EAknSignalCommonPacketDataIndicatorSuspended:
       
   309                 AknsUtils::CreateColorIconL( skin,
       
   310                                              KAknsIIDQgnIndiSignalPdSuspended,
       
   311                                              KAknsIIDQsnIconColors,
       
   312                                              aIconColorIndex,
       
   313                                              bitmap,
       
   314                                              mask, 
       
   315                                              AknIconUtils::AvkonIconFileName(), 
       
   316                                              EMbmAvkonQgn_indi_signal_pd_suspended,
       
   317                                              EMbmAvkonQgn_indi_signal_pd_suspended_mask,
       
   318                                              KRgbGray );     
       
   319                 break;
       
   320             case EAknSignalCommonPacketDataIndicatorMultipdp:
       
   321                 AknsUtils::CreateColorIconL( skin,
       
   322                                              KAknsIIDQgnIndiSignalPdMultipdp,
       
   323                                              KAknsIIDQsnIconColors,
       
   324                                              aIconColorIndex,
       
   325                                              bitmap,
       
   326                                              mask, 
       
   327                                              AknIconUtils::AvkonIconFileName(), 
       
   328                                              EMbmAvkonQgn_indi_signal_pd_multipdp,
       
   329                                              EMbmAvkonQgn_indi_signal_pd_multipdp_mask,
       
   330                                              KRgbGray );          
       
   331                 break;
       
   332                 
       
   333             // Create EDGE packet data indicator bitmaps.
       
   334             case EAknSignalEdgeIndicatorOff:
       
   335                 AknsUtils::CreateColorIconL( skin,
       
   336                                              KAknsIIDQgnPropSignalIcon,
       
   337                                              KAknsIIDQsnIconColors,
       
   338                                              aIconColorIndex,
       
   339                                              bitmap,
       
   340                                              mask,
       
   341                                              AknIconUtils::AvkonIconFileName(), 
       
   342                                              EMbmAvkonQgn_prop_signal_icon,
       
   343                                              EMbmAvkonQgn_prop_signal_icon_mask,
       
   344                                              KRgbGray );     
       
   345                 break;
       
   346             case EAknSignalEdgeIndicatorAvailable:
       
   347                 AknsUtils::CreateColorIconL( skin,
       
   348                                              KAknsIIDQgnPropSignalIcon,
       
   349                                              KAknsIIDQsnIconColors,
       
   350                                              aIconColorIndex,
       
   351                                              bitmap,
       
   352                                              mask,
       
   353                                              AknIconUtils::AvkonIconFileName(), 
       
   354                                              EMbmAvkonQgn_indi_signal_egprs_icon,
       
   355                                              EMbmAvkonQgn_indi_signal_egprs_icon_mask,
       
   356                                              KRgbGray );     
       
   357                 break;
       
   358             case EAknSignalEdgeIndicatorAttached:
       
   359             case EAknSignalEdgeIndicatorEstablishingContext: // fallthrough
       
   360                 AknsUtils::CreateColorIconL( skin,
       
   361                                              KAknsIIDQgnIndiSignalEgprsAttach,
       
   362                                              KAknsIIDQsnIconColors,
       
   363                                              aIconColorIndex,
       
   364                                              bitmap,
       
   365                                              mask, 
       
   366                                              AknIconUtils::AvkonIconFileName(), 
       
   367                                              EMbmAvkonQgn_indi_signal_egprs_attach,
       
   368                                              EMbmAvkonQgn_indi_signal_egprs_attach_mask,
       
   369                                              KRgbGray );     
       
   370                 break;
       
   371             case EAknSignalEdgeIndicatorContext:
       
   372                 AknsUtils::CreateColorIconL( skin,
       
   373                                              KAknsIIDQgnIndiSignalEgprsContext,
       
   374                                              KAknsIIDQsnIconColors,
       
   375                                              aIconColorIndex,
       
   376                                              bitmap,
       
   377                                              mask, 
       
   378                                              AknIconUtils::AvkonIconFileName(), 
       
   379                                              EMbmAvkonQgn_indi_signal_egprs_context,
       
   380                                              EMbmAvkonQgn_indi_signal_egprs_context_mask,
       
   381                                              KRgbGray );     
       
   382                 break;
       
   383             case EAknSignalEdgeIndicatorSuspended:
       
   384                 AknsUtils::CreateColorIconL( skin,
       
   385                                              KAknsIIDQgnIndiSignalEgprsSuspended,
       
   386                                              KAknsIIDQsnIconColors,
       
   387                                              aIconColorIndex,
       
   388                                              bitmap,
       
   389                                              mask, 
       
   390                                              AknIconUtils::AvkonIconFileName(), 
       
   391                                              EMbmAvkonQgn_indi_signal_egprs_suspended,
       
   392                                              EMbmAvkonQgn_indi_signal_egprs_suspended_mask,
       
   393                                              KRgbGray );     
       
   394                 break;
       
   395             case EAknSignalEdgeIndicatorMultipdp:
       
   396                 AknsUtils::CreateColorIconL( skin,
       
   397                                              KAknsIIDQgnIndiSignalEgprsMultipdp,
       
   398                                              KAknsIIDQsnIconColors,
       
   399                                              aIconColorIndex,
       
   400                                              bitmap,
       
   401                                              mask, 
       
   402                                              AknIconUtils::AvkonIconFileName(), 
       
   403                                              EMbmAvkonQgn_indi_signal_egprs_multipdp,
       
   404                                              EMbmAvkonQgn_indi_signal_egprs_multipdp_mask,
       
   405                                              KRgbGray );          
       
   406                 break;
       
   407             
       
   408             // Create WCDMA indicator bitmaps.
       
   409             case EAknSignalWcdmaIndicatorOff:
       
   410                 AknsUtils::CreateColorIconL( skin,
       
   411                                              KAknsIIDQgnPropSignalIcon,
       
   412                                              KAknsIIDQsnIconColors,
       
   413                                              aIconColorIndex,
       
   414                                              bitmap,
       
   415                                              mask,
       
   416                                              AknIconUtils::AvkonIconFileName(), 
       
   417                                              EMbmAvkonQgn_prop_signal_icon,
       
   418                                              EMbmAvkonQgn_prop_signal_icon_mask,
       
   419                                              KRgbGray );         
       
   420                 break;
       
   421             case EAknSignalWcdmaIndicatorAvailable:
       
   422                 AknsUtils::CreateColorIconL( skin,
       
   423                                              KAknsIIDQgnIndiSignalWcdmaIcon,
       
   424                                              KAknsIIDQsnIconColors,
       
   425                                              aIconColorIndex,
       
   426                                              bitmap,
       
   427                                              mask,
       
   428                                              AknIconUtils::AvkonIconFileName(), 
       
   429                                              EMbmAvkonQgn_indi_signal_wcdma_icon,
       
   430                                              EMbmAvkonQgn_indi_signal_wcdma_icon_mask,
       
   431                                              KRgbGray );
       
   432                 break;
       
   433             case EAknSignalWcdmaIndicatorAttached:
       
   434             case EAknSignalWcdmaIndicatorEstablishingContext: // fallthrough
       
   435                 AknsUtils::CreateColorIconL( skin,
       
   436                                              KAknsIIDQgnIndiSignalWcdmaAttach,
       
   437                                              KAknsIIDQsnIconColors,
       
   438                                              aIconColorIndex,
       
   439                                              bitmap,
       
   440                                              mask, 
       
   441                                              AknIconUtils::AvkonIconFileName(), 
       
   442                                              EMbmAvkonQgn_indi_signal_wcdma_attach,
       
   443                                              EMbmAvkonQgn_indi_signal_wcdma_attach_mask,
       
   444                                              KRgbGray );
       
   445                 break;
       
   446             case EAknSignalWcdmaIndicatorContext:
       
   447                 AknsUtils::CreateColorIconL( skin,
       
   448                                              KAknsIIDQgnIndiSignalWcdmaContext,
       
   449                                              KAknsIIDQsnIconColors,
       
   450                                              aIconColorIndex,
       
   451                                              bitmap,
       
   452                                              mask, 
       
   453                                              AknIconUtils::AvkonIconFileName(), 
       
   454                                              EMbmAvkonQgn_indi_signal_wcdma_context,
       
   455                                              EMbmAvkonQgn_indi_signal_wcdma_context_mask,
       
   456                                              KRgbGray );
       
   457                 break;
       
   458             case EAknSignalWcdmaIndicatorMultipdp:
       
   459                 AknsUtils::CreateColorIconL( skin,
       
   460                                              KAknsIIDQgnIndiSignalWcdmaMultipdp,
       
   461                                              KAknsIIDQsnIconColors,
       
   462                                              aIconColorIndex,
       
   463                                              bitmap,
       
   464                                              mask,
       
   465                                              AknIconUtils::AvkonIconFileName(), 
       
   466                                              EMbmAvkonQgn_indi_signal_wcdma_multipdp,
       
   467                                              EMbmAvkonQgn_indi_signal_wcdma_multipdp_mask,
       
   468                                              KRgbGray );
       
   469                 break;
       
   470             case EAknSignalWcdmaIndicatorSuspended:
       
   471                 AknsUtils::CreateColorIconL( skin,
       
   472                                              KAknsIIDQgnIndiSignalWcdmaSuspended,
       
   473                                              KAknsIIDQsnIconColors,
       
   474                                              aIconColorIndex,
       
   475                                              bitmap,
       
   476                                              mask, 
       
   477                                              AknIconUtils::AvkonIconFileName(), 
       
   478                                              EMbmAvkonQgn_indi_signal_wcdma_suspended,
       
   479                                              EMbmAvkonQgn_indi_signal_wcdma_suspended_mask,
       
   480                                              KRgbGray ); 
       
   481                 break;
       
   482             
       
   483             // Create HSDPA indicator bitmaps.
       
   484             case EAknSignalHsdpaIndicatorOff:
       
   485                 AknsUtils::CreateColorIconL( skin,
       
   486                                              KAknsIIDQgnPropSignalIcon,
       
   487                                              KAknsIIDQsnIconColors,
       
   488                                              aIconColorIndex,
       
   489                                              bitmap,
       
   490                                              mask,
       
   491                                              AknIconUtils::AvkonIconFileName(), 
       
   492                                              EMbmAvkonQgn_prop_signal_icon,
       
   493                                              EMbmAvkonQgn_prop_signal_icon_mask,
       
   494                                              KRgbGray );         
       
   495                 break;
       
   496             case EAknSignalHsdpaIndicatorAvailable:
       
   497                 AknsUtils::CreateColorIconL( skin,
       
   498                                              KAknsIIDQgnIndiSignalHsdpaIcon,
       
   499                                              KAknsIIDQsnIconColors,
       
   500                                              aIconColorIndex,
       
   501                                              bitmap,
       
   502                                              mask,
       
   503                                              AknIconUtils::AvkonIconFileName(),
       
   504                                              EMbmAvkonQgn_indi_signal_hsdpa_icon,
       
   505                                              EMbmAvkonQgn_indi_signal_hsdpa_icon_mask,
       
   506                                              KRgbGray );         
       
   507                 break;
       
   508             case EAknSignalHsdpaIndicatorAttached:
       
   509             case EAknSignalHsdpaIndicatorEstablishingContext: // fallthrough
       
   510                 AknsUtils::CreateColorIconL( skin,
       
   511                                              KAknsIIDQgnIndiSignalHsdpaAttach,
       
   512                                              KAknsIIDQsnIconColors,
       
   513                                              aIconColorIndex,
       
   514                                              bitmap,
       
   515                                              mask, 
       
   516                                              AknIconUtils::AvkonIconFileName(), 
       
   517                                              EMbmAvkonQgn_indi_signal_hsdpa_attach,
       
   518                                              EMbmAvkonQgn_indi_signal_hsdpa_attach_mask,
       
   519                                              KRgbGray );     
       
   520                 break;
       
   521             case EAknSignalHsdpaIndicatorContext:
       
   522                 AknsUtils::CreateColorIconL( skin,
       
   523                                              KAknsIIDQgnIndiSignalHsdpaContext,
       
   524                                              KAknsIIDQsnIconColors,
       
   525                                              aIconColorIndex,
       
   526                                              bitmap,
       
   527                                              mask, 
       
   528                                              AknIconUtils::AvkonIconFileName(), 
       
   529                                              EMbmAvkonQgn_indi_signal_hsdpa_context,
       
   530                                              EMbmAvkonQgn_indi_signal_hsdpa_context_mask,
       
   531                                              KRgbGray );     
       
   532                 break;
       
   533             case EAknSignalHsdpaIndicatorSuspended:
       
   534                 AknsUtils::CreateColorIconL( skin,
       
   535                                              KAknsIIDQgnIndiSignalHsdpaSuspended,
       
   536                                              KAknsIIDQsnIconColors,
       
   537                                              aIconColorIndex,
       
   538                                              bitmap,
       
   539                                              mask, 
       
   540                                              AknIconUtils::AvkonIconFileName(), 
       
   541                                              EMbmAvkonQgn_indi_signal_hsdpa_suspended,
       
   542                                              EMbmAvkonQgn_indi_signal_hsdpa_suspended_mask,
       
   543                                              KRgbGray );     
       
   544                 break;
       
   545             case EAknSignalHsdpaIndicatorMultipdp:
       
   546                 AknsUtils::CreateColorIconL( skin,
       
   547                                              KAknsIIDQgnIndiSignalHsdpaMultipdp,
       
   548                                              KAknsIIDQsnIconColors,
       
   549                                              aIconColorIndex,
       
   550                                              bitmap,
       
   551                                              mask, 
       
   552                                              AknIconUtils::AvkonIconFileName(), 
       
   553                                              EMbmAvkonQgn_indi_signal_hsdpa_multipdp,
       
   554                                              EMbmAvkonQgn_indi_signal_hsdpa_multipdp_mask,
       
   555                                              KRgbGray );          
       
   556                 break;        
       
   557     
       
   558             // Default in all situations
       
   559             default:
       
   560                 AknsUtils::CreateColorIconL( skin,
       
   561                                              KAknsIIDQgnPropSignalIcon,
       
   562                                              KAknsIIDQsnIconColors,
       
   563                                              aIconColorIndex,
       
   564                                              bitmap,
       
   565                                              mask,
       
   566                                              AknIconUtils::AvkonIconFileName(), 
       
   567                                              EMbmAvkonQgn_prop_signal_icon,
       
   568                                              EMbmAvkonQgn_prop_signal_icon_mask,
       
   569                                              KRgbGray );
       
   570             }
       
   571         }
       
   572                 
       
   573     if ( bitmap )
       
   574         {
       
   575         delete iSignalIcon;
       
   576         iSignalIcon = bitmap;
       
   577         AknIconUtils::SetSize( iSignalIcon, Size() );
       
   578         }
       
   579 
       
   580     if ( mask )
       
   581         {
       
   582         delete iSignalIconMask;
       
   583         iSignalIconMask = mask;
       
   584         }
       
   585 
       
   586     iIconState  = aIconState;
       
   587     iColorIndex = aIconColorIndex;
       
   588     }
       
   589 
       
   590 
       
   591 // ---------------------------------------------------------------------------
       
   592 // CAknSignalIcon::SetOffLineIconDraw
       
   593 // ---------------------------------------------------------------------------
       
   594 //
       
   595 void CAknSignalIcon::SetOffLineIconDraw( TBool aOn )
       
   596     {
       
   597     iShowOffLineIcon = aOn;
       
   598     }
       
   599 
       
   600 
       
   601 // ---------------------------------------------------------------------------
       
   602 // From class CCoeControl.
       
   603 // CAknSignalIcon::SizeChanged
       
   604 // ---------------------------------------------------------------------------
       
   605 //
       
   606 void CAknSignalIcon::SizeChanged()
       
   607     {
       
   608     AknsUtils::RegisterControlPosition( this );
       
   609  
       
   610     if ( iSignalIcon )
       
   611         {
       
   612         AknIconUtils::SetSize( iSignalIcon, Size() );
       
   613         }
       
   614     }
       
   615 
       
   616 
       
   617 // ---------------------------------------------------------------------------
       
   618 // From class CCoeControl.
       
   619 // CAknSignalIcon::PositionChanged
       
   620 // ---------------------------------------------------------------------------
       
   621 //
       
   622 void CAknSignalIcon::PositionChanged()
       
   623     {
       
   624     AknsUtils::RegisterControlPosition( this );
       
   625     }
       
   626 
       
   627 
       
   628 // ---------------------------------------------------------------------------
       
   629 // From class CCoeControl.
       
   630 // CAknSignalIcon::HandleResourceChange
       
   631 // ---------------------------------------------------------------------------
       
   632 //
       
   633 void CAknSignalIcon::HandleResourceChange( TInt aType ) 
       
   634     {
       
   635     CCoeControl::HandleResourceChange( aType );
       
   636     }
       
   637 
       
   638 
       
   639 // ---------------------------------------------------------------------------
       
   640 // From class CCoeControl.
       
   641 // CAknSignalIcon::Draw
       
   642 // ---------------------------------------------------------------------------
       
   643 //
       
   644 void CAknSignalIcon::Draw( const TRect& /*aRect*/ ) const
       
   645     {
       
   646     CWindowGc& gc = SystemGc();
       
   647     TRect rect( Rect() );
       
   648     
       
   649     if ( !iDrawBlank && ( !iOffLine || iShowOffLineIcon ) )
       
   650         {
       
   651         if ( iSignalIcon && iSignalIconMask )
       
   652         	{
       
   653 	        gc.BitBltMasked(
       
   654 	            rect.iTl, 
       
   655 	            iSignalIcon,
       
   656 	            TRect( rect.Size() ), 
       
   657 	            iSignalIconMask,
       
   658 	            ETrue );        		
       
   659         	}
       
   660         }
       
   661     }
       
   662 
       
   663 
       
   664 // ---------------------------------------------------------------------------
       
   665 // CAknSignalIcon::CAknSignalIcon
       
   666 // Default constructor.
       
   667 // ---------------------------------------------------------------------------
       
   668 //
       
   669 CAknSignalIcon::CAknSignalIcon() 
       
   670 	{
       
   671 	}
       
   672 
       
   673 
       
   674 // ---------------------------------------------------------------------------
       
   675 // CAknSignalIcon::ConstructL
       
   676 // Second-phase constructor.
       
   677 // ---------------------------------------------------------------------------
       
   678 //
       
   679 void CAknSignalIcon::ConstructL()
       
   680 	{
       
   681 	}
       
   682 
       
   683 //  End of File