44 #include <mul/imulcoverflowwidget.h> // Coverflow widget |
44 #include <mul/imulcoverflowwidget.h> // Coverflow widget |
45 #include <mul/imulsliderwidget.h> // For Slider Widget |
45 #include <mul/imulsliderwidget.h> // For Slider Widget |
46 #include <mpxcollectionpath.h> |
46 #include <mpxcollectionpath.h> |
47 |
47 |
48 #include <gesturehelper.h> |
48 #include <gesturehelper.h> |
|
49 #include <coeutils.h> |
49 |
50 |
50 using namespace GestureHelper; |
51 using namespace GestureHelper; |
51 |
52 |
52 #include <glxhdmicontroller.h> |
53 #include <glxhdmicontroller.h> |
53 |
54 |
423 |
430 |
424 //Disable the status pane here as it causes flicker while animating |
431 //Disable the status pane here as it causes flicker while animating |
425 CAknViewAppUi* appui = AppUi(); |
432 CAknViewAppUi* appui = AppUi(); |
426 if ( appui ) |
433 if ( appui ) |
427 { |
434 { |
|
435 SetTitlePaneTextL(KNullDesC); |
428 appui->StatusPane()->MakeVisible(EFalse); |
436 appui->StatusPane()->MakeVisible(EFalse); |
429 appui->Cba()->MakeVisible(EFalse); |
437 appui->Cba()->MakeVisible(EFalse); |
430 } |
438 } |
431 |
439 |
432 iViewWidget->show(true); |
440 iViewWidget->show(true); |
1161 return EEventConsumed; |
1174 return EEventConsumed; |
1162 } |
1175 } |
1163 case ETypeItemRemoved: |
1176 case ETypeItemRemoved: |
1164 { |
1177 { |
1165 GLX_LOG_INFO("CGlxFullScreenViewImp::OfferEventL ETypeItemRemoved"); |
1178 GLX_LOG_INFO("CGlxFullScreenViewImp::OfferEventL ETypeItemRemoved"); |
1166 TInt focusIndex = iMediaList->FocusIndex(); |
1179 HandleItemRemovedL(); |
1167 TInt mlCount = iMediaList->Count(); |
|
1168 GLX_LOG_INFO2("CGlxFullScreenViewImp::OfferEventL focusIndex=%d, iOldFocusIndex=%d", |
|
1169 focusIndex, iOldFocusIndex); |
|
1170 if (mlCount && (iOldFocusIndex == focusIndex |
|
1171 || iOldFocusIndex == mlCount) && iZoomControl |
|
1172 && iZoomControl->Activated()) |
|
1173 { |
|
1174 GLX_LOG_INFO("Fcused item is removed, Exit zoom view!"); |
|
1175 DeactivateZoomControlL(); |
|
1176 } |
|
1177 SetItemToHDMIL(); |
|
1178 if (focusIndex != KErrNotFound && EUiOn == GetUiState()) |
|
1179 { |
|
1180 // show/hide the slider |
|
1181 if (iSliderWidget) |
|
1182 { |
|
1183 iSliderWidget->ShowWidget(CheckIfSliderToBeShownL()); |
|
1184 } |
|
1185 } |
|
1186 /** if this is the last image deleted when Photo is in foreground, go back to the previous view*/ |
|
1187 if (mlCount == 0 && IsForeground() |
|
1188 && iNaviState->ViewingMode() |
|
1189 == NGlxNavigationalState::EView) |
|
1190 { |
|
1191 iUiUtility->SetViewNavigationDirection( |
|
1192 EGlxNavigationBackwards); |
|
1193 iNaviState->ActivatePreviousViewL(); |
|
1194 } |
|
1195 TRAP_IGNORE(ShowDrmExpiryNoteL()); |
|
1196 return EEventConsumed; |
1180 return EEventConsumed; |
1197 } |
1181 } |
1198 case ETypeHighlight: |
1182 case ETypeHighlight: |
1199 { |
1183 { |
1200 GLX_LOG_INFO("CGlxFullScreenViewImp::OfferEventL ETypeHighlight"); |
1184 GLX_LOG_INFO("CGlxFullScreenViewImp::OfferEventL ETypeHighlight"); |
1852 //Set the external display to cloning mode if |
1839 //Set the external display to cloning mode if |
1853 //the current item is something we dont support |
1840 //the current item is something we dont support |
1854 //(e.g. video, corrupted item, item with invalid DRM) |
1841 //(e.g. video, corrupted item, item with invalid DRM) |
1855 iHdmiController->ItemNotSupported(); |
1842 iHdmiController->ItemNotSupported(); |
1856 } |
1843 } |
|
1844 |
1857 iOldFocusIndex = iMediaList->FocusIndex(); |
1845 iOldFocusIndex = iMediaList->FocusIndex(); |
|
1846 delete iUri; |
|
1847 iUri = NULL; |
|
1848 iUri = item.Uri().AllocL(); |
1858 } |
1849 } |
1859 |
1850 |
1860 // --------------------------------------------------------------------------- |
1851 // --------------------------------------------------------------------------- |
1861 // HandleMMCInsertionL |
1852 // HandleMMCInsertionL |
1862 // |
1853 // |
2089 - KFullScreenIterator, 1); |
2080 - KFullScreenIterator, 1); |
2090 } |
2081 } |
2091 } |
2082 } |
2092 } |
2083 } |
2093 } |
2084 } |
|
2085 |
|
2086 // --------------------------------------------------------------------------- |
|
2087 // Sets the title pane text |
|
2088 // --------------------------------------------------------------------------- |
|
2089 void CGlxFullScreenViewImp::SetTitlePaneTextL(const TDesC& aTitleText) |
|
2090 { |
|
2091 TRACER("CGlxFullScreenViewImp::SetTitlePaneTextL()"); |
|
2092 CAknViewAppUi* appui = AppUi(); |
|
2093 if (appui) |
|
2094 { |
|
2095 CAknTitlePane* titlePane = |
|
2096 (CAknTitlePane*) appui->StatusPane()->ControlL(TUid::Uid( |
|
2097 EEikStatusPaneUidTitle)); |
|
2098 titlePane->SetTextL(aTitleText); |
|
2099 titlePane->DrawNow(); |
|
2100 } |
|
2101 } |
|
2102 |
|
2103 // --------------------------------------------------------------------------- |
|
2104 // HandleItemRemovedL |
|
2105 // --------------------------------------------------------------------------- |
|
2106 void CGlxFullScreenViewImp::HandleItemRemovedL() |
|
2107 { |
|
2108 TRACER("CGlxFullScreenViewImp::HandleItemRemovedL()"); |
|
2109 TInt focusIndex = iMediaList->FocusIndex(); |
|
2110 TInt mlCount = iMediaList->Count(); |
|
2111 GLX_LOG_INFO2("CGlxFullScreenViewImp::HandleItemRemovedL focusIndex=%d, iOldFocusIndex=%d", |
|
2112 focusIndex, iOldFocusIndex); |
|
2113 // When photos is in background, the Following scenario could happen, |
|
2114 // 1) First item is deleted => iOldFocusIndex == focusIndex (or) |
|
2115 // 2) Last item is deleted => iOldFocusIndex == mlCount (or) |
|
2116 // 3) New item is added and focused item is deleted => iOldFocusIndex != focusIndex |
|
2117 if (mlCount && (iOldFocusIndex == focusIndex || iOldFocusIndex == mlCount |
|
2118 || iOldFocusIndex != focusIndex) && iZoomControl |
|
2119 && iZoomControl->Activated()) |
|
2120 { |
|
2121 GLX_LOG_INFO("Focused item is removed, Exit zoom view!"); |
|
2122 DeactivateZoomControlL(); |
|
2123 } |
|
2124 SetItemToHDMIL(); |
|
2125 if (focusIndex != KErrNotFound && EUiOn == GetUiState()) |
|
2126 { |
|
2127 // show/hide the slider |
|
2128 if (iSliderWidget) |
|
2129 { |
|
2130 iSliderWidget->ShowWidget(CheckIfSliderToBeShownL()); |
|
2131 } |
|
2132 } |
|
2133 /** 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() |
|
2135 == NGlxNavigationalState::EView) |
|
2136 { |
|
2137 iUiUtility->SetViewNavigationDirection(EGlxNavigationBackwards); |
|
2138 iNaviState->ActivatePreviousViewL(); |
|
2139 } |
|
2140 TRAP_IGNORE(ShowDrmExpiryNoteL()); |
|
2141 } |