--- a/ui/viewmanagement/statehandler/src/glxslideshowstate.cpp Fri Jul 23 20:41:04 2010 +0530
+++ b/ui/viewmanagement/statehandler/src/glxslideshowstate.cpp Fri Aug 06 20:44:25 2010 +0530
@@ -15,37 +15,53 @@
*
*/
-#include <glxslideshowstate.h>
-#include <glxstatemanager.h>
-#include <glxcommandhandlers.hrh>
#include <QDebug>
+#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;
+}
+