calendarui/controller/src/calenmultidbeditor.cpp
branchRCL_3
changeset 86 ed599363c2d7
parent 78 356f28cd5ca0
equal deleted inserted replaced
78:356f28cd5ca0 86:ed599363c2d7
   437 // -----------------------------------------------------------------------------
   437 // -----------------------------------------------------------------------------
   438 TKeyResponse CCalenMultiDBEditor::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
   438 TKeyResponse CCalenMultiDBEditor::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
   439     {
   439     {
   440     TRACE_ENTRY_POINT;
   440     TRACE_ENTRY_POINT;
   441     TKeyResponse keyResponse(EKeyWasNotConsumed);
   441     TKeyResponse keyResponse(EKeyWasNotConsumed);
   442     TInt ctrlid=IdOfFocusControl();
       
   443 
   442 
   444     if (aType == EEventKey)
   443     if (aType == EEventKey)
   445        {
   444        {
   446        switch (aKeyEvent.iCode)
   445        switch (aKeyEvent.iCode)
   447         	{
   446         	{
   448             case EKeyOK:
       
   449                 if( ctrlid == ECalenMultiDbColor)
       
   450                     {
       
   451                     GetColorL();
       
   452                     }
       
   453                 else if ( ctrlid == ECalenMultiDbHiddenVisible )
       
   454                     {
       
   455                     iCalendarStatus = iCalendarInfo.Enabled();
       
   456                     if( ECalenMultiDbHidden == iCalendarStatus )
       
   457                         {
       
   458                         SetVisiblityFieldL( ECalenMultiDbVisible ); 
       
   459                         iCalendarStatus = ECalenMultiDbVisible;
       
   460                         iCalendarInfo.SetEnabled(iCalendarStatus);
       
   461                         }
       
   462                     else
       
   463                         {
       
   464                         SetVisiblityFieldL( ECalenMultiDbHidden );
       
   465                         iCalendarStatus = ECalenMultiDbHidden;
       
   466                         iCalendarInfo.SetEnabled(iCalendarStatus);
       
   467                         }
       
   468                     }
       
   469                 break;
       
   470         	case EKeyEscape:
   447         	case EKeyEscape:
   471 			    TryExitL( EAknCmdExit );
   448 			    TryExitL( EAknCmdExit );
   472         		keyResponse = EKeyWasConsumed;
   449         		keyResponse = EKeyWasConsumed;
   473         		break;
   450         		break;
   474           	default:
   451           	default:
   643     TRACE_ENTRY_POINT
   620     TRACE_ENTRY_POINT
   644     
   621     
   645     if(IsFocused() && !iNoneChoosen)
   622     if(IsFocused() && !iNoneChoosen)
   646         {
   623         {
   647         iColVal = iChoosenColor.Value();
   624         iColVal = iChoosenColor.Value();
   648         TRAP_IGNORE(iPicture->SetRgbColorsL(iChoosenColor));
   625         iPicture->SetRgbColorsL(iChoosenColor);
   649         GetLineByLineAndPageIndex(1, 0)->DrawNow();
   626         GetLineByLineAndPageIndex(1, 0)->DrawNow();
   650         }
   627         }
   651     
   628     
   652     TRACE_EXIT_POINT
   629     TRACE_EXIT_POINT
   653     }
   630     }