13 * |
13 * |
14 * Description: ?Description |
14 * Description: ?Description |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <glxslideshowstate.h> |
|
19 #include <glxstatemanager.h> |
|
20 #include <glxcommandhandlers.hrh> |
|
21 #include <QDebug> |
18 #include <QDebug> |
|
19 |
|
20 #include "glxslideshowstate.h" |
|
21 #include "glxstatemanager.h" |
|
22 #include "glxcommandhandlers.hrh" |
|
23 #include "glxorientationsensorfilter.h" |
22 |
24 |
23 GlxSlideShowState::GlxSlideShowState(GlxStateManager *stateManager, GlxState *preState) : GlxState(GLX_SLIDESHOWVIEW_ID, preState) |
25 GlxSlideShowState::GlxSlideShowState(GlxStateManager *stateManager, GlxState *preState) : GlxState(GLX_SLIDESHOWVIEW_ID, preState) |
24 { |
26 { |
25 mStateManager = stateManager; |
27 mStateManager = stateManager; |
|
28 mOrientSensorFilter = NULL; |
|
29 //mOrientSensorFilter = new GlxOrientationSensorFilter(); |
26 mState = NO_SLIDESHOW_S; |
30 mState = NO_SLIDESHOW_S; |
27 } |
31 } |
28 |
32 |
29 void GlxSlideShowState::eventHandler( qint32 &id ) |
33 void GlxSlideShowState::eventHandler( qint32 &id ) |
30 { |
34 { |
31 qDebug("GlxSlideShowState::GlxSlideShowState() action id = %d", id); |
35 qDebug("GlxSlideShowState::GlxSlideShowState() action id = %d", id); |
|
36 |
|
37 /*switch ( id ) { |
|
38 case EGlxCmdBack : |
|
39 if ( mOrientSensorFilter->orientation() == QOrientationReading::TopUp ) { |
|
40 id = EGlxCmdPlayBackAnim ; |
|
41 } |
|
42 break; |
|
43 |
|
44 default : |
|
45 break ; |
|
46 }*/ |
32 |
47 |
33 if ( mState == SLIDESHOW_ALBUM_ITEM_S ) { |
48 if ( mState == SLIDESHOW_ALBUM_ITEM_S ) { |
34 albumItemEventHandler( id ); |
49 albumItemEventHandler( id ); |
35 } |
50 } |
36 } |
51 } |
37 |
52 |
38 void GlxSlideShowState::albumItemEventHandler( qint32 &id ) |
53 void GlxSlideShowState::albumItemEventHandler( qint32 &commandId ) |
39 { |
54 { |
40 switch ( id ) { |
55 switch ( commandId ) { |
41 /* in the case of slide show play through list view item specfice menu option, a new model was |
56 /* in the case of slide show play through list view item specfice menu option, a new model was |
42 * created so first remove the current model and then go back to pervious state |
57 * created so first remove the current model and then go back to pervious state |
43 */ |
58 */ |
|
59 case EGlxCmdSlideShowBack : |
44 case EGlxCmdBack : |
60 case EGlxCmdBack : |
45 case EGlxCmdEmptyData : //memory card was removed ( no data ) |
61 case EGlxCmdEmptyData : //memory card was removed ( no data ) |
46 mStateManager->removeCurrentModel(); |
62 mStateManager->removeCurrentModel(); |
47 mStateManager->previousState(); |
63 mStateManager->previousState(); |
48 id = EGlxCmdHandled; |
64 commandId = EGlxCmdHandled; |
49 break; |
65 break; |
50 |
66 |
51 default : |
67 default : |
52 break; |
68 break; |
53 } |
69 } |
54 } |
70 } |
55 |
71 |
|
72 GlxSlideShowState::~GlxSlideShowState() |
|
73 { |
|
74 delete mOrientSensorFilter; |
|
75 } |
|
76 |