calendarui/controller/src/calenicons.cpp
changeset 0 f979ecb2b13e
child 5 42814f902fe6
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2002-2008 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:  Calen icons class description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "calendarui_debug.h"
       
    20 #include "calenicons.h"
       
    21 #include "calendar.hrh"
       
    22 
       
    23 #include <aknconsts.h>
       
    24 #include <data_caging_path_literals.hrh>
       
    25 #include <AknIconArray.h>
       
    26 #include <AknsDrawUtils.h>
       
    27 #include <avkon.mbg>
       
    28 #include <eikenv.h>
       
    29 #include <gulicon.h>
       
    30 #include <aknenv.h>
       
    31 #include <eikapp.h>
       
    32 #include <calentry.h>
       
    33 #include <calendar.mbg>
       
    34 
       
    35 // ============================ MEMBER FUNCTIONS ===============================
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CCalenIcons::CCalenIcons
       
    39 // C++ default constructor can NOT contain any code, that
       
    40 // might leave.
       
    41 // (other items were commented in a header).
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CCalenIcons::CCalenIcons()
       
    45     {
       
    46     TRACE_ENTRY_POINT;
       
    47     TRACE_EXIT_POINT;
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CCalenIcons::ConstructL
       
    52 // Symbian 2nd phase constructor can leave.
       
    53 // (other items were commented in a header).
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 void CCalenIcons::ConstructL()
       
    57     {
       
    58     TRACE_ENTRY_POINT;
       
    59     iIconFile = ((CEikAppUi*)CCoeEnv::Static()->AppUi())->Application()->BitmapStoreName();
       
    60     TRACE_EXIT_POINT;
       
    61     }
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // CCalenIcons::NewL
       
    65 // Symbian 1st phase constructor
       
    66 // (other items were commented in a header).
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 CCalenIcons* CCalenIcons::NewL()
       
    70     {
       
    71     TRACE_ENTRY_POINT;
       
    72     
       
    73     CCalenIcons* self = new( ELeave ) CCalenIcons();
       
    74 
       
    75     CleanupStack::PushL( self );
       
    76     self->ConstructL();
       
    77     CleanupStack::Pop( self );
       
    78     
       
    79     TRACE_EXIT_POINT;
       
    80     return self;
       
    81     }
       
    82 
       
    83 // -----------------------------------------------------------------------------
       
    84 // CCalenIcons::~CCalenIcons
       
    85 // Destructor
       
    86 // (other items were commented in a header).
       
    87 // -----------------------------------------------------------------------------
       
    88 //
       
    89 CCalenIcons::~CCalenIcons()
       
    90     {
       
    91     TRACE_ENTRY_POINT;
       
    92     TRACE_EXIT_POINT;
       
    93     }
       
    94 
       
    95 // -----------------------------------------------------------------------------
       
    96 // CCalenIcons::CreateItemNotShownIconL
       
    97 // Create icon for "item not shown"
       
    98 // (other items were commented in a header).
       
    99 // -----------------------------------------------------------------------------
       
   100 //
       
   101 EXPORT_C CGulIcon* CCalenIcons::CreateItemNotShownIconL() const
       
   102     {
       
   103     TRACE_ENTRY_POINT;
       
   104     
       
   105     /* This tries to fetch skinned icon first. If it doesn't succeed
       
   106      * it creates color-skinned icon with color white. This is because
       
   107      * EMbmCalendarQgn_indi_item_not_shown is designed to be only used as mask.
       
   108      * It's purpose is to draw three white dots to any background. 
       
   109      * So we create white bitmap, and use EMbmCalendarQgn_indi_item_not_shown
       
   110      * as a mask to draw dots.
       
   111      */
       
   112     CFbsBitmap* bitmap = NULL;
       
   113     CFbsBitmap* mask = NULL;
       
   114     AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), 
       
   115                                  KAknsIIDQgnIndiItemNotShown,
       
   116                                  KAknsIIDQsnTextColors,
       
   117                                  EAknsCIQsnTextColorsCG19,
       
   118                                  bitmap, mask,
       
   119                                  iIconFile, 
       
   120                                  EMbmCalendarQgn_indi_item_not_shown,
       
   121                                  EMbmCalendarQgn_indi_item_not_shown,
       
   122                                  AKN_LAF_COLOR(0)); 
       
   123     CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
       
   124     CleanupStack::Pop(2); // bitmap, mask;
       
   125     
       
   126     TRACE_EXIT_POINT;
       
   127     return icon;
       
   128     }
       
   129 
       
   130 // -----------------------------------------------------------------------------
       
   131 // CCalenIcons::CreateOutOfRangeIconsL
       
   132 // Create icons for "out of range"
       
   133 // (other items were commented in a header).
       
   134 // -----------------------------------------------------------------------------
       
   135 //
       
   136 EXPORT_C CAknIconArray* CCalenIcons::CreateOutOfRangeIconsL() const
       
   137     {
       
   138     TRACE_ENTRY_POINT;
       
   139     
       
   140     // Fixme: this method can be removed as there is only one icon,
       
   141     // but it's better to refactor whole icon storing. 
       
   142     // Icons should be stored in this 
       
   143     // class, and other classes just have pointers here.
       
   144     CAknIconArray* icons = new CAknIconArray(2);
       
   145     icons->SetReserveL(2);
       
   146     CleanupStack::PushL(icons);
       
   147     CGulIcon* eventsBeforeIcon = GetIconL( MCalenServices::ECalenItemNotShownIcon );
       
   148     CleanupStack::PushL(eventsBeforeIcon);
       
   149     CGulIcon* eventsAfterIcon = GetIconL( MCalenServices::ECalenItemNotShownIcon );
       
   150     CleanupStack::PushL(eventsAfterIcon);
       
   151     icons->AppendL(eventsBeforeIcon);
       
   152     icons->AppendL(eventsAfterIcon);
       
   153 
       
   154     CleanupStack::Pop(3); 
       
   155     
       
   156     TRACE_EXIT_POINT;
       
   157     return icons;
       
   158     }
       
   159 
       
   160 // -----------------------------------------------------------------------------
       
   161 // CCalenIcons::CreateBitmapSkinnedIconL
       
   162 // Create icon with bitmap skin
       
   163 // (other items were commented in a header).
       
   164 // -----------------------------------------------------------------------------
       
   165 //
       
   166 CGulIcon* CCalenIcons::CreateBitmapSkinnedIconL(const TAknsItemID& aSkinIconId,
       
   167                         const TDesC& aFilename,
       
   168                         TInt aNormalIconId,
       
   169                         TInt aNormalMaskId) const
       
   170     {
       
   171     TRACE_ENTRY_POINT;
       
   172     
       
   173     CFbsBitmap* bitmap = NULL;
       
   174     CFbsBitmap* mask = NULL;
       
   175     AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), aSkinIconId,
       
   176                 bitmap, mask, 
       
   177                 aFilename, aNormalIconId, aNormalMaskId);
       
   178     CGulIcon* icon = CGulIcon::NewL(bitmap, mask); 
       
   179     // Ownership of bitmap and mask transferred
       
   180     CleanupStack::Pop(2); // bitmap, mask
       
   181     
       
   182     TRACE_EXIT_POINT;
       
   183     return icon;
       
   184     }
       
   185 
       
   186 
       
   187 // -----------------------------------------------------------------------------
       
   188 // CCalenIcons::CreateDayWeekToDoViewIconsL
       
   189 // Create a common icons array, which is used by Day/Week/Todo View
       
   190 // (other items were commented in a header).
       
   191 // -----------------------------------------------------------------------------
       
   192 //
       
   193 EXPORT_C CAknIconArray* CCalenIcons::CreateDayWeekToDoViewIconsL() const
       
   194     {
       
   195     TRACE_ENTRY_POINT;
       
   196     
       
   197     CAknIconArray* icons = new( ELeave )CAknIconArray( KDayAndWeekIconCount );
       
   198     CleanupStack::PushL(icons);
       
   199 
       
   200     icons->SetReserveL( KDayAndWeekIconCount );
       
   201     
       
   202     icons->AppendL( GetIconL( MCalenServices::ECalenMarkedTodoIcon ) );
       
   203     
       
   204     icons->AppendL( GetIconL( MCalenServices::ECalenBirthdayIcon ) );
       
   205 
       
   206     icons->AppendL( GetIconL( MCalenServices::ECalenMeetingIcon ) );
       
   207 
       
   208     icons->AppendL( GetIconL( MCalenServices::ECalenDaynoteIcon ) );
       
   209 
       
   210     icons->AppendL( GetIconL( MCalenServices::ECalenToDoIcon ) );
       
   211 
       
   212     // Alarm and repeat icon. Color skinned with day view icon color 
       
   213     // FIXME: highlight coloring in lists doesn't work for icons.
       
   214     // When Avkon suplies some method to do that, change these 
       
   215 
       
   216     // alarm icon
       
   217     icons->AppendL( GetIconL( MCalenServices::ECalenAlarmIcon ) ); // won't leave. SetReserveL has been used
       
   218 
       
   219     // repeat icon 
       
   220     
       
   221     icons->AppendL( GetIconL( MCalenServices::ECalenRepeatIcon ) ); // won't leave. SetReserveL has been used
       
   222 
       
   223     // repeat exception icon
       
   224     
       
   225     icons->AppendL( GetIconL( MCalenServices::ECalenRepeatExceptionIcon ) ); // won't leave. SetReserveL has been used
       
   226 
       
   227     
       
   228     icons->AppendL( GetIconL( MCalenServices::ECalenNotePriorityLow ) ); // won't leave. SetReserveL has been used
       
   229 
       
   230     
       
   231     icons->AppendL( GetIconL( MCalenServices::ECalenNotePriorityHigh ) ); // won't leave. SetReserveL has been used
       
   232 
       
   233     icons->AppendL( GetIconL( MCalenServices::ECalenTodoIconUndone ) );
       
   234 
       
   235     icons->AppendL( GetIconL( MCalenServices::ECalenTodoIconDone ) );
       
   236     icons->AppendL( GetIconL( MCalenServices::ECalenMapIcon ) );
       
   237     CleanupStack::Pop(icons); // icons
       
   238     
       
   239     TRACE_EXIT_POINT;
       
   240     return icons;
       
   241     }
       
   242 
       
   243 // ---------------------------------------------------------------------------
       
   244 // CCalenIcons::CreateMonthViewIconsL
       
   245 // Create icons array for month view
       
   246 // (other items were commented in a header).
       
   247 // ---------------------------------------------------------------------------
       
   248 
       
   249 EXPORT_C CAknIconArray* CCalenIcons::CreateMonthViewIconsL() const
       
   250     {
       
   251     TRACE_ENTRY_POINT;
       
   252     
       
   253     const TInt iconCount(2);
       
   254     CAknIconArray* icons = new (ELeave) CAknIconArray(iconCount);
       
   255     CleanupStack::PushL(icons);
       
   256     icons->SetReserveL(iconCount);
       
   257 
       
   258     CGulIcon* icon = GetIconL( MCalenServices::ECalenMonthManyEventIcon );
       
   259     icons->AppendL(icon); // won't leave .SetReserveL reserved space
       
   260 
       
   261     icon = GetIconL( MCalenServices::ECalenMonthGrayedEventIcon );
       
   262     icons->AppendL(icon); // won't leave .SetReserveL reserved space
       
   263 
       
   264     CleanupStack::Pop(icons);
       
   265     
       
   266     TRACE_EXIT_POINT;
       
   267     return icons;
       
   268     }
       
   269 
       
   270 
       
   271 // ---------------------------------------------------------
       
   272 // CalenIcons::IconIndexFromEntry
       
   273 // Gets an icon index corresponding to a note
       
   274 // (other items were commented in a header).
       
   275 // ---------------------------------------------------------
       
   276 //
       
   277 EXPORT_C MCalenServices::TCalenIcons CCalenIcons::IconIndexFromEntryL(CCalEntry& aEntry) 
       
   278     {
       
   279     TRACE_ENTRY_POINT;
       
   280     
       
   281     MCalenServices::TCalenIcons icon(MCalenServices::ECalenMeetingIcon);
       
   282 
       
   283     switch(aEntry.EntryTypeL())
       
   284         {
       
   285         case CCalEntry::EAnniv:
       
   286             icon = MCalenServices::ECalenBirthdayIcon;
       
   287             break;
       
   288         case CCalEntry::EEvent:
       
   289             icon = MCalenServices::ECalenDaynoteIcon;
       
   290             break;
       
   291         case CCalEntry::EAppt:
       
   292             icon = MCalenServices::ECalenMeetingIcon;
       
   293             break;
       
   294         case CCalEntry::ETodo:
       
   295             icon = MCalenServices::ECalenToDoIcon;
       
   296             break;
       
   297         default:
       
   298             ASSERT( EFalse );
       
   299             break;
       
   300         }
       
   301     
       
   302     TRACE_EXIT_POINT;
       
   303     return icon;
       
   304     }
       
   305 
       
   306 // ---------------------------------------------------------
       
   307 // CalenIcons::GetIcon
       
   308 // Gets an icon according to the icon index being passed in 
       
   309 // (other items were commented in a header).
       
   310 // ---------------------------------------------------------
       
   311 //
       
   312 EXPORT_C CGulIcon* CCalenIcons::GetIconL( MCalenServices::TCalenIcons aIndex ) const
       
   313     {
       
   314     TRACE_ENTRY_POINT;
       
   315     CGulIcon* icon;
       
   316     // Alarm and repeat icon. Color skinned with day view icon color 
       
   317     // FIXME: highlight coloring in lists doesn't work for icons.
       
   318     // When Avkon suplies some method to do that, change these 
       
   319     TAknsItemID colorGroup = KAknsIIDQsnIconColors;
       
   320     TInt colorIndex = EAknsCIQsnIconColorsCG19;
       
   321     TRgb nonSkinColor = AKN_LAF_COLOR(215);
       
   322     CFbsBitmap* bitmap = NULL;
       
   323     CFbsBitmap* mask = NULL;
       
   324     
       
   325     switch( aIndex )
       
   326         {
       
   327         case MCalenServices::ECalenMarkedTodoIcon:
       
   328             {
       
   329             TParse* fp1 = new( ELeave )TParse(); 
       
   330             CleanupStack::PushL( fp1 );
       
   331             fp1->Set( AknIconUtils::AvkonIconFileName(), &KDC_APP_BITMAP_DIR, NULL );
       
   332             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiMarkedAdd, 
       
   333                                                           fp1->FullName(), 
       
   334                                                           EMbmAvkonQgn_indi_marked_add,
       
   335                                                           EMbmAvkonQgn_indi_marked_add_mask );
       
   336             CleanupStack::PopAndDestroy( fp1 );
       
   337             }
       
   338             break;
       
   339         case MCalenServices::ECalenBirthdayIcon:
       
   340             {
       
   341             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrBirthday, 
       
   342                                                           iIconFile, 
       
   343                                                           EMbmCalendarQgn_indi_cdr_birthday, 
       
   344                                                           EMbmCalendarQgn_indi_cdr_birthday_mask );
       
   345             }
       
   346             break;                
       
   347         case MCalenServices::ECalenMeetingIcon:
       
   348             {
       
   349             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrMeeting, 
       
   350                                                           iIconFile, 
       
   351                                                           EMbmCalendarQgn_indi_cdr_meeting, 
       
   352                                                           EMbmCalendarQgn_indi_cdr_meeting_mask );
       
   353             }
       
   354             break;
       
   355         case MCalenServices::ECalenDaynoteIcon:
       
   356             {
       
   357             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrReminder, 
       
   358                                                           iIconFile, 
       
   359                                                           EMbmCalendarQgn_indi_cdr_reminder, 
       
   360                                                           EMbmCalendarQgn_indi_cdr_reminder_mask );
       
   361             }
       
   362             break;
       
   363         case MCalenServices::ECalenToDoIcon:
       
   364             {
       
   365             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrTodo, 
       
   366                                                           iIconFile, 
       
   367                                                           EMbmCalendarQgn_indi_cdr_todo, 
       
   368                                                           EMbmCalendarQgn_indi_cdr_todo_mask );
       
   369             }
       
   370             break;
       
   371         case MCalenServices::ECalenAlarmIcon:
       
   372             {
       
   373             AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), 
       
   374                                                      KAknsIIDQgnIndiAlarmAdd,
       
   375                                                      colorGroup,
       
   376                                                      colorIndex,
       
   377                                                      bitmap, mask,
       
   378                                                      AknIconUtils::AvkonIconFileName(),
       
   379                                                      EMbmAvkonQgn_indi_alarm_add,
       
   380                                                      EMbmAvkonQgn_indi_alarm_add_mask,
       
   381                                                      nonSkinColor);
       
   382             icon = CGulIcon::NewL( bitmap, mask );
       
   383             CleanupStack::Pop( 2 ); // bitmap, mask
       
   384             }
       
   385             break;
       
   386         case MCalenServices::ECalenRepeatIcon:
       
   387             {
       
   388             AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), 
       
   389                                                      KAknsIIDQgnIndiRepeatAdd,
       
   390                                                      colorGroup,
       
   391                                                      colorIndex,
       
   392                                                      bitmap, mask,
       
   393                                                      iIconFile,
       
   394                                                      EMbmCalendarQgn_indi_repeat_add,
       
   395                                                      EMbmCalendarQgn_indi_repeat_add_mask,
       
   396                                                      nonSkinColor);
       
   397             icon = CGulIcon::NewL(bitmap, mask);
       
   398             CleanupStack::Pop( 2 );
       
   399             }
       
   400             break;
       
   401         case MCalenServices::ECalenRepeatExceptionIcon:
       
   402             {
       
   403             AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), 
       
   404                                          KAknsIIDQgnIndiRepeatExceptionAdd,
       
   405                                          colorGroup,
       
   406                                          colorIndex,
       
   407                                          bitmap, mask,
       
   408                                          iIconFile,
       
   409                                          EMbmCalendarQgn_indi_repeat_exception_add,
       
   410                                          EMbmCalendarQgn_indi_repeat_exception_add_mask,
       
   411                                          nonSkinColor);
       
   412             icon = CGulIcon::NewL(bitmap, mask);
       
   413             CleanupStack::Pop(2); // bitmap, mask;
       
   414             }
       
   415             break;
       
   416         case MCalenServices::ECalenNotePriorityLow:
       
   417             {
       
   418             AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), 
       
   419                                          KAknsIIDQgnIndiTodoLowAdd,
       
   420                                          colorGroup,
       
   421                                          colorIndex,
       
   422                                          bitmap, mask,
       
   423                                          iIconFile,
       
   424                                          EMbmCalendarQgn_indi_todo_low_add,
       
   425                                          EMbmCalendarQgn_indi_todo_low_add_mask,
       
   426                                          nonSkinColor);
       
   427             icon = CGulIcon::NewL(bitmap, mask);
       
   428             CleanupStack::Pop(2); // bitmap, mask;
       
   429             }
       
   430             break;
       
   431         case MCalenServices::ECalenNotePriorityHigh:
       
   432             {
       
   433             AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), 
       
   434                                          KAknsIIDQgnIndiTodoHighAdd,
       
   435                                          colorGroup,
       
   436                                          colorIndex,
       
   437                                          bitmap, mask,
       
   438                                          iIconFile,
       
   439                                          EMbmCalendarQgn_indi_todo_high_add,
       
   440                                          EMbmCalendarQgn_indi_todo_high_add_mask,
       
   441                                          nonSkinColor );
       
   442             icon = CGulIcon::NewL(bitmap, mask);
       
   443             CleanupStack::Pop(2); // bitmap, mask;
       
   444             }
       
   445             break;
       
   446         case MCalenServices::ECalenTodoIconUndone:
       
   447             {
       
   448             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnPropTodoUndone,
       
   449                                                         iIconFile, 
       
   450                                                         EMbmCalendarQgn_prop_todo_undone,
       
   451                                                         EMbmCalendarQgn_prop_todo_undone_mask );
       
   452             }
       
   453             break;
       
   454         case MCalenServices::ECalenTodoIconDone:
       
   455             {
       
   456             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnPropTodoDone,
       
   457                                                         iIconFile,
       
   458                                                         EMbmCalendarQgn_prop_todo_done,
       
   459                                                         EMbmCalendarQgn_prop_todo_done_mask );
       
   460             }
       
   461             break;
       
   462         case MCalenServices::ECalenItemNotShownIcon:
       
   463             {
       
   464             icon = CreateItemNotShownIconL();
       
   465             }
       
   466             break;
       
   467         case MCalenServices::ECalenMonthManyEventIcon:
       
   468             {
       
   469             TAknsItemID skinColorComponent = KAknsIIDQsnOtherColors;
       
   470             TInt focusedMonthColorGroup = EAknsCIQsnOtherColorsCG5;
       
   471 
       
   472             AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), 
       
   473                                                      KAknsIIDQgnIndiCdrEventMixed,
       
   474                                                      skinColorComponent,
       
   475                                                      focusedMonthColorGroup,
       
   476                                                      bitmap, mask,
       
   477                                                      iIconFile, 
       
   478                                                      EMbmCalendarQgn_indi_cdr_event_mixed,
       
   479                                                      EMbmCalendarQgn_indi_cdr_event_mixed_mask,
       
   480                                                      cell_cale_many_event_c ); 
       
   481             icon = CGulIcon::NewL(bitmap, mask);
       
   482             CleanupStack::Pop(2); // bitmap, mask;
       
   483             }
       
   484             break;
       
   485         case MCalenServices::ECalenMonthGrayedEventIcon:
       
   486             {
       
   487             TAknsItemID skinColorComponent = KAknsIIDQsnOtherColors;
       
   488             TInt unfocusedMonthColorGroup = EAknsCIQsnOtherColorsCG6;
       
   489             
       
   490             AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
       
   491                                                      KAknsIIDQgnIndiCdrEventMixed,
       
   492                                                      skinColorComponent,
       
   493                                                      unfocusedMonthColorGroup,
       
   494                                                      bitmap, mask,
       
   495                                                      iIconFile, 
       
   496                                                      EMbmCalendarQgn_indi_cdr_event_mixed,
       
   497                                                      EMbmCalendarQgn_indi_cdr_event_mixed_mask,
       
   498                                                      cell_cale_grayed_event_c ); 
       
   499             icon = CGulIcon::NewL(bitmap, mask);
       
   500             CleanupStack::Pop(2); // bitmap, mask;
       
   501             }
       
   502             break;
       
   503         case MCalenServices::ECalenMonthViewIcon:
       
   504             {
       
   505             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbMonth,
       
   506                                                     iIconFile,
       
   507                                                     EMbmCalendarQgn_indi_cale_tb_month,
       
   508                                                     EMbmCalendarQgn_indi_cale_tb_month_mask );
       
   509             }
       
   510             break;
       
   511         case MCalenServices::ECalenWeekViewIcon:
       
   512             {
       
   513             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbWeek,
       
   514                                                         iIconFile,
       
   515                                                         EMbmCalendarQgn_indi_cale_tb_week,
       
   516                                                         EMbmCalendarQgn_indi_cale_tb_week_mask );
       
   517             }
       
   518             break;
       
   519         case MCalenServices::ECalenDayViewIcon:
       
   520             {
       
   521             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbDay,
       
   522                                                         iIconFile,
       
   523                                                         EMbmCalendarQgn_indi_cale_tb_day,
       
   524                                                         EMbmCalendarQgn_indi_cale_tb_day_mask );
       
   525             }
       
   526             break;
       
   527         case MCalenServices::ECalenTodoViewIcon:
       
   528             {
       
   529             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbTodo,
       
   530                                                         iIconFile,
       
   531                                                         EMbmCalendarQgn_indi_cale_tb_todo,
       
   532                                                         EMbmCalendarQgn_indi_cale_tb_todo_mask );
       
   533             }
       
   534             break;
       
   535         case MCalenServices::ECalenNewMeetingIcon:
       
   536             {
       
   537             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbMeetingNew,
       
   538                                                         iIconFile,
       
   539                                                         EMbmCalendarQgn_indi_cale_tb_meeting_new,
       
   540                                                         EMbmCalendarQgn_indi_cale_tb_meeting_new_mask );
       
   541             }
       
   542             break;
       
   543         case MCalenServices::ECalenNewTodoIcon:
       
   544             {
       
   545             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCaleTbTodoNew,
       
   546                                                         iIconFile,
       
   547                                                         EMbmCalendarQgn_indi_cale_tb_todo_new,
       
   548                                                         EMbmCalendarQgn_indi_cale_tb_todo_new_mask );
       
   549             }
       
   550             break;
       
   551         case MCalenServices::ECalenViewerEditIcon:
       
   552         	{
       
   553         		icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiMgTbEdit,
       
   554                                                         iIconFile,
       
   555                                                         EMbmCalendarQgn_indi_mg_tb_edit,
       
   556                                                         EMbmCalendarQgn_indi_mg_tb_edit_mask );
       
   557         	}
       
   558         	break;
       
   559         case MCalenServices::ECalenViewerDeleteIcon:
       
   560         	{
       
   561         		icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiMgTbDelete,
       
   562                                                         iIconFile,
       
   563                                                         EMbmCalendarQgn_indi_mg_tb_delete,
       
   564                                                         EMbmCalendarQgn_indi_mg_tb_delete_mask );
       
   565         	}
       
   566         	break;
       
   567         case MCalenServices::ECalenViewerSendIcon:
       
   568         	{
       
   569         		icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiTbMce,
       
   570                                                         iIconFile,
       
   571                                                         EMbmCalendarQgn_indi_tb_mce,
       
   572                                                         EMbmCalendarQgn_indi_tb_mce_mask );
       
   573         	}
       
   574         	break;
       
   575         case MCalenServices::ECalenMeetingIconMissed:
       
   576             {
       
   577             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrMeeting, 
       
   578                                                           iIconFile, 
       
   579                                                           EMbmCalendarQgn_indi_cdr_meeting_missed_new, 
       
   580                                                           EMbmCalendarQgn_indi_cdr_meeting_missed_new_mask );
       
   581             }
       
   582             break;     
       
   583         case MCalenServices::ECalenBirthdayIconMissed:
       
   584             {
       
   585             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrBirthday, 
       
   586                                                           iIconFile, 
       
   587                                                           EMbmCalendarQgn_indi_cdr_birthday_missed_new, 
       
   588                                                           EMbmCalendarQgn_indi_cdr_birthday_missed_new_mask );
       
   589             }
       
   590             break;     
       
   591         case MCalenServices::ECalenDaynoteIconMissed:
       
   592             {
       
   593             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrReminder, 
       
   594                                                           iIconFile, 
       
   595                                                           EMbmCalendarQgn_indi_cdr_reminder_missed_new, 
       
   596                                                           EMbmCalendarQgn_indi_cdr_reminder_missed_new_mask );
       
   597             }
       
   598             break;     
       
   599         case MCalenServices::ECalenToDoIconMissed:
       
   600             {
       
   601             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiCdrTodo, 
       
   602                                                           iIconFile, 
       
   603                                                           EMbmCalendarQgn_indi_cdr_todo_undone_missed_new, 
       
   604                                                           EMbmCalendarQgn_indi_cdr_todo_undone_missed_new_mask );
       
   605             }
       
   606             break;
       
   607         case MCalenServices::ECalenClearMissedAlarms:
       
   608             {
       
   609             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiTbCaleAlarmDismiss, 
       
   610                                              iIconFile, 
       
   611                                              EMbmCalendarQgn_indi_tb_cale_alarm_dismiss, 
       
   612                                              EMbmCalendarQgn_indi_tb_cale_alarm_dismiss_mask );
       
   613             }
       
   614             break;
       
   615         case MCalenServices::ECalenClearAllMissedAlarms:    
       
   616             {
       
   617             icon = CreateBitmapSkinnedIconL( KAknsIIDQgnIndiTbCaleAlarmDismissAll, 
       
   618                                              iIconFile, 
       
   619                                              EMbmCalendarQgn_indi_tb_cale_alarm_dismiss_all, 
       
   620                                              EMbmCalendarQgn_indi_tb_cale_alarm_dismiss_all_mask );
       
   621             }
       
   622             break;
       
   623         case MCalenServices::ECalenMapIcon:
       
   624         	{
       
   625         		icon = CreateBitmapSkinnedIconL( KAknsIIDQgnMenuMaps,
       
   626                                                         iIconFile,
       
   627                                                         EMbmCalendarQgn_menu_maps,
       
   628                                                         EMbmCalendarQgn_menu_maps_mask );
       
   629 
       
   630         	}
       
   631         	break;
       
   632         case MCalenServices::ECalenSyncIcon:
       
   633             {
       
   634                icon  = CreateBitmapSkinnedIconL(KAknsIIDQgnStatSync,
       
   635                                                    iIconFile,
       
   636                                                    EMbmCalendarQgn_stat_sync,
       
   637                                                    EMbmCalendarQgn_stat_sync_mask);
       
   638             break;
       
   639             }
       
   640         default:
       
   641             {
       
   642             icon = CGulIcon::NewL( bitmap, mask );
       
   643             }
       
   644             break;
       
   645         }
       
   646         TRACE_EXIT_POINT;
       
   647         return icon;
       
   648     }
       
   649 
       
   650 //  End of File