|
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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 //Includes |
|
20 #include <QTimer> |
|
21 #include <hbmenu.h> |
|
22 #include <HbAction> |
|
23 #include <HbToolBar> |
|
24 #include <hbgridview.h> |
|
25 #include <hbpushbutton.h> |
|
26 #include <hbmainwindow.h> |
|
27 #include <shareuidialog.h> |
|
28 #include <hbdocumentloader.h> |
|
29 #include <QAbstractItemModel> |
|
30 #include <hbabstractviewitem.h> |
|
31 #include <hbiconitem.h> |
|
32 #include <QCoreApplication> |
|
33 #include <xqserviceutil.h> |
|
34 //User Includes |
|
35 #include "glxlog.h" |
|
36 #include "glxtracer.h" |
|
37 #include "glxviewids.h" //contains the view ids of all the views in photos app. |
|
38 #include "glxicondefs.h" //Contains the icon names/Ids |
|
39 #include "glxmodelparm.h" |
|
40 #include "glxcoverflow.h" |
|
41 #include "glxdocloaderdefs.h" //contains the definations of path, widget names and view names in docml |
|
42 #include "glxloggerenabler.h" |
|
43 #include "glxtvoutwrapper.h" |
|
44 #include "glxfullscreenview.h" |
|
45 #include "glxcommandhandlers.hrh" |
|
46 #include "glxzoomwidget.h" |
|
47 #include "glxlocalisationstrings.h" |
|
48 #include "OstTraceDefinitions.h" |
|
49 #ifdef OST_TRACE_COMPILER_IN_USE |
|
50 #include "glxfullscreenviewTraces.h" |
|
51 #endif |
|
52 |
|
53 |
|
54 const int KUiOffTime = 3000; |
|
55 |
|
56 GlxFullScreenView::GlxFullScreenView(HbMainWindow *window,HbDocumentLoader *DocLoader) : |
|
57 GlxView ( GLX_FULLSCREENVIEW_ID ), |
|
58 mModel( NULL ), |
|
59 mWindow( window ), |
|
60 mCoverFlow( NULL ) , |
|
61 mImageStrip( NULL ), |
|
62 mUiOffTimer( NULL ), |
|
63 mBackGroundItem( NULL ), |
|
64 mTvOutWrapper( NULL ), |
|
65 mFullScreenToolBar( NULL ), |
|
66 mZoomWidget( NULL ), |
|
67 mUiOff ( false ) |
|
68 { |
|
69 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_ENTRY ); |
|
70 mIconItems[0] = NULL; |
|
71 mIconItems[1] = NULL; |
|
72 mDocLoader = DocLoader; |
|
73 setContentFullScreen( true ); |
|
74 |
|
75 HbEffect::add( QString( "HbGridView" ), QString( ":/data/transitionup.fxml" ), QString( "TapShow" ) ); |
|
76 HbEffect::add( QString( "HbGridView" ), QString( ":/data/transitiondown.fxml" ), QString( "TapHide" ) ); |
|
77 HbEffect::add( QString( "HbGridViewItem" ), QString( ":/data/zoomin.fxml" ), QString( "SelectHide" ) ); |
|
78 HbEffect::add( QString( "HbGridViewItem" ), QString( ":/data/zoomout.fxml" ), QString( "SelectShow" ) ); |
|
79 HbEffect::add( QString( "HbIconItem" ), QString( ":/data/rotatefslandscape.fxml" ), QString( "RotateFSLS" ) ); |
|
80 HbEffect::add( QString( "HbIconItem" ), QString( ":/data/rotatefsprotrait.fxml" ), QString( "RotateFSPT" ) ); |
|
81 |
|
82 OstTraceFunctionExit0( GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_EXIT ); |
|
83 } |
|
84 |
|
85 void GlxFullScreenView::initializeView( QAbstractItemModel *model, GlxView *preView ) |
|
86 { |
|
87 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_INITIALIZEVIEW_ENTRY ); |
|
88 |
|
89 // if animations is on, then Set the image to HDMI here |
|
90 if (!mTvOutWrapper){ |
|
91 mTvOutWrapper = new GlxTvOutWrapper(); |
|
92 } |
|
93 setHdmiModel(model); |
|
94 loadWidgets(); |
|
95 |
|
96 /* |
|
97 * Initialize the coverflow and partially creates the coverflow with one image |
|
98 * to make the widget light weight in order to make transition smooth |
|
99 */ |
|
100 /* |
|
101 * Grid view is not in full screen mode so this view have some flicker after transtion is finshed |
|
102 * and some cases in grid view status bar is visible and some cases it is not |
|
103 * so adjust the initial postion of fullscreen base on status bar visiblity. |
|
104 */ |
|
105 if ( preView->compare( GLX_GRIDVIEW_ID ) && preView->isItemVisible ( Hb::StatusBarItem ) ) { |
|
106 qreal chromeHeight = 0; |
|
107 style()->parameter( "hb-param-widget-chrome-height", chromeHeight ); |
|
108 mCoverFlow->partiallyCreate( model, screenSize(), -chromeHeight ); |
|
109 } |
|
110 else { |
|
111 mCoverFlow->partiallyCreate( model, screenSize() ); |
|
112 } |
|
113 |
|
114 OstTraceFunctionExit0( GLXFULLSCREENVIEW_INITIALIZEVIEW_EXIT ); |
|
115 } |
|
116 |
|
117 void GlxFullScreenView::loadWidgets() |
|
118 { |
|
119 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_LOADWIDGETS_ENTRY ); |
|
120 |
|
121 mCoverFlow = qobject_cast<GlxCoverFlow*> (mDocLoader->findWidget(GLXFULLSCREEN_COVERFLOW)); |
|
122 |
|
123 mZoomWidget = qobject_cast<GlxZoomWidget*> (mDocLoader->findWidget(GLXFULLSCREENZOOMWIDGET)); |
|
124 mZoomWidget->connectDecodeRequestToPinchEvent(); |
|
125 mCoverFlow->setMultitouchFilter(mZoomWidget); |
|
126 |
|
127 //initialise the cover flow for basic connections and the rest |
|
128 mCoverFlow->setCoverFlow(); |
|
129 mImageStrip = qobject_cast<HbGridView*> (mDocLoader->findWidget(GLXFULLSCREEN_FILMSTRIP)); |
|
130 |
|
131 //When the widget is loaded/retreived the widgets are shown by default. |
|
132 //@to do : hide the widgets by default in docml |
|
133 mImageStrip->hide(); |
|
134 mImageStrip->setLayoutName( QString( "ImageStrip" ) ); // To distinguish in CSS file |
|
135 mImageStrip->setEnabledAnimations( HbAbstractItemView::None ); |
|
136 mImageStrip->setHorizontalScrollBarPolicy( HbScrollArea::ScrollBarAlwaysOff ); |
|
137 |
|
138 OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADWIDGETS_EXIT ); |
|
139 } |
|
140 |
|
141 void GlxFullScreenView::loadFullScreenToolBar() |
|
142 { |
|
143 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_LOADFULLSCREENTOOLBAR_ENTRY ); |
|
144 |
|
145 //The fullscreen tool bar is delted when ever the view is deactivated |
|
146 //so load the docml once again and retreive the object |
|
147 bool loaded =true; |
|
148 mDocLoader->load(GLXFULLSCREENDOCMLPATH,&loaded); |
|
149 loadViewSection(); |
|
150 |
|
151 mFullScreenToolBar = qobject_cast<HbToolBar *> (mDocLoader->findObject(QString("toolBar"))); |
|
152 mFullScreenToolBar->clearActions(); |
|
153 |
|
154 addToolBarAction( EGlxCmdDetailsOpen, GLXICON_FLIP, "Flip Action" ); //create Flip tool bar button action |
|
155 addToolBarAction( EGlxCmdSend, GLXICON_SEND, "Send Action" ); //create Send tool bar button action |
|
156 if( getSubState() != IMAGEVIEWER_S ) { |
|
157 addToolBarAction( EGlxCmdDelete, GLXICON_DELETE, "Delete Action" ); //create Delete tool bar button action |
|
158 } |
|
159 else { |
|
160 addToolBarAction( EGlxCmdHandled, GLXICON_USEIMAGE, "Use Action" ); //create Use Image tool bar button action |
|
161 } |
|
162 |
|
163 OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADFULLSCREENTOOLBAR_EXIT ); |
|
164 } |
|
165 |
|
166 void GlxFullScreenView::addToolBarAction( int commandId, const QString &iconName, const QString &name ) |
|
167 { |
|
168 HbAction *action = new HbAction( this ); |
|
169 action->setData( commandId ); |
|
170 action->setIcon( HbIcon( iconName ) ); |
|
171 action->setObjectName( name ); |
|
172 mFullScreenToolBar->addAction( action ); |
|
173 connect(action, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); |
|
174 } |
|
175 |
|
176 void GlxFullScreenView::activate() |
|
177 { |
|
178 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ACTIVATE_ENTRY ); |
|
179 //for zoom might not be required after wk15 release |
|
180 mWindow->viewport()->setAttribute(Qt::WA_AcceptTouchEvents,true); |
|
181 mWindow->viewport()->grabGesture(Qt::PinchGesture); |
|
182 |
|
183 QCoreApplication::instance()->installEventFilter(this); |
|
184 |
|
185 if( !mCoverFlow ) { |
|
186 loadWidgets(); //retrives the widgets |
|
187 } |
|
188 //Loads the widgets corresponding to the orientation. |
|
189 loadViewSection(); |
|
190 |
|
191 HbView::HbViewFlags flags( HbView::ViewTitleBarTransparent | HbView::ViewStatusBarTransparent); |
|
192 setViewFlags(flags); |
|
193 |
|
194 // In case of fetcher don't hide status pane and title bar |
|
195 if(!(XQServiceUtil::isService() && (0 == XQServiceUtil::interfaceName().compare(QLatin1String("com.nokia.symbian.IImageFetch"))))) { |
|
196 setViewFlags( viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden ); |
|
197 mUiOff = true; |
|
198 } |
|
199 else |
|
200 { |
|
201 HbAction* selectAction = new HbAction(GLX_BUTTON_SELECT); |
|
202 selectAction->setObjectName( "FS Select" ); |
|
203 |
|
204 connect(selectAction, SIGNAL(triggered()), this, SLOT(handleFSSelect())); |
|
205 HbToolBar* toolBar = new HbToolBar(); |
|
206 toolBar->setOrientation( Qt::Horizontal ); |
|
207 toolBar->setVisible(true); |
|
208 toolBar->addAction(selectAction); |
|
209 setToolBar(toolBar); |
|
210 } |
|
211 |
|
212 mUiOffTimer = new QTimer(); |
|
213 mUiOffTimer->stop(); |
|
214 mCoverFlow->setUiOn(FALSE); |
|
215 addConnection(); |
|
216 setLayout(); |
|
217 |
|
218 if (!mTvOutWrapper) { |
|
219 mTvOutWrapper = new GlxTvOutWrapper(); |
|
220 } |
|
221 |
|
222 mWindow->setAutomaticOrientationEffectEnabled( false ); |
|
223 OstTraceFunctionExit0( GLXFULLSCREENVIEW_ACTIVATE_EXIT ); |
|
224 } |
|
225 |
|
226 void GlxFullScreenView::handleFSSelect() |
|
227 { |
|
228 emit actionTriggered( EGlxCmdFetcherSelect ); |
|
229 } |
|
230 |
|
231 void GlxFullScreenView::loadViewSection() |
|
232 { |
|
233 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_LOADVIEWSECTION_ENTRY ); |
|
234 |
|
235 bool loaded =true; |
|
236 if( mWindow->orientation() == Qt::Horizontal ) { |
|
237 //Load the Landscape section for Horizontal |
|
238 mDocLoader->load(GLXFULLSCREENDOCMLPATH,GLXFULLSCREENLSSECTION,&loaded); |
|
239 } |
|
240 else{ |
|
241 //Load the Portrait section for Horizontal |
|
242 mDocLoader->load(GLXFULLSCREENDOCMLPATH,GLXFULLSCREENPTSECTION,&loaded); |
|
243 } |
|
244 |
|
245 OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADVIEWSECTION_EXIT ); |
|
246 } |
|
247 |
|
248 void GlxFullScreenView::resetView() |
|
249 { |
|
250 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_RESETVIEW_ENTRY ); |
|
251 |
|
252 cancelSelectionAnimation(); //cancel the image selection effect before cleaning the view |
|
253 //Clean up the rest of the resources allocated |
|
254 cleanUp(); |
|
255 |
|
256 //Clear the 4 icons present in the Coverflow,so that the transition between the views are smooth |
|
257 mCoverFlow->partiallyClean(); |
|
258 |
|
259 OstTraceFunctionExit0( GLXFULLSCREENVIEW_RESETVIEW_EXIT ); |
|
260 } |
|
261 |
|
262 void GlxFullScreenView::deActivate() |
|
263 { |
|
264 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_DEACTIVATE_ENTRY ); |
|
265 |
|
266 cancelSelectionAnimation(); //cancel the image selection effect before cleaning the view |
|
267 //Clean up the rest of the resources allocated |
|
268 cleanUp(); |
|
269 QCoreApplication::instance()->removeEventFilter(this); |
|
270 //deletes the iconitems in the coverflow |
|
271 mCoverFlow->ClearCoverFlow(); |
|
272 |
|
273 //the coverflow is not deleted as it is loaded by document loader |
|
274 //the coverflow is initialised to null |
|
275 //to just reset to the initial state |
|
276 mCoverFlow = NULL; |
|
277 mWindow->setAutomaticOrientationEffectEnabled( true ); |
|
278 OstTraceFunctionExit0( GLXFULLSCREENVIEW_DEACTIVATE_EXIT ); |
|
279 } |
|
280 |
|
281 void GlxFullScreenView::cleanUp() |
|
282 { |
|
283 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_CLEANUP_ENTRY ); |
|
284 |
|
285 removeConnection(); |
|
286 |
|
287 if ( mUiOffTimer ) { |
|
288 OstTrace0( TRACE_NORMAL, GLXFULLSCREENVIEW_CLEANUP, "GlxFullScreenView::cleanUp() mUiOffTimer" ); |
|
289 mUiOffTimer->stop(); |
|
290 delete mUiOffTimer; |
|
291 mUiOffTimer = NULL; |
|
292 } |
|
293 |
|
294 if(mFullScreenToolBar) { |
|
295 mFullScreenToolBar->clearActions(); |
|
296 mFullScreenToolBar->hide(); |
|
297 mFullScreenToolBar = NULL; |
|
298 } |
|
299 |
|
300 if (mTvOutWrapper) { |
|
301 delete mTvOutWrapper; |
|
302 mTvOutWrapper = NULL; |
|
303 } |
|
304 |
|
305 if(mZoomWidget) |
|
306 { |
|
307 mZoomWidget->cleanUp(); |
|
308 mZoomWidget = NULL; |
|
309 } |
|
310 OstTraceFunctionExit0( GLXFULLSCREENVIEW_CLEANUP_EXIT ); |
|
311 } |
|
312 |
|
313 QGraphicsItem * GlxFullScreenView::getAnimationItem(GlxEffect transitionEffect) |
|
314 { |
|
315 if ( transitionEffect == GRID_TO_FULLSCREEN |
|
316 || transitionEffect == FULLSCREEN_TO_DETAIL |
|
317 || transitionEffect == DETAIL_TO_FULLSCREEN ) { |
|
318 return this; |
|
319 } |
|
320 |
|
321 return NULL; |
|
322 } |
|
323 |
|
324 void GlxFullScreenView::setModel( QAbstractItemModel *model ) |
|
325 { |
|
326 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_SETMODEL_ENTRY ); |
|
327 OstTraceExt2( TRACE_NORMAL, GLXFULLSCREENVIEW_SETMODEL, "GlxFullScreenView::setModel; model=%x; mModel=%u", ( TUint )( model ), ( TUint ) mModel ); |
|
328 |
|
329 mModel = model; |
|
330 setModelContext(); |
|
331 setHdmiModel(mModel); |
|
332 mZoomWidget->setModel(mModel); |
|
333 mCoverFlow->setModel(mModel); |
|
334 setImageStripModel(); |
|
335 if(getSubState() == IMAGEVIEWER_S) { |
|
336 setTitle(GLX_IMAGE_VIEWER); |
|
337 } |
|
338 else if(getSubState() == FETCHER_S){ //do not zoom in case of fetcher |
|
339 disconnect(mCoverFlow,SIGNAL( doubleTapEventReceived(QPointF) ), mZoomWidget, SLOT( animateZoomIn(QPointF) ) ); |
|
340 } |
|
341 OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETMODEL_EXIT ); |
|
342 } |
|
343 |
|
344 void GlxFullScreenView::setHdmiModel(QAbstractItemModel* model) |
|
345 { |
|
346 if (mTvOutWrapper) { |
|
347 mTvOutWrapper->setModel(model, screenSize()); |
|
348 mTvOutWrapper->setImagetoHDMI(); // for the first image on screen |
|
349 } |
|
350 } |
|
351 |
|
352 void GlxFullScreenView::setModelContext() |
|
353 { |
|
354 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_SETMODELCONTEXT_ENTRY ); |
|
355 |
|
356 if ( mModel && mWindow ) { |
|
357 if ( mWindow->orientation() == Qt::Horizontal ) { |
|
358 WRITE_TIMESTAMP("set the fullscreen landscape context") |
|
359 mModel->setData(QModelIndex(), (int)GlxContextLsFs, GlxContextRole ); |
|
360 } |
|
361 else { |
|
362 WRITE_TIMESTAMP("set the fullscreen portrait context") |
|
363 mModel->setData(QModelIndex(), (int)GlxContextPtFs, GlxContextRole ); |
|
364 } |
|
365 } |
|
366 |
|
367 OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETMODELCONTEXT_EXIT ); |
|
368 } |
|
369 |
|
370 void GlxFullScreenView::orientationChanged(Qt::Orientation orient) |
|
371 { |
|
372 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ORIENTATIONCHANGED_ENTRY ); |
|
373 Q_UNUSED(orient) |
|
374 |
|
375 // fullscreen thumnail size is depends on orientation of phone so change the model context before changing the layout |
|
376 if ( mUiOff == FALSE ) { |
|
377 mUiOffTimer->start(KUiOffTime); |
|
378 } |
|
379 setModelContext(); |
|
380 loadViewSection(); |
|
381 setLayout(); |
|
382 |
|
383 if ( mZoomWidget->zValue() >= mCoverFlow->zValue() ) { |
|
384 playZoomOrientChangeAnim(); |
|
385 } |
|
386 else { |
|
387 playOrientChangeAnim(); |
|
388 } |
|
389 |
|
390 OstTraceFunctionExit0( GLXFULLSCREENVIEW_ORIENTATIONCHANGED_EXIT ); |
|
391 } |
|
392 |
|
393 void GlxFullScreenView::activateUI() |
|
394 { |
|
395 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ACTIVATEUI_ENTRY ); |
|
396 |
|
397 if ( mUiOff && getSubState() != FETCHER_S ){ |
|
398 if( !mFullScreenToolBar ) { |
|
399 loadFullScreenToolBar(); |
|
400 } |
|
401 mUiOff = FALSE; |
|
402 |
|
403 QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); |
|
404 if ( variant.isValid() && variant.canConvert<int> () ) { |
|
405 mImageStrip->setCurrentIndex ( mModel->index( variant.value<int>(), 0) ); |
|
406 mImageStrip->scrollTo( mModel->index( variant.value<int>(), 0), HbGridView::PositionAtTop ); |
|
407 } |
|
408 |
|
409 setItemVisible( Hb::AllItems, TRUE ); |
|
410 setViewFlags( viewFlags() &~ HbView::ViewTitleBarHidden &~ HbView::ViewStatusBarHidden ); |
|
411 |
|
412 if ( mImageStrip && getSubState() != IMAGEVIEWER_S) { |
|
413 mImageStrip->show(); |
|
414 HbEffect::start(mImageStrip, QString("HbGridView"), QString("TapShow"), this, "effectFinished" ); |
|
415 } |
|
416 else if( getSubState() == IMAGEVIEWER_S){ |
|
417 setTitle(GLX_IMAGE_VIEWER); |
|
418 } |
|
419 mFullScreenToolBar->setOpacity( 1 ); |
|
420 mFullScreenToolBar->show(); |
|
421 } |
|
422 else { |
|
423 hideUi(); |
|
424 } |
|
425 |
|
426 OstTraceFunctionExit0( GLXFULLSCREENVIEW_ACTIVATEUI_EXIT ); |
|
427 } |
|
428 |
|
429 void GlxFullScreenView::hideUi() |
|
430 { |
|
431 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_HIDEUI_ENTRY ); |
|
432 |
|
433 //if option menu is open then no need to hide the status bar and image strip |
|
434 HbMenu *menuWidget = menu(); |
|
435 if ( menuWidget->isVisible() ) { |
|
436 OstTraceFunctionExit0( GLXFULLSCREENVIEW_HIDEUI_EXIT ); |
|
437 return ; |
|
438 } |
|
439 |
|
440 mUiOff = TRUE; |
|
441 if ( getSubState() != FETCHER_S ) { |
|
442 setViewFlags( viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden ); |
|
443 } |
|
444 if ( mImageStrip && ( getSubState() != IMAGEVIEWER_S && getSubState() != FETCHER_S ) ) { |
|
445 HbEffect::start( mImageStrip, QString("HbGridView"), QString("TapHide"), this, "effectFinished" ); |
|
446 } |
|
447 |
|
448 if(mFullScreenToolBar) { |
|
449 mFullScreenToolBar->hide(); |
|
450 } |
|
451 |
|
452 OstTraceFunctionExit0( DUP1_GLXFULLSCREENVIEW_HIDEUI_EXIT ); |
|
453 } |
|
454 |
|
455 void GlxFullScreenView::changeSelectedIndex(const QModelIndex &index) |
|
456 { |
|
457 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_CHANGESELECTEDINDEX_ENTRY ); |
|
458 |
|
459 QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); |
|
460 if ( variant.isValid() && variant.canConvert<int> () && ( index.row() == variant.value<int>() ) ) { |
|
461 OstTraceFunctionExit0( GLXFULLSCREENVIEW_CHANGESELECTEDINDEX_EXIT ); |
|
462 if (mTvOutWrapper){ |
|
463 // for the image changed on deletion |
|
464 mTvOutWrapper->setImagetoHDMI(); |
|
465 } |
|
466 if (mZoomWidget){ |
|
467 // for the image changed on deletion |
|
468 mZoomWidget->indexChanged(); |
|
469 } |
|
470 return; |
|
471 } |
|
472 |
|
473 mModel->setData( index, index.row(), GlxFocusIndexRole ); |
|
474 mModel->setData( index, index.row(), GlxVisualWindowIndex ); |
|
475 mZoomWidget->indexChanged(index.row()); |
|
476 |
|
477 if (mTvOutWrapper){ |
|
478 // for the image changed on swipe |
|
479 mTvOutWrapper->setImagetoHDMI(); |
|
480 } |
|
481 OstTraceFunctionExit0( DUP1_GLXFULLSCREENVIEW_CHANGESELECTEDINDEX_EXIT ); |
|
482 } |
|
483 |
|
484 void GlxFullScreenView::indexChanged(const QModelIndex &index) |
|
485 { |
|
486 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_INDEXCHANGED_ENTRY ); |
|
487 |
|
488 QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); |
|
489 if ( variant.isValid() && variant.canConvert<int> () && ( index.row() == variant.value<int>() ) ) { |
|
490 OstTraceFunctionExit0( GLXFULLSCREENVIEW_INDEXCHANGED_EXIT ); |
|
491 return; |
|
492 } |
|
493 |
|
494 if (mTvOutWrapper){ |
|
495 // for the indexchnaged through filmstrip |
|
496 mTvOutWrapper->setImagetoHDMI(); |
|
497 } |
|
498 //disable the animation for the time being |
|
499 imageSelectionAnimation( index ); |
|
500 |
|
501 mModel->setData( index, index.row(), GlxFocusIndexRole ); |
|
502 mZoomWidget->indexChanged(index.row()); |
|
503 mZoomWidget->setVisible( false ); |
|
504 |
|
505 OstTraceFunctionExit0( DUP1_GLXFULLSCREENVIEW_INDEXCHANGED_EXIT ); |
|
506 } |
|
507 |
|
508 void GlxFullScreenView::scrollingStarted() |
|
509 { |
|
510 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_SCROLLINGSTARTED_ENTRY ); |
|
511 |
|
512 //no need to hide the ui during image strip scrolling |
|
513 if ( mUiOffTimer ) { |
|
514 mUiOffTimer->stop(); |
|
515 } |
|
516 |
|
517 OstTraceFunctionExit0( GLXFULLSCREENVIEW_SCROLLINGSTARTED_EXIT ); |
|
518 } |
|
519 |
|
520 void GlxFullScreenView::scrollingEnded() |
|
521 { |
|
522 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_SCROLLINGENDED_ENTRY ); |
|
523 |
|
524 if ( mUiOffTimer ) { |
|
525 mUiOffTimer->start(KUiOffTime); |
|
526 } |
|
527 setVisvalWindowIndex(); |
|
528 |
|
529 OstTraceFunctionExit0( GLXFULLSCREENVIEW_SCROLLINGENDED_EXIT ); |
|
530 } |
|
531 |
|
532 void GlxFullScreenView::pressed(const QModelIndex &index) |
|
533 { |
|
534 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_PRESSED_ENTRY ); |
|
535 |
|
536 Q_UNUSED(index) |
|
537 TRACER("GlxFullScreenView::pressed() "); |
|
538 if ( mUiOffTimer ) { |
|
539 mUiOffTimer->stop(); |
|
540 } |
|
541 OstTraceFunctionExit0( GLXFULLSCREENVIEW_PRESSED_EXIT ); |
|
542 } |
|
543 |
|
544 void GlxFullScreenView::released(const QModelIndex &index) |
|
545 { |
|
546 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_RELEASED_ENTRY ); |
|
547 |
|
548 Q_UNUSED(index) |
|
549 |
|
550 if ( mUiOffTimer && mImageStrip->isScrolling() == false ) { |
|
551 mUiOffTimer->start(KUiOffTime); |
|
552 } |
|
553 |
|
554 OstTraceFunctionExit0( GLXFULLSCREENVIEW_RELEASED_EXIT ); |
|
555 } |
|
556 |
|
557 void GlxFullScreenView::setVisvalWindowIndex() |
|
558 { |
|
559 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_SETVISVALWINDOWINDEX_ENTRY ); |
|
560 |
|
561 QList< HbAbstractViewItem * > visibleItemList = mImageStrip->visibleItems(); |
|
562 if ( visibleItemList.count() <= 0 ) |
|
563 return ; |
|
564 |
|
565 HbAbstractViewItem *item = visibleItemList.at(0); |
|
566 if ( item == NULL ) |
|
567 return ; |
|
568 |
|
569 if ( item->modelIndex().row() < 0 || item->modelIndex().row() >= mModel->rowCount() ) |
|
570 return ; |
|
571 |
|
572 mModel->setData( item->modelIndex (), item->modelIndex().row(), GlxVisualWindowIndex); |
|
573 |
|
574 OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETVISVALWINDOWINDEX_EXIT ); |
|
575 } |
|
576 |
|
577 void GlxFullScreenView::coverFlowEventHandle( GlxCoverFlowEvent e ) |
|
578 { |
|
579 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_COVERFLOWEVENTHANDLE_ENTRY ); |
|
580 |
|
581 switch( e ){ |
|
582 case TAP_EVENT : |
|
583 activateUI(); |
|
584 break ; |
|
585 |
|
586 //hide the ui component without animation |
|
587 case PANNING_START_EVENT : |
|
588 case ZOOM_START_EVENT : { |
|
589 HbEffect::EffectStatus e; |
|
590 mUiOff = TRUE; |
|
591 if( mFullScreenToolBar ) { |
|
592 /** |
|
593 * Browsing has higer priority then playing animation of hiding tool bar |
|
594 * so it is taking time to hide the toolbar during browsing of images |
|
595 * so set the opacity value to 0 to immediate hide the tool bar |
|
596 */ |
|
597 mFullScreenToolBar->setOpacity( 0 ); |
|
598 mFullScreenToolBar->hide(); |
|
599 } |
|
600 setViewFlags( viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden ); |
|
601 effectFinished( e ); |
|
602 } |
|
603 break; |
|
604 |
|
605 case EMPTY_ROW_EVENT : |
|
606 emit actionTriggered( EGlxCmdEmptyData ); |
|
607 break ; |
|
608 |
|
609 default : |
|
610 break ; |
|
611 } |
|
612 |
|
613 OstTraceFunctionExit0( GLXFULLSCREENVIEW_COVERFLOWEVENTHANDLE_EXIT ); |
|
614 } |
|
615 |
|
616 void GlxFullScreenView::effectFinished( const HbEffect::EffectStatus ) |
|
617 { |
|
618 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_EFFECTFINISHED_ENTRY ); |
|
619 |
|
620 if ( mUiOffTimer == NULL ){ //view is already deactivate so no need to do any thing |
|
621 return ; |
|
622 } |
|
623 |
|
624 if ( mUiOff ) { |
|
625 mUiOffTimer->stop(); |
|
626 mCoverFlow->setUiOn(FALSE); |
|
627 mImageStrip->hide(); |
|
628 setItemVisible( Hb::AllItems, FALSE ); |
|
629 } |
|
630 else { |
|
631 mUiOffTimer->start(KUiOffTime); |
|
632 mCoverFlow->setUiOn(TRUE); |
|
633 } |
|
634 |
|
635 OstTraceFunctionExit0( GLXFULLSCREENVIEW_EFFECTFINISHED_EXIT ); |
|
636 } |
|
637 |
|
638 void GlxFullScreenView::imageSelectionEffectFinished( const HbEffect::EffectStatus ) |
|
639 { |
|
640 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_IMAGESELECTIONEFFECTFINISHED_ENTRY ); |
|
641 |
|
642 for ( int i = 0; i < NBR_ANIM_ITEM; i++ ) { |
|
643 mIconItems[ i ]->resetTransform(); |
|
644 mIconItems[ i ]->setVisible( false ); |
|
645 } |
|
646 mBackGroundItem->setVisible( false ); |
|
647 |
|
648 QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); |
|
649 if ( variant.isValid() && variant.canConvert<int> () ) { |
|
650 mCoverFlow->indexChanged( variant.value<int>() ) ; |
|
651 } |
|
652 mCoverFlow->setVisible( true ); |
|
653 mZoomWidget->setVisible( true ); |
|
654 |
|
655 OstTraceFunctionExit0( GLXFULLSCREENVIEW_IMAGESELECTIONEFFECTFINISHED_EXIT ); |
|
656 } |
|
657 |
|
658 void GlxFullScreenView::orientChangeAnimFinished( const HbEffect::EffectStatus status ) |
|
659 { |
|
660 qDebug( "GlxFullScreenView::LsOrientChangeAnimFinished reason %d ", status.reason ); |
|
661 mIconItems[ 0 ]->resetTransform(); |
|
662 mIconItems[ 0 ]->setVisible( false ); |
|
663 mBackGroundItem->setVisible( false ); |
|
664 mCoverFlow->setVisible( true ); |
|
665 mZoomWidget->setVisible( true ); |
|
666 } |
|
667 |
|
668 void GlxFullScreenView::zoomOrientChangeAnimFinished( const HbEffect::EffectStatus status ) |
|
669 { |
|
670 mZoomWidget->resetTransform(); |
|
671 } |
|
672 |
|
673 void GlxFullScreenView::setLayout() |
|
674 { |
|
675 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_SETLAYOUT_ENTRY ); |
|
676 |
|
677 QSize sz = screenSize(); |
|
678 |
|
679 mCoverFlow->setItemSize(sz); |
|
680 mZoomWidget->setWindowSize(sz); |
|
681 |
|
682 OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETLAYOUT_EXIT ); |
|
683 } |
|
684 |
|
685 void GlxFullScreenView::addConnection() |
|
686 { |
|
687 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ADDCONNECTION_ENTRY ); |
|
688 |
|
689 if ( mCoverFlow ) { |
|
690 connect( mCoverFlow, SIGNAL( coverFlowEvent( GlxCoverFlowEvent ) ), this, SLOT( coverFlowEventHandle( GlxCoverFlowEvent ) ) ); |
|
691 connect( mCoverFlow, SIGNAL( changeSelectedIndex( const QModelIndex & ) ), this, SLOT( changeSelectedIndex( const QModelIndex & ) ) ); |
|
692 } |
|
693 |
|
694 if ( mImageStrip ) { |
|
695 connect( mImageStrip, SIGNAL( activated(const QModelIndex &) ), this, SLOT( indexChanged(const QModelIndex &) ) ); |
|
696 connect( mImageStrip, SIGNAL( scrollingStarted()), this, SLOT( scrollingStarted() ) ); |
|
697 connect( mImageStrip, SIGNAL( scrollingEnded()), this, SLOT( scrollingEnded() ) ); |
|
698 connect( mImageStrip, SIGNAL( pressed( const QModelIndex & ) ), this, SLOT( pressed( const QModelIndex & ) ) ); |
|
699 connect( mImageStrip, SIGNAL( released( const QModelIndex & ) ), this, SLOT( released( const QModelIndex & ) ) ); |
|
700 } |
|
701 |
|
702 if ( mUiOffTimer ) { |
|
703 connect( mUiOffTimer, SIGNAL( timeout() ), this, SLOT( hideUi() ) ); |
|
704 } |
|
705 |
|
706 if( mCoverFlow && mZoomWidget ) { |
|
707 connect( mZoomWidget, SIGNAL( pinchGestureReceived( int ) ), mCoverFlow, SLOT( zoomStarted( int ) ) ); |
|
708 connect( mZoomWidget, SIGNAL( zoomWidgetMovedBackground( int ) ), mCoverFlow, SLOT( zoomFinished( int ) ) ); |
|
709 connect( mCoverFlow, SIGNAL( doubleTapEventReceived( QPointF ) ), mZoomWidget, SLOT( animateZoomIn( QPointF ) ) ); |
|
710 } |
|
711 |
|
712 connect( mWindow, SIGNAL( orientationChanged( Qt::Orientation ) ), this, SLOT( orientationChanged( Qt::Orientation ) ) ); |
|
713 |
|
714 OstTraceFunctionExit0( GLXFULLSCREENVIEW_ADDCONNECTION_EXIT ); |
|
715 } |
|
716 |
|
717 void GlxFullScreenView::removeConnection() |
|
718 { |
|
719 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_REMOVECONNECTION_ENTRY ); |
|
720 |
|
721 if ( mCoverFlow ) { |
|
722 GLX_LOG_INFO("GlxFullScreenView::removeConnection() mCoverFlow " ); |
|
723 disconnect( mCoverFlow, SIGNAL( coverFlowEvent( GlxCoverFlowEvent ) ), this, SLOT( coverFlowEventHandle( GlxCoverFlowEvent ) ) ); |
|
724 disconnect( mCoverFlow, SIGNAL(changeSelectedIndex(const QModelIndex &)), this, SLOT( changeSelectedIndex( const QModelIndex & ))); |
|
725 } |
|
726 |
|
727 //For Image Strip |
|
728 if ( mImageStrip ) { |
|
729 GLX_LOG_INFO("GlxFullScreenView::removeConnection() mImageStrip " ); |
|
730 disconnect(mImageStrip, SIGNAL( activated(const QModelIndex &) ), this, SLOT( indexChanged(const QModelIndex &) )); |
|
731 disconnect(mImageStrip, SIGNAL( scrollingStarted()), this, SLOT( scrollingStarted())); |
|
732 disconnect(mImageStrip, SIGNAL( scrollingEnded()), this, SLOT( scrollingEnded())); |
|
733 disconnect(mImageStrip, SIGNAL( pressed(const QModelIndex &) ), this, SLOT( pressed(const QModelIndex &) )); |
|
734 disconnect(mImageStrip, SIGNAL( released(const QModelIndex &) ), this, SLOT( released(const QModelIndex &) )); |
|
735 } |
|
736 |
|
737 if ( mUiOffTimer ) { |
|
738 GLX_LOG_INFO("GlxFullScreenView::removeConnection() mUiOffTimer " ); |
|
739 disconnect(mUiOffTimer, SIGNAL(timeout()), this, SLOT(hideUi())); |
|
740 } |
|
741 |
|
742 if( mCoverFlow && mZoomWidget ) { |
|
743 disconnect(mZoomWidget,SIGNAL( pinchGestureReceived(int) ), mCoverFlow, SLOT( zoomStarted(int) ) ); |
|
744 disconnect(mZoomWidget,SIGNAL( zoomWidgetMovedBackground(int) ), mCoverFlow, SLOT( zoomFinished(int) ) ); |
|
745 } |
|
746 |
|
747 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); |
|
748 |
|
749 OstTraceFunctionExit0( GLXFULLSCREENVIEW_REMOVECONNECTION_EXIT ); |
|
750 } |
|
751 |
|
752 void GlxFullScreenView::setImageStripModel() |
|
753 { |
|
754 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_SETIMAGESTRIPMODEL_ENTRY ); |
|
755 |
|
756 mImageStrip->setModel( mModel ); |
|
757 QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); |
|
758 if ( variant.isValid() && variant.canConvert<int> () ) { |
|
759 mImageStrip->setCurrentIndex ( mModel->index( variant.value<int>(), 0) ); |
|
760 } |
|
761 |
|
762 OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETIMAGESTRIPMODEL_EXIT ); |
|
763 } |
|
764 |
|
765 GlxFullScreenView::~GlxFullScreenView() |
|
766 { |
|
767 OstTraceFunctionEntry0( DUP1_GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_ENTRY ); |
|
768 |
|
769 cleanUp(); |
|
770 for ( int i = 0; i < NBR_ANIM_ITEM; i++ ) { |
|
771 delete mIconItems[ i ] ; |
|
772 } |
|
773 delete mBackGroundItem; |
|
774 delete mImageStrip; |
|
775 delete mFullScreenToolBar; |
|
776 delete mCoverFlow; |
|
777 delete mZoomWidget; |
|
778 |
|
779 if(mDocLoader != NULL) { |
|
780 mDocLoader->reset(); |
|
781 delete mDocLoader; |
|
782 } |
|
783 |
|
784 HbEffect::remove( QString("HbGridView"), QString(":/data/transitionup.fxml"), QString( "TapShow" )); |
|
785 HbEffect::remove( QString("HbGridView"), QString(":/data/transitiondown.fxml"), QString( "TapHide" )); |
|
786 HbEffect::remove( QString( "HbGridViewItem" ), QString( ":/data/zoomin.fxml" ), QString( "SelectHide" ) ); |
|
787 HbEffect::remove( QString( "HbGridViewItem" ), QString( ":/data/zoomout.fxml" ), QString( "SelectShow" ) ); |
|
788 HbEffect::remove( QString( "HbIconItem" ), QString( ":/data/rotatefslandscape.fxml" ), QString( "RotateFSLS" ) ); |
|
789 HbEffect::remove( QString( "HbIconItem" ), QString( ":/data/rotatefsprotrait.fxml" ), QString( "RotateFSPT" ) ); |
|
790 |
|
791 OstTraceFunctionExit0( DUP1_GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_EXIT ); |
|
792 } |
|
793 |
|
794 void GlxFullScreenView::initAnimationItem() |
|
795 { |
|
796 if( mIconItems[0] == NULL ) { |
|
797 mBackGroundItem = new HbIconItem( mImageStrip->parentItem() ); |
|
798 mBackGroundItem->setBrush( QBrush( Qt::black ) ); |
|
799 mBackGroundItem->setZValue( mImageStrip->zValue() - 3 ); |
|
800 mBackGroundItem->setPos( 0, 0 ); |
|
801 for( int i = 0; i < NBR_ANIM_ITEM; i++ ) { |
|
802 mIconItems[ i ] = new HbIconItem( mImageStrip->parentItem() ); |
|
803 mIconItems[ i ]->setZValue( mImageStrip->zValue() - 2 ); |
|
804 mIconItems[ i ]->setPos( 0, 0 ); |
|
805 mIconItems[ i ]->setAlignment( Qt::AlignCenter ); |
|
806 } |
|
807 } |
|
808 } |
|
809 |
|
810 void GlxFullScreenView::imageSelectionAnimation(const QModelIndex &index) |
|
811 { |
|
812 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_IMAGESELECTIONANIMATION_ENTRY ); |
|
813 |
|
814 initAnimationItem(); |
|
815 for ( int i = 0; i < NBR_ANIM_ITEM; i++ ) { |
|
816 mIconItems[ i ]->setVisible( true ); |
|
817 mIconItems[ i ]->setSize( screenSize() ); |
|
818 } |
|
819 mBackGroundItem->setVisible( true ); |
|
820 mBackGroundItem->setSize( screenSize() ); |
|
821 |
|
822 mIconItems[ 0 ]->setIcon( mCoverFlow->getIcon( mCoverFlow->getFocusIndex() ) ); |
|
823 mIconItems[ 1 ]->setIcon( mCoverFlow->getIcon( index.row() ) ); |
|
824 mCoverFlow->setVisible( false ); |
|
825 mZoomWidget->setVisible( false ); |
|
826 |
|
827 HbEffect::start( mIconItems[ 0 ], QString( "HbGridViewItem" ), QString( "SelectHide" ) ); |
|
828 HbEffect::start( mIconItems[ 1 ], QString( "HbGridViewItem" ), QString( "SelectShow" ), this, "imageSelectionEffectFinished" ); |
|
829 |
|
830 OstTraceFunctionExit0( GLXFULLSCREENVIEW_IMAGESELECTIONANIMATION_EXIT ); |
|
831 } |
|
832 |
|
833 void GlxFullScreenView::cancelSelectionAnimation() |
|
834 { |
|
835 if ( mIconItems[0] && HbEffect::effectRunning( mIconItems[1], QString( "SelectShow" ) ) ) { |
|
836 HbEffect::cancel( mIconItems[0], QString( "SelectHide" ), false, false, true ); |
|
837 HbEffect::cancel( mIconItems[1], QString( "SelectShow" ), false, true, true ); |
|
838 } |
|
839 } |
|
840 |
|
841 void GlxFullScreenView::playOrientChangeAnim() |
|
842 { |
|
843 qDebug("GlxFullScreenView::playOrientChangeAnim()"); |
|
844 initAnimationItem(); |
|
845 mIconItems[ 0 ]->setOpacity( 1 ); |
|
846 mIconItems[ 0 ]->setSize( screenSize() ); |
|
847 mIconItems[ 0 ]->setVisible( true ); |
|
848 mIconItems[ 0 ]->setIcon( mCoverFlow->getIcon( mCoverFlow->getFocusIndex() ) ); |
|
849 |
|
850 mBackGroundItem->setVisible( true ); |
|
851 mBackGroundItem->setSize( screenSize() ); |
|
852 |
|
853 mCoverFlow->setVisible( false ); |
|
854 mZoomWidget->setVisible( false ); |
|
855 if ( mWindow->orientation() == Qt::Horizontal ) { |
|
856 HbEffect::start( mIconItems[0], QString( "HbIconItem" ), QString( "RotateFSLS" ), this, "orientChangeAnimFinished" ); |
|
857 } |
|
858 else { |
|
859 HbEffect::start( mIconItems[0], QString( "HbIconItem" ), QString( "RotateFSPT" ), this, "orientChangeAnimFinished" ); |
|
860 } |
|
861 } |
|
862 |
|
863 void GlxFullScreenView::playZoomOrientChangeAnim() |
|
864 { |
|
865 if ( mWindow->orientation() == Qt::Horizontal ) { |
|
866 HbEffect::start( mZoomWidget, QString( "HbIconItem" ), QString( "RotateFSLS" ), this, "zoomOrientChangeAnimFinished" ); |
|
867 } |
|
868 else { |
|
869 HbEffect::start( mZoomWidget, QString( "HbIconItem" ), QString( "RotateFSPT" ), this, "zoomOrientChangeAnimFinished" ); |
|
870 } |
|
871 } |
|
872 |
|
873 void GlxFullScreenView::handleToolBarAction() |
|
874 { |
|
875 OstTraceFunctionEntry0( GLXFULLSCREENVIEW_HANDLETOOLBARACTION_ENTRY ); |
|
876 |
|
877 HbAction *action = qobject_cast<HbAction*>(sender()); |
|
878 qint32 commandId = action->data().toInt(); |
|
879 emit actionTriggered( commandId ); |
|
880 |
|
881 OstTraceFunctionExit0( GLXFULLSCREENVIEW_HANDLETOOLBARACTION_EXIT ); |
|
882 } |
|
883 |
|
884 int GlxFullScreenView::getSubState() |
|
885 { |
|
886 int substate = NO_FULLSCREEN_S; |
|
887 |
|
888 if ( mModel ) { |
|
889 QVariant variant = mModel->data( mModel->index(0,0), GlxSubStateRole ); |
|
890 if ( variant.isValid() && variant.canConvert<int> () ) { |
|
891 substate = variant.value<int>(); |
|
892 } |
|
893 } |
|
894 return substate; |
|
895 } |
|
896 |
|
897 bool GlxFullScreenView::eventFilter(QObject *obj, QEvent *ev) |
|
898 { |
|
899 GLX_LOG_INFO1("GlxFullScreenView::event() %d event type", ev->type()); |
|
900 if ( ev->type() == QEvent::ApplicationActivate && mTvOutWrapper) { |
|
901 GLX_LOG_INFO("GlxFullScreenView::event() shift to native - CGlxHdmi"); |
|
902 mTvOutWrapper->setToNativeMode(); |
|
903 } |
|
904 if (ev->type() == QEvent::ApplicationDeactivate) |
|
905 { |
|
906 if(mZoomWidget) { |
|
907 mZoomWidget->forceZoomToBackground(); |
|
908 } |
|
909 if (mTvOutWrapper) { |
|
910 GLX_LOG_INFO("GlxFullScreenView::event() shift to Clone - CGlxHdmi"); |
|
911 mTvOutWrapper->setToCloningMode(); |
|
912 } |
|
913 } |
|
914 return HbView::eventFilter(obj,ev); |
|
915 } |
|
916 |