calendarui/controller/src/calentoolbarimpl.cpp
changeset 0 f979ecb2b13e
child 20 9c5b1510919f
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Calendar Toolbar Implementation
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <gulicon.h>
       
    21 #include <eikapp.h>
       
    22 #include <StringLoader.h>
       
    23 #include <aknappui.h>
       
    24 #include <aknlayoutscalable_apps.cdl.h>
       
    25 #include <eikcolib.h>
       
    26 #include <akntoolbarextension.h>
       
    27 #include <aknViewAppUi.h>
       
    28 #include <aknbutton.h>
       
    29 #include <akntoolbar.h>
       
    30 #include <akntouchpane.h>
       
    31 #include <calenview.h>
       
    32 #include <missedalarmstore.h>
       
    33 #include <calencommonui.rsg>
       
    34 #include <Calendar.rsg>
       
    35 #include <calencommands.hrh>            // Calendar commands
       
    36 #include <calenservices.h>
       
    37 
       
    38 #include "calendarui_debug.h"
       
    39 #include "calentoolbarimpl.h"
       
    40 #include "calencontroller.h"
       
    41 #include "calendar.hrh"
       
    42 #include "calenviewmanager.h"
       
    43 #include "CalenUid.h"
       
    44 #include "calenviewinfo.h"
       
    45 
       
    46 const TInt KPositionZero( 0 );
       
    47 
       
    48 
       
    49 // ---------------------------------------------------------------------------
       
    50 // CCalenToolbarImpl::NewL
       
    51 // 1st phase of construction
       
    52 // (other items were commented in a header).
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 CCalenToolbarImpl* CCalenToolbarImpl::NewL( CCalenController& aController )
       
    56     {
       
    57     TRACE_ENTRY_POINT;
       
    58 
       
    59     CCalenToolbarImpl* self = new( ELeave ) CCalenToolbarImpl( aController );
       
    60     CleanupStack::PushL( self );
       
    61     self->ConstructL();
       
    62     CleanupStack::Pop( self );
       
    63 
       
    64     TRACE_EXIT_POINT;
       
    65     return self;
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // CCalenToolbarImpl::CCalenToolbarImpl
       
    70 // C++ constructor
       
    71 // (other items were commented in a header).
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 CCalenToolbarImpl::CCalenToolbarImpl( CCalenController& aController )
       
    75     : iController( aController )
       
    76     {
       
    77     TRACE_ENTRY_POINT;
       
    78     TRACE_EXIT_POINT;
       
    79     }
       
    80 
       
    81 // ---------------------------------------------------------------------------
       
    82 // CCalenToolbarImpl::ConstructL
       
    83 // 2nd phase of construction
       
    84 // (other items were commented in a header).
       
    85 // ---------------------------------------------------------------------------
       
    86 //
       
    87 void CCalenToolbarImpl::ConstructL()
       
    88     {
       
    89     TRACE_ENTRY_POINT;
       
    90 
       
    91     iAppUi = static_cast<CAknAppUi*>( CEikonEnv::Static()->EikAppUi() );
       
    92     iAppToolbar = iAppUi->CurrentFixedToolbar();
       
    93     
       
    94     if(!AknLayoutUtils::LayoutMirrored())
       
    95         {
       
    96         iCalenToolbar = CAknToolbar::NewL(R_CALEN_TOOLBAR_EXTENSION);
       
    97         }
       
    98     else
       
    99         {
       
   100         iCalenToolbar = CAknToolbar::NewL(R_CALEN_TOOLBAR_EXTENSION_MIRRORED);
       
   101         }
       
   102     iCalenToolbar->SetToolbarObserver( static_cast<MAknToolbarObserver*>(this) );
       
   103     iCalenToolbar->SetWithSliding(ETrue);
       
   104     iCalenToolbar->SetCloseOnAllCommands(EFalse);
       
   105     iStartUpToolbar = ETrue;
       
   106     
       
   107     TRACE_EXIT_POINT;
       
   108     }
       
   109 
       
   110 // ---------------------------------------------------------------------------
       
   111 // CCalenToolbarImpl::SetNextViewIcon
       
   112 // When view is changed, update button icon for the next view
       
   113 // (other items were commented in a header).
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 void CCalenToolbarImpl::SetNextViewIcon( CGulIcon *aIcon )
       
   117     {
       
   118     TRACE_ENTRY_POINT;
       
   119     CAknButton* button = static_cast<CAknButton*>( 
       
   120                                 iCalenToolbar->ControlOrNull( ECalenNextView ) );
       
   121     if( button )
       
   122         {
       
   123         CAknButtonState* state = button->State();  // get current button state, not own
       
   124         state->SetIcon( aIcon );
       
   125         }
       
   126     iCalenToolbar->DrawDeferred();
       
   127     TRACE_EXIT_POINT;
       
   128     }
       
   129 
       
   130 // ---------------------------------------------------------------------------
       
   131 // CCalenToolbarImpl::~CCalenToolbarImpl
       
   132 // Destructor
       
   133 // ---------------------------------------------------------------------------
       
   134 //
       
   135 CCalenToolbarImpl::~CCalenToolbarImpl()
       
   136     {
       
   137     TRACE_ENTRY_POINT;
       
   138     if(iCalenToolbar)
       
   139         {
       
   140         delete iCalenToolbar;
       
   141         iCalenToolbar = NULL;
       
   142         }
       
   143     if(iExtensionToolbarCommands.Count())
       
   144         {
       
   145         iExtensionToolbarCommands.Close();
       
   146         }
       
   147     TRACE_EXIT_POINT;
       
   148     }
       
   149 
       
   150 // ----------------------------------------------------------------------------
       
   151 // CCalenToolbarImpl::IsVisible
       
   152 // Check if the toolbar is currently visible
       
   153 // ----------------------------------------------------------------------------
       
   154 TBool CCalenToolbarImpl::IsVisible()
       
   155     {
       
   156     TRACE_ENTRY_POINT;
       
   157     TRACE_EXIT_POINT;
       
   158     return iCalenToolbar->IsShown();
       
   159     }
       
   160 
       
   161 // ----------------------------------------------------------------------------
       
   162 // CCalenToolbarImpl::SetToolbarVisibility
       
   163 // Show or hide the toolbar.  Has no effect if the toolbar is disabled
       
   164 // ----------------------------------------------------------------------------
       
   165 void CCalenToolbarImpl::SetToolbarVisibilityL( TBool aMakeVisible )
       
   166     {
       
   167     TRACE_ENTRY_POINT;
       
   168    
       
   169     // Hides/Unhides toolbar items temporarily.
       
   170     // EFalse :: drawing the items normally in portrait and landscape
       
   171     // ETrue :: toolbar draws just background in landscape and is hidden in portrait
       
   172     iAppToolbar->HideItemsAndDrawOnlyBackground(!aMakeVisible);
       
   173     iCalenToolbar->HideItemsAndDrawOnlyBackground(!aMakeVisible);
       
   174 
       
   175     TRACE_EXIT_POINT;
       
   176     }
       
   177 
       
   178 // ----------------------------------------------------------------------------
       
   179 // CCalenToolbarImpl::UpdateToolbar
       
   180 // Update the toolbar using Calendar layout information
       
   181 // ----------------------------------------------------------------------------
       
   182 void CCalenToolbarImpl::UpdateToolbar()
       
   183     {
       
   184     TRACE_ENTRY_POINT;
       
   185 
       
   186     if( AknLayoutUtils::PenEnabled() )
       
   187         {
       
   188         TRect mainPaneRect;
       
   189         AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
       
   190                                                          mainPaneRect );
       
   191 
       
   192         TAknLayoutRect popup_toolbar_window_cp01;
       
   193         popup_toolbar_window_cp01.LayoutRect(
       
   194             mainPaneRect,
       
   195             AknLayoutScalable_Apps::popup_toolbar_window_cp01().LayoutLine() );
       
   196         TRect toolbar_rect( popup_toolbar_window_cp01.Rect() );
       
   197 
       
   198         iCalenToolbar->SetPosition( toolbar_rect.iTl );
       
   199         }
       
   200 
       
   201     TRACE_EXIT_POINT;
       
   202     }    
       
   203 
       
   204 // ----------------------------------------------------------------------------
       
   205 // CCalenToolbarImpl::Toolbar
       
   206 // Returns a reference to the CAknToolbar
       
   207 // ----------------------------------------------------------------------------    
       
   208 CAknToolbar& CCalenToolbarImpl::Toolbar()
       
   209     {
       
   210     TRACE_ENTRY_POINT;
       
   211     TRACE_EXIT_POINT;
       
   212     return *iCalenToolbar;
       
   213     }
       
   214 
       
   215 // ---------------------------------------------------------------------------
       
   216 // CCalenToolbarImpl::CalenToolbarExtensionL
       
   217 // Dummy implementation.
       
   218 // (other items were commented in a header).
       
   219 // ---------------------------------------------------------------------------
       
   220 //
       
   221 TAny* CCalenToolbarImpl::CalenToolbarExtensionL( TUid /*aExtensionUid*/ )
       
   222     {
       
   223     TRACE_ENTRY_POINT;
       
   224     TRACE_EXIT_POINT;
       
   225     return NULL;
       
   226     }
       
   227 
       
   228 // ----------------------------------------------------------------------------
       
   229 // CCalenToolbarImpl::DynInitToolbarL
       
   230 // Called before toolbar is drawn.  Allows modification of toolbar components 
       
   231 // based on current context
       
   232 // ----------------------------------------------------------------------------
       
   233 void CCalenToolbarImpl::DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar )
       
   234     {
       
   235     TRACE_ENTRY_POINT;
       
   236 
       
   237     if( aResourceId == R_CALEN_TOOLBAR &&
       
   238         aToolbar == iCalenToolbar )
       
   239         {
       
   240         UpdateToolbar();
       
   241 
       
   242         iCalenToolbar->SetFocusing( EFalse );
       
   243         }
       
   244     // for handling switchview command to populate the toolbar extension
       
   245     if(aResourceId == ECalenSwitchView)
       
   246         {
       
   247         PopulateChangeViewToolbarExtensionL();
       
   248         }
       
   249 
       
   250     if(iStartUpToolbar)
       
   251         {
       
   252         CAknToolbarExtension* extension = iCalenToolbar->ToolbarExtension();
       
   253         extension->RemoveItemL(ECalenLastCommand);
       
   254         iStartUpToolbar = EFalse;
       
   255         }
       
   256     TRACE_EXIT_POINT;
       
   257     }
       
   258 
       
   259 // ----------------------------------------------------------------------------
       
   260 // CCalenToolbarImpl::OfferToolbarEventL
       
   261 // Handles toolbar events for a toolbar item
       
   262 // ----------------------------------------------------------------------------
       
   263 void CCalenToolbarImpl::OfferToolbarEventL( TInt aCommand )
       
   264     {
       
   265     TRACE_ENTRY_POINT;
       
   266 
       
   267     if (iCalenToolbar)
       
   268         {
       
   269         iCalenToolbar->ToolbarExtension()->SetShown( EFalse );
       
   270         }
       
   271     
       
   272     // For handling toolbar extension commands
       
   273     TInt position = iExtensionToolbarCommands.Find(aCommand);
       
   274     if(position!=KErrNotFound)
       
   275         {
       
   276         TUid viewUid;
       
   277         TVwsViewId targetViewId( KUidCalendar, viewUid.Uid(aCommand));
       
   278         iController.ViewManager().SetRepopulation(EFalse);
       
   279         iController.ViewManager().RequestActivationL(targetViewId);
       
   280         }
       
   281     else
       
   282         {
       
   283         // Send all the other toolbar events to the controller. 
       
   284         // This allows customisations
       
   285         // to handle commands from custom toolbar buttons.
       
   286         iController.IssueCommandL( aCommand );
       
   287         }
       
   288     TRACE_EXIT_POINT;
       
   289     }
       
   290 
       
   291 // ----------------------------------------------------------------------------
       
   292 // CCalenToolbarImpl::HandleControlEvent
       
   293 // Handles an event from an observed control
       
   294 // ----------------------------------------------------------------------------
       
   295 void CCalenToolbarImpl::HandleControlEventL( CCoeControl* aControl,
       
   296                                                                TCoeEvent aEventType )
       
   297     {
       
   298     TRACE_ENTRY_POINT;
       
   299 
       
   300     if( AknLayoutUtils::PenEnabled() )
       
   301         {
       
   302         // forward control event to touch pane
       
   303         if( iAppUi->TouchPane() )
       
   304             {
       
   305             iAppUi->TouchPane()->HandleControlEventL( aControl, aEventType );
       
   306             }
       
   307         }
       
   308 
       
   309     TRACE_EXIT_POINT;
       
   310     }
       
   311 
       
   312 // ----------------------------------------------------------------------------
       
   313 // CCalenToolbarImpl::CreateButtonL
       
   314 // Create calendar toolbar buttons
       
   315 // ----------------------------------------------------------------------------
       
   316 CAknButton* CCalenToolbarImpl::CreateButtonL( CGulIcon* aIcon, 
       
   317                                               TInt aIconTextId,
       
   318                                               TInt aToolTipId )
       
   319     {
       
   320     TRACE_ENTRY_POINT;
       
   321 
       
   322     CAknButton* button = NULL;
       
   323     HBufC* iconText = StringLoader::LoadLC(aIconTextId);
       
   324     HBufC* toolTipText = StringLoader::LoadLC(aToolTipId);    
       
   325     
       
   326     button = CAknButton::NewL( aIcon, NULL, NULL, NULL, iconText->Des(), 
       
   327                            toolTipText->Des(), KAknButtonTextInsideFrame, 0 );
       
   328     
       
   329     CleanupStack::PopAndDestroy(toolTipText);
       
   330     CleanupStack::PopAndDestroy(iconText);
       
   331     
       
   332     button->SetIconScaleMode( EAspectRatioNotPreserved );
       
   333     button->SetFocusing( EFalse );
       
   334     button->SetTextAndIconAlignment(CAknButton::EIconOverText );
       
   335 
       
   336     TRACE_EXIT_POINT;  
       
   337     return button;
       
   338     }
       
   339 
       
   340 // ----------------------------------------------------------------------------
       
   341 // CCalenToolbarImpl::CreateButtonForCustomViewsL
       
   342 // Create calendar toolbar buttons
       
   343 // ----------------------------------------------------------------------------
       
   344 CAknButton* CCalenToolbarImpl::CreateButtonForCustomViewsL( CGulIcon* aIcon,
       
   345                                                             TInt aIconTextId,
       
   346                                                             const TDesC &aIconText )
       
   347     {
       
   348     TRACE_ENTRY_POINT;
       
   349 
       
   350     CAknButton* button = NULL;
       
   351     HBufC* iconText = StringLoader::LoadLC(aIconTextId);
       
   352     HBufC* toolTipText = HBufC::NewLC(aIconText.Length()+ iconText->Length()+1);      
       
   353     toolTipText->Des().Append(iconText->Des());
       
   354     toolTipText->Des().Append(_L(" "));
       
   355     toolTipText->Des().Append(aIconText);
       
   356     
       
   357     button = CAknButton::NewL( aIcon, NULL, NULL, NULL, aIconText, 
       
   358                 toolTipText->Des(), KAknButtonTextInsideFrame, 0 );
       
   359     
       
   360     CleanupStack::PopAndDestroy(toolTipText);
       
   361     CleanupStack::PopAndDestroy(iconText);
       
   362     
       
   363     button->SetIconScaleMode( EAspectRatioNotPreserved );
       
   364     button->SetFocusing( EFalse );
       
   365     button->SetTextAndIconAlignment(CAknButton::EIconOverText );
       
   366 
       
   367     TRACE_EXIT_POINT;  
       
   368     return button;
       
   369     }    
       
   370 
       
   371 // ----------------------------------------------------------------------------
       
   372 // CCalenToolbarImpl::PopulateChangeViewToolbarExtensionL
       
   373 // Populate the change view toolbar extension with available cycling views
       
   374 // read from viewinfoaray from view manager
       
   375 // ----------------------------------------------------------------------------
       
   376 void CCalenToolbarImpl::PopulateChangeViewToolbarExtensionL()
       
   377     {
       
   378     TRACE_ENTRY_POINT;
       
   379 
       
   380     TInt viewPosition(KErrNotFound);
       
   381     // get the view info array from viewmanager
       
   382     RPointerArray<CCalenViewInfo>& viewInfoArray = iController.ViewManager().ViewInfoArray(); 
       
   383     // get the current view id 
       
   384     TUid currentViewUid = iController.ViewManager().CurrentView();
       
   385     
       
   386     // get view cycle position list 
       
   387     RArray<TUid> viewPositionArray;
       
   388     GetViewPositionList( currentViewUid , viewPositionArray, viewInfoArray);
       
   389     TInt position(KPositionZero);
       
   390     
       
   391     ResetToolbarExtensionCommandsL();
       
   392     // add toolbar items for native views
       
   393     for(TInt index = viewPositionArray.Count()-1;index >= KPositionZero ;index--)
       
   394         {
       
   395         viewPosition = viewInfoArray.Find( viewPositionArray[index],
       
   396                                 CCalenViewInfo::ViewInfoIdentifier );
       
   397         if( viewPosition != KErrNotFound )
       
   398             {
       
   399             // add view toolbar items to the extendable toolbar
       
   400             AddItemsToExtendableToolbarL( position,
       
   401                         *(viewInfoArray[viewPosition]) );
       
   402             position++;
       
   403             }
       
   404         }
       
   405     viewPositionArray.Reset();
       
   406         
       
   407     TRACE_EXIT_POINT;
       
   408     }
       
   409 
       
   410 // ----------------------------------------------------------------------------
       
   411 // CCalenToolbarImpl::ResetCalenToolbar
       
   412 // Delete calendar toolbar
       
   413 // ----------------------------------------------------------------------------
       
   414 void CCalenToolbarImpl::ResetCalendarToolbar()
       
   415     {
       
   416     TRACE_ENTRY_POINT;
       
   417     
       
   418     if(iCalenToolbar)
       
   419         {
       
   420         delete iCalenToolbar;
       
   421         iCalenToolbar = NULL;
       
   422         }
       
   423     
       
   424     TRACE_EXIT_POINT;
       
   425     }
       
   426 
       
   427 // ----------------------------------------------------------------------------
       
   428 // CCalenToolbarImpl::SetToolbarExtensionFocus
       
   429 // For handling focus in toolbar extension
       
   430 // ----------------------------------------------------------------------------
       
   431 void CCalenToolbarImpl::SetToolbarExtensionFocus(TBool aFocus)
       
   432     {
       
   433     TRACE_ENTRY_POINT;
       
   434     
       
   435     iCalenToolbar->ToolbarExtension()->SetShown(aFocus);
       
   436     
       
   437     TRACE_EXIT_POINT;
       
   438     }
       
   439 
       
   440 // ----------------------------------------------------------------------------
       
   441 // CCalenToolbarImpl::GetViewPositionList
       
   442 // Get view position list based on the cycling positions
       
   443 // ----------------------------------------------------------------------------
       
   444 void CCalenToolbarImpl::GetViewPositionList( TUid aCurrentViewUid,
       
   445                                     RArray<TUid>& aViewPositionArray,
       
   446                                     RPointerArray<CCalenViewInfo>& aViewInfoArray)
       
   447     {
       
   448     TRACE_ENTRY_POINT;
       
   449     TInt currViewInfoPos = aViewInfoArray.Find( aCurrentViewUid , 
       
   450                                          CCalenViewInfo::ViewInfoIdentifier );
       
   451     
       
   452     TInt index = currViewInfoPos + 1;
       
   453     while( index!= currViewInfoPos )
       
   454         {
       
   455         if( index == aViewInfoArray.Count()) // If last item,
       
   456             {
       
   457             index = 0;
       
   458             continue;
       
   459             }
       
   460         if(( aViewInfoArray[index]->CyclePosition() != CCalenView::ENoCyclePosition ) )
       
   461             {
       
   462             aViewPositionArray.Append(aViewInfoArray[index]->ViewUid());
       
   463             }
       
   464         index++;
       
   465         }            
       
   466     
       
   467     TRACE_EXIT_POINT;
       
   468     }
       
   469 
       
   470 // ----------------------------------------------------------------------------
       
   471 // CCalenToolbarImpl::AddItemsToExtendableToolbarL
       
   472 // Add view toolbar items to the extendable toolbar as per view cycle positions
       
   473 // ----------------------------------------------------------------------------
       
   474 void CCalenToolbarImpl::AddItemsToExtendableToolbarL( TInt aIndex,
       
   475                         CCalenViewInfo& aViewInformation )
       
   476     {
       
   477     TRACE_ENTRY_POINT;
       
   478     CGulIcon* icon = NULL;
       
   479     CAknButton* button = NULL;
       
   480     
       
   481     CCalenView* viewIcon = static_cast<CCalenView*>( 
       
   482             iController.AppUi().View( aViewInformation.ViewUid()) );
       
   483     // get view icon
       
   484     icon = viewIcon->ViewIconL();
       
   485     
       
   486     TInt iconTextId(KErrNotFound);
       
   487     TInt toolTipTextId(KErrNotFound);
       
   488     
       
   489     if( ( iController.ViewManager().IsNativeView(aViewInformation.ViewUid() ) ) )
       
   490         {
       
   491         
       
   492         GetResourceIdForToolTip( aViewInformation.ViewUid(), iconTextId,
       
   493                                 toolTipTextId );
       
   494         // create toolbar button
       
   495         button = CreateButtonL( icon,iconTextId, toolTipTextId );
       
   496         }
       
   497     
       
   498     else
       
   499         {
       
   500         const TDesC& iconText = aViewInformation.MenuName(); 
       
   501         iconTextId = R_QTN_CALE_TB_CUSTOM_VIEW;        
       
   502         
       
   503         button = CreateButtonForCustomViewsL( icon, iconTextId, iconText );
       
   504         }
       
   505     
       
   506     // assign viewId as command
       
   507     TInt command = viewIcon->ViewId().iViewUid.iUid;
       
   508     
       
   509     CAknToolbarExtension* extension = iCalenToolbar->ToolbarExtension();
       
   510     // Append the toolbar button to the calendar toolbar
       
   511     extension->AddItemL( button, EAknCtButton, command , KAknButtonSizeFitText, aIndex );
       
   512     
       
   513     iExtensionToolbarCommands.Append(command);
       
   514     
       
   515     TRACE_EXIT_POINT;
       
   516     }
       
   517 
       
   518 // ----------------------------------------------------------------------------
       
   519 // CCalenToolbarImpl::ResetToolbarExtensionCommandsL
       
   520 // Reset toolbar extension commands 
       
   521 // ----------------------------------------------------------------------------
       
   522 void CCalenToolbarImpl::ResetToolbarExtensionCommandsL()
       
   523     {
       
   524     TRACE_ENTRY_POINT;
       
   525     if(iExtensionToolbarCommands.Count())
       
   526         {
       
   527         for(TInt index = 0; index < iExtensionToolbarCommands.Count();index++)
       
   528             {
       
   529             CAknToolbarExtension* extension = iCalenToolbar->ToolbarExtension();
       
   530             extension->RemoveItemL(iExtensionToolbarCommands[index]);
       
   531             }
       
   532         iExtensionToolbarCommands.Close();
       
   533         }
       
   534     TRACE_EXIT_POINT;
       
   535     }
       
   536 
       
   537 // ----------------------------------------------------------------------------
       
   538 // Get IconText and tooltip text resource ids for extendable toolbar items 
       
   539 // ----------------------------------------------------------------------------
       
   540 void CCalenToolbarImpl::GetResourceIdForToolTip( TUid aViewUid, TInt& aIconTextId,
       
   541                                 TInt& aToolTipTextId )
       
   542     {
       
   543     TRACE_ENTRY_POINT;
       
   544     
       
   545     switch(aViewUid.iUid)
       
   546         {
       
   547         case KCalenMonthViewUidValue:
       
   548             {
       
   549             aIconTextId = R_QTN_CALE_TB_MONTH_VIEW;
       
   550             aToolTipTextId = R_QTN_CALE_TB_MONTH_VIEW_TOOLTIP;
       
   551             }
       
   552             break;
       
   553         case KCalenWeekViewUidValue:
       
   554             {
       
   555             aIconTextId = R_QTN_CALE_TB_WEEK_VIEW;
       
   556             aToolTipTextId = R_QTN_CALE_TB_WEEK_VIEW_TOOLTIP;
       
   557             }
       
   558             break;
       
   559         case KCalenDayViewUidValue:
       
   560             {
       
   561             aIconTextId = R_QTN_CALE_TB_DAY_VIEW;
       
   562             aToolTipTextId = R_QTN_CALE_TB_DAY_VIEW_TOOLTIP;
       
   563             }
       
   564             break;
       
   565         case KCalenTodoViewUidValue:
       
   566             {
       
   567             aIconTextId = R_QTN_CALE_TB_TODO_VIEW;
       
   568             aToolTipTextId = R_QTN_CALE_TB_TODO_VIEW_TOOLTIP;
       
   569             }
       
   570             break;
       
   571         default:
       
   572             break;
       
   573             }
       
   574     
       
   575     TRACE_EXIT_POINT;
       
   576     }
       
   577 
       
   578 // End of file