49 |
49 |
50 // For transition effects |
50 // For transition effects |
51 #include <akntranseffect.h> |
51 #include <akntranseffect.h> |
52 #include <gfxtranseffect/gfxtranseffect.h> |
52 #include <gfxtranseffect/gfxtranseffect.h> |
53 #include "glxgfxtranseffect.h" // For transition effects |
53 #include "glxgfxtranseffect.h" // For transition effects |
54 #include <akntransitionutils.h> //For CAknTransitionUtils |
54 |
55 |
|
56 const TInt KViewId = 0x200071B7; |
55 const TInt KViewId = 0x200071B7; |
57 |
|
58 //Transition animation used for Cloud view activation |
|
59 _LIT( KTfxResourceActivate , "z:\\resource\\effects\\photos_gridview_appear.fxml"); |
|
60 _LIT( KTfxResourceNoEffect, ""); |
|
61 |
56 |
62 using namespace Alf; |
57 using namespace Alf; |
63 // ======== MEMBER FUNCTIONS ======== |
58 // ======== MEMBER FUNCTIONS ======== |
64 |
59 |
65 // --------------------------------------------------------------------------- |
60 // --------------------------------------------------------------------------- |
142 // --------------------------------------------------------------------------- |
137 // --------------------------------------------------------------------------- |
143 // |
138 // |
144 CGlxCloudViewImp::~CGlxCloudViewImp() |
139 CGlxCloudViewImp::~CGlxCloudViewImp() |
145 { |
140 { |
146 TRACER("GLX_CLOUD::CGlxCloudViewImp::~CGlxCloudViewImp"); |
141 TRACER("GLX_CLOUD::CGlxCloudViewImp::~CGlxCloudViewImp"); |
147 if(iAlfEffectObs) |
142 |
148 { |
|
149 delete iAlfEffectObs; |
|
150 } |
|
151 |
|
152 CleanupVisuals (); |
143 CleanupVisuals (); |
153 delete iEmptyListText; |
144 delete iEmptyListText; |
154 if ( iResourceOffset ) |
145 if ( iResourceOffset ) |
155 { |
146 { |
156 CCoeEnv::Static()->DeleteResourceFile (iResourceOffset); |
147 CCoeEnv::Static()->DeleteResourceFile (iResourceOffset); |
219 void CGlxCloudViewImp::DoMLViewActivateL(const TVwsViewId & /* aPrevViewId */, |
210 void CGlxCloudViewImp::DoMLViewActivateL(const TVwsViewId & /* aPrevViewId */, |
220 TUid /* aCustomMessageId */, const TDesC8 & /* aCustomMessage */) |
211 TUid /* aCustomMessageId */, const TDesC8 & /* aCustomMessage */) |
221 { |
212 { |
222 TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL"); |
213 TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL"); |
223 |
214 |
|
215 TUint transitionID = (iUiUtility->ViewNavigationDirection()== |
|
216 EGlxNavigationForwards)?KActivateTransitionId:KDeActivateTransitionId; |
|
217 |
|
218 GfxTransEffect::BeginFullScreen( transitionID, TRect(), |
|
219 AknTransEffect::EParameterType, |
|
220 AknTransEffect::GfxTransParam( KPhotosUid, |
|
221 AknTransEffect::TParameter::EEnableEffects) ); |
|
222 |
|
223 |
224 if(StatusPane()) |
224 if(StatusPane()) |
225 { |
225 { |
226 StatusPane()->MakeVisible(ETrue); |
226 StatusPane()->MakeVisible(ETrue); |
227 } |
227 } |
228 |
|
229 ConstructCloudControlL(); |
228 ConstructCloudControlL(); |
230 GLX_LOG_INFO("CGlxCloudViewImp::DoMLViewActivateL Cloud View Control Created" ); |
229 GLX_LOG_INFO("CGlxCloudViewImp::DoMLViewActivateL Cloud View Control Created" ); |
231 |
230 |
|
231 GfxTransEffect::EndFullScreen(); |
|
232 |
232 // set app state to tag-browser view |
233 // set app state to tag-browser view |
233 GlxSetAppState::SetState (EGlxInTagBrowserView); |
234 GlxSetAppState::SetState (EGlxInTagBrowserView); |
234 iMMCNotifier = CGlxMMCNotifier::NewL(*this); |
235 iMMCNotifier = CGlxMMCNotifier::NewL(*this); |
235 |
|
236 //Set the ALF animation effect to CAlfAnchorLayout since the animation |
|
237 //does not work for both avkon and alf together. |
|
238 //Check if the transitions are enabled from themes |
|
239 if (CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EFullScreenTransitionsOff )) |
|
240 { |
|
241 if(!iAlfEffectObs) |
|
242 { |
|
243 iAlfEffectObs = CAlfEffectObserver::NewL(); |
|
244 } |
|
245 |
|
246 iAnchorlayout->SetEffectL( KTfxResourceActivate ); |
|
247 iEffectHandle = iAnchorlayout->Identifier(); |
|
248 iAlfEffectObs->SubscribeCallbackL(this,iEffectHandle); |
|
249 } |
|
250 |
|
251 } |
236 } |
252 |
237 |
253 // --------------------------------------------------------------------------- |
238 // --------------------------------------------------------------------------- |
254 // From CAknView |
239 // From CAknView |
255 // View deactivation function. |
240 // View deactivation function. |
347 const char* KVerScrollbarWidgetName("alfscrollbarwidget_ver"); |
332 const char* KVerScrollbarWidgetName("alfscrollbarwidget_ver"); |
348 const char* KScrollBarModel(/*"mulmodel"*/"scrollbarmodel"); |
333 const char* KScrollBarModel(/*"mulmodel"*/"scrollbarmodel"); |
349 |
334 |
350 IAlfWidgetFactory& widgetFactory = AlfWidgetEnvExtension::widgetFactory(*(iUiUtility->Env ())); |
335 IAlfWidgetFactory& widgetFactory = AlfWidgetEnvExtension::widgetFactory(*(iUiUtility->Env ())); |
351 |
336 |
352 iViewWidget = widgetFactory.createViewWidget("viewwidget", 0, 0, iDisplay); |
337 iViewWidget = widgetFactory.createViewWidget("viewwidget", 0,0,iDisplay); |
353 iViewWidget->setRect(ClientRect()); |
338 |
354 iViewWidget->show(true); |
339 iViewWidget->setRect( ClientRect() ); |
355 |
340 iViewWidget->show(true); |
356 IAlfLayoutManager* layoutmanager = IAlfInterfaceBase::makeInterface< |
341 |
357 IAlfLayoutManager>(iViewWidget->control()); |
342 IAlfLayoutManager* layoutmanager = IAlfInterfaceBase::makeInterface<IAlfLayoutManager>(iViewWidget->control()); |
358 iViewWidget->setRect(ClientRect()); |
343 iViewWidget->setRect(ClientRect()); |
359 |
344 |
360 // parent layout handle for scrollbar |
345 // parent layout handle for scrollbar |
361 iScrollPaneHandle = AknLayoutScalable_UiAccel::aa_scroll_pane(0).LayoutLine(); |
346 iScrollPaneHandle = AknLayoutScalable_UiAccel::aa_scroll_pane(0).LayoutLine(); |
362 |
347 |
363 iAnchorlayout = &((CAlfAnchorLayout&)layoutmanager->getLayout()); |
348 iAnchorlayout = &((CAlfAnchorLayout&)layoutmanager->getLayout()); |
454 // --------------------------------------------------------------------------- |
439 // --------------------------------------------------------------------------- |
455 // |
440 // |
456 void CGlxCloudViewImp::HandleGridMenuListL(TInt aCommand) |
441 void CGlxCloudViewImp::HandleGridMenuListL(TInt aCommand) |
457 { |
442 { |
458 TRACER("GLX_CLOUD::CGlxCloudViewImp::HandleGridMenuListL"); |
443 TRACER("GLX_CLOUD::CGlxCloudViewImp::HandleGridMenuListL"); |
459 iCloudControl->ShowContextItemMenuL(EFalse); |
444 ProcessCommandL(aCommand); |
460 if (aCommand) |
|
461 { |
|
462 ProcessCommandL(aCommand); |
|
463 } |
|
464 } |
445 } |
465 |
446 |
466 // ---------------------------------------------------------------------------- |
447 // ---------------------------------------------------------------------------- |
467 // ViewDynInitMenuPaneL |
448 // ViewDynInitMenuPaneL |
468 // ---------------------------------------------------------------------------- |
449 // ---------------------------------------------------------------------------- |
509 { |
490 { |
510 iMMCState = EFalse; |
491 iMMCState = EFalse; |
511 ProcessCommandL(EAknSoftkeyClose); |
492 ProcessCommandL(EAknSoftkeyClose); |
512 } |
493 } |
513 } |
494 } |
514 |
|
515 // --------------------------------------------------------------------------- |
|
516 // HandleEffectCallback |
|
517 // |
|
518 // --------------------------------------------------------------------------- |
|
519 // |
|
520 void CGlxCloudViewImp::HandleEffectCallback(TInt aType, TInt aHandle, TInt /*aStatus*/) |
|
521 { |
|
522 TRACER("CGlxCloudViewImp::HandleEffectCallback()"); |
|
523 if (aHandle == iEffectHandle && aType == EAlfEffectComplete |
|
524 && iAnchorlayout) |
|
525 { |
|
526 TRAP_IGNORE(iAnchorlayout->SetEffectL(KTfxResourceNoEffect)); |
|
527 } |
|
528 } |
|
529 |
|