diff -r 2c833fc9e98f -r 1ee2af37811f ui/views/fullscreenview/src/glxcoverflow.cpp --- a/ui/views/fullscreenview/src/glxcoverflow.cpp Fri May 14 15:52:22 2010 +0300 +++ b/ui/views/fullscreenview/src/glxcoverflow.cpp Thu May 27 12:51:42 2010 +0300 @@ -42,7 +42,9 @@ mItemSize (QSize(0,0)), mModel ( NULL), mMoveDir(NO_MOVE), - mSpeed ( GLX_COVERFLOW_SPEED ) + mSpeed ( GLX_COVERFLOW_SPEED ), + mZoomOn(false), + mMultitouchFilter(NULL) { //TO:DO through exception qDebug("GlxCoverFlow::GlxCoverFlow"); @@ -52,11 +54,17 @@ connect( this, SIGNAL( autoRightMoveSignal() ), this, SLOT( autoRightMove() ), Qt::QueuedConnection ); } +void GlxCoverFlow::setMultitouchFilter(QGraphicsItem* mtFilter) +{ + mMultitouchFilter = mtFilter; +} void GlxCoverFlow::setCoverFlow() { qDebug("GlxCoverFlow::setCoverFlow"); for ( qint8 i = 0; i < NBR_ICON_ITEM ; i++ ) { mIconItem[i] = new HbIconItem(this); + mIconItem[i]->grabGesture(Qt::PinchGesture, Qt::ReceivePartialGestures); + mIconItem[i]->installSceneEventFilter(mMultitouchFilter); mIconItem[i]->setBrush(QBrush(Qt::black)); mIconItem[i]->setSize(QSize(0,0)); } @@ -286,7 +294,9 @@ mSelItemIndex = ( ++mSelItemIndex ) % NBR_ICON_ITEM; selIndex = ( mSelItemIndex + 2 ) % NBR_ICON_ITEM; updateIconItem( mSelIndex + 2, selIndex, width * 2 ) ; + if(!mZoomOn) { emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ; + } } mMoveDir = NO_MOVE; mBounceBackDeltaX = 10; @@ -338,7 +348,9 @@ mSelItemIndex = ( mSelItemIndex == 0 ) ? NBR_ICON_ITEM -1 : --mSelItemIndex; selIndex = ( mSelItemIndex + 3 ) % NBR_ICON_ITEM; updateIconItem( mSelIndex - 2, selIndex, - width * 2 ) ; + if(!mZoomOn) { emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ; + } } mMoveDir = NO_MOVE; mBounceBackDeltaX = 10; @@ -542,3 +554,13 @@ } return substate; } +void GlxCoverFlow::zoomStarted(int index) +{ + mZoomOn = true; +} +void GlxCoverFlow::zoomFinished(int index) +{ + mZoomOn = false; + indexChanged(index); + +}