diff -r f291796e213d -r fb37077c270f ui/viewmanagement/statehandler/src/glxslideshowstate.cpp --- a/ui/viewmanagement/statehandler/src/glxslideshowstate.cpp Tue Jul 06 14:16:16 2010 +0300 +++ b/ui/viewmanagement/statehandler/src/glxslideshowstate.cpp Wed Aug 18 09:48:53 2010 +0300 @@ -15,37 +15,53 @@ * */ -#include -#include -#include #include +#include "glxslideshowstate.h" +#include "glxstatemanager.h" +#include "glxcommandhandlers.hrh" +#include "glxorientationsensorfilter.h" + GlxSlideShowState::GlxSlideShowState(GlxStateManager *stateManager, GlxState *preState) : GlxState(GLX_SLIDESHOWVIEW_ID, preState) { mStateManager = stateManager; + mOrientSensorFilter = NULL; + //mOrientSensorFilter = new GlxOrientationSensorFilter(); mState = NO_SLIDESHOW_S; } void GlxSlideShowState::eventHandler( qint32 &id ) { - qDebug("GlxSlideShowState::GlxSlideShowState() action id = %d", id); + qDebug("GlxSlideShowState::GlxSlideShowState() action id = %d", id); + + /*switch ( id ) { + case EGlxCmdBack : + if ( mOrientSensorFilter->orientation() == QOrientationReading::TopUp ) { + id = EGlxCmdPlayBackAnim ; + } + break; + + default : + break ; + }*/ if ( mState == SLIDESHOW_ALBUM_ITEM_S ) { albumItemEventHandler( id ); } } -void GlxSlideShowState::albumItemEventHandler( qint32 &id ) +void GlxSlideShowState::albumItemEventHandler( qint32 &commandId ) { - switch ( id ) { + switch ( commandId ) { /* in the case of slide show play through list view item specfice menu option, a new model was * created so first remove the current model and then go back to pervious state */ + case EGlxCmdSlideShowBack : case EGlxCmdBack : case EGlxCmdEmptyData : //memory card was removed ( no data ) mStateManager->removeCurrentModel(); mStateManager->previousState(); - id = EGlxCmdHandled; + commandId = EGlxCmdHandled; break; default : @@ -53,3 +69,8 @@ } } +GlxSlideShowState::~GlxSlideShowState() +{ + delete mOrientSensorFilter; +} +