photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp
branchRCL_3
changeset 68 5b238bc8ffb6
parent 64 34937ec34dac
child 75 01504893d9cb
equal deleted inserted replaced
64:34937ec34dac 68:5b238bc8ffb6
   552         }
   552         }
   553 
   553 
   554     //Since the toolbar should not be present for ImageViewer.
   554     //Since the toolbar should not be present for ImageViewer.
   555     if(!iImgViewerMode)
   555     if(!iImgViewerMode)
   556         {
   556         {
       
   557 		TInt focusIndex = iMediaList->FocusIndex();
       
   558 		if (focusIndex >= 0 && focusIndex < iMediaList->Count())
       
   559 			{
       
   560 			TBool dimmed = (EMPXVideo == iMediaList->Item(focusIndex).Category());
       
   561 			Toolbar()->SetItemDimmed(EGlxCmdSlideshowPlay, dimmed, ETrue);
       
   562 			}
   557         //show the toolbar
   563         //show the toolbar
   558         EnableFSToolbar(ETrue);
   564         EnableFSToolbar(ETrue);
   559         }
   565         }
   560      
   566      
   561     // For floating toolbar in non-touch devices
   567     // For floating toolbar in non-touch devices
  1029 AlfEventStatus CGlxFullScreenViewImp::OfferEventL(const TAlfEvent& aEvent)
  1035 AlfEventStatus CGlxFullScreenViewImp::OfferEventL(const TAlfEvent& aEvent)
  1030     {
  1036     {
  1031     TRACER("CGlxFullScreenViewImp::offerEventL");
  1037     TRACER("CGlxFullScreenViewImp::offerEventL");
  1032     if ( aEvent.IsKeyEvent())
  1038     if ( aEvent.IsKeyEvent())
  1033         {
  1039         {
       
  1040 		GLX_LOG_INFO1("CGlxFullScreenViewImp::OfferEventL aEvent.KeyEvent().iScanCode: %d",aEvent.KeyEvent().iScanCode); 
  1034         switch ( aEvent.KeyEvent().iScanCode )
  1041         switch ( aEvent.KeyEvent().iScanCode )
  1035             {
  1042             {
  1036             case EStdKeyNkpAsterisk :
  1043             case EStdKeyNkpAsterisk :
  1037 				if(iUiUtility->IsPenSupported())
  1044 				if(iUiUtility->IsPenSupported())
  1038 					{
  1045 					{
  1041             case EStdKeyIncVolume :
  1048             case EStdKeyIncVolume :
  1042                 //Listen EStdKeyApplicationD as EKeyZoomIn key is mapped to TKeyCode:: 
  1049                 //Listen EStdKeyApplicationD as EKeyZoomIn key is mapped to TKeyCode:: 
  1043                 //EKeyApplicationC for which TStdScancode is EStdKeyApplicatoinC
  1050                 //EKeyApplicationC for which TStdScancode is EStdKeyApplicatoinC
  1044             case EStdKeyApplicationC: 
  1051             case EStdKeyApplicationC: 
  1045                 {
  1052                 {
  1046                 if(EEventKeyDown == aEvent.Code())
  1053                 TInt focusIndex = iMediaList->FocusIndex();
       
  1054                 if (focusIndex >= 0 && focusIndex < iMediaList->Count())
  1047                     {
  1055                     {
  1048                     HideUi(EFalse);
  1056                     if (EEventKey == aEvent.Code() && (EMPXImage 
  1049                     TRAP_IGNORE( ActivateZoomControlL(EZoomStartKey));
  1057                             == iMediaList->Item(focusIndex).Category()))
  1050                     return EEventConsumed;
  1058                         {
       
  1059                         HideUi(EFalse);
       
  1060                         SetSliderToMin();
       
  1061                         TRAP_IGNORE(ActivateZoomControlL(EZoomStartKey));
       
  1062                         return EEventHandled;
       
  1063                         }
  1051                     }
  1064                     }
       
  1065 				// Fall through to show the UI in case of EMPXVideo
  1052                 }
  1066                 }
  1053             case EStdKeyUpArrow:            
  1067             case EStdKeyUpArrow:            
  1054             case EStdKeyDownArrow:
  1068             case EStdKeyDownArrow:
  1055             case EStdKeyDevice0:
  1069             case EStdKeyDevice0:
  1056             case EStdKeyDevice1:
  1070             case EStdKeyDevice1:
  2120         {
  2134         {
  2121         GLX_LOG_INFO("Focused item is removed, Exit zoom view!");
  2135         GLX_LOG_INFO("Focused item is removed, Exit zoom view!");
  2122         DeactivateZoomControlL();
  2136         DeactivateZoomControlL();
  2123         }
  2137         }
  2124     SetItemToHDMIL();
  2138     SetItemToHDMIL();
  2125     if (focusIndex != KErrNotFound && EUiOn == GetUiState())
  2139     if (focusIndex != KErrNotFound && focusIndex < iMediaList->Count() && EUiOn
       
  2140             == GetUiState())
  2126         {
  2141         {
  2127         // show/hide the slider
  2142         // show/hide the slider
  2128         if (iSliderWidget)
  2143         if (iSliderWidget)
  2129             {
  2144             {
  2130             iSliderWidget->ShowWidget(CheckIfSliderToBeShownL());
  2145             iSliderWidget->ShowWidget(CheckIfSliderToBeShownL());
  2131             }
  2146             }
       
  2147         TBool dimmed = (EMPXVideo == iMediaList->Item(focusIndex).Category());
       
  2148         Toolbar()->SetItemDimmed(EGlxCmdSlideshowPlay, dimmed, ETrue);
  2132         }
  2149         }
  2133     /** if this is the last image deleted when Photo is in foreground, go back to the previous view*/
  2150     /** if this is the last image deleted when Photo is in foreground, go back to the previous view*/
  2134     if (mlCount == 0 && IsForeground() && iNaviState->ViewingMode()
  2151     if (mlCount == 0 && IsForeground() && iNaviState->ViewingMode()
  2135             == NGlxNavigationalState::EView)
  2152             == NGlxNavigationalState::EView)
  2136         {
  2153         {