ui/viewmanagement/statehandler/inc/glxgridstate.h
changeset 71 27f2d7aec52a
parent 24 99ad1390cd33
equal deleted inserted replaced
69:45459746d5e8 71:27f2d7aec52a
    25 class GlxStateManager;
    25 class GlxStateManager;
    26 
    26 
    27 class GlxGridState : public GlxState
    27 class GlxGridState : public GlxState
    28 {
    28 {
    29 public :
    29 public :
    30 	GlxGridState(GlxStateManager *stateManager, GlxState *preState = NULL);
    30     /**
       
    31      * Constructor 
       
    32      * @param pointor of state manager
       
    33      * @param - previous state
       
    34      */
       
    35 	GlxGridState( GlxStateManager *stateManager, GlxState *preState = NULL );
       
    36 	
       
    37     /**
       
    38      * state() - This funtion return the internal state of a state
       
    39      * @return - internal state
       
    40      */	
    31 	int state() const { return (int) mState; }
    41 	int state() const { return (int) mState; }
    32 	void setState(int internalState) { mState = (GridState) internalState; }
    42 	
    33 	void eventHandler(qint32 &id);
    43     /** 
    34 	void setTranstionParameter(NavigationDir dir, GlxEffect &effect, GlxViewEffect &viewEffect);
    44      * setState() - This funtion use for set the internal state of a state
       
    45      * @param - internal state of the state
       
    46      */	
       
    47 	void setState( int internalState ) { mState = (GridState) internalState; }
       
    48 	
       
    49     /**
       
    50      * eventHandler() - It is event handler of the grid state
       
    51      * @param - command or event id
       
    52      */	
       
    53 	void eventHandler( qint32 &id );
       
    54 	
       
    55     /**
       
    56      * setTranstionParameter() - This function set the view transtion effect parameter.
       
    57      * These values is use to run the animation during view transition.
       
    58      * In the case of forward direction it should call with the next state and in the case of back ward direction
       
    59      * it should call with the current state
       
    60      * @param View transtion id
       
    61      * @param to play the animation on which views
       
    62      */
       
    63      void setTranstionParameter( NavigationDir dir, GlxEffect &effect, GlxViewEffect &viewEffect );
       
    64 
       
    65     /**
       
    66      * commandId() - it will return the current runing command id
       
    67      * @reutn - command id
       
    68      */
       
    69      qint32 commandId( ) { return mCommandId; }
    35 	
    70 	
    36 signals :    
    71 signals :    
    37 
    72 
    38 public slots:
    73 public slots:
    39 
    74 
    40 protected:
    75 protected:
    41 	
    76 	
    42 private slots:
    77 private slots:
    43 
    78 
    44 private:
    79 private:
       
    80     /**
       
    81      * defaultEventHandler() - It is a common event handler used for all the internal states.
       
    82      * @param - command or event id
       
    83      */
    45 	void defaultEventHandler ( qint32 &id );
    84 	void defaultEventHandler ( qint32 &id );
       
    85 
       
    86     /**
       
    87      * allItemEventHandler() - It is a event handler used for All and fetcher internal states.
       
    88      * @param - command or event id
       
    89      */
    46 	void allItemEventHandler ( qint32 &id );
    90 	void allItemEventHandler ( qint32 &id );
       
    91 
       
    92     /**
       
    93      * albumItemEventHandler() - It is a event handler used for album and fetcher album interanl states.
       
    94      * @param - command or event id
       
    95      */
    47 	void albumItemEventHandler ( qint32 &id );
    96 	void albumItemEventHandler ( qint32 &id );
    48 
    97 
    49 private:
    98 private :
    50 	//grid internal state
    99 	GridState mState; 	            // grid internal state
    51 	GridState mState; 	
   100 	GlxStateManager *mStateManager; // state manager
    52 	GlxStateManager *mStateManager;
   101 	bool mIsMarkingMode;            // marking mode status
    53 	bool mIsMarkingMode;
   102 	qint32 mCommandId;              //commandID, save the command before entering into the marking mode for next user interaction
    54 	qint32 mCommandId;  //commandID, save the command before entering into the marking mode for next user interaction
       
    55 };
   103 };
    56 
   104 
    57 
   105 
    58 #endif /* GLXGRIDSTATE_H_ */
   106 #endif /* GLXGRIDSTATE_H_ */