ui/viewmanagement/statehandler/inc/glxstatemanager.h
changeset 44 aa2fa096cbfb
parent 43 72396548277c
child 45 863223ea6961
equal deleted inserted replaced
43:72396548277c 44:aa2fa096cbfb
    43 {
    43 {
    44     Q_OBJECT
    44     Q_OBJECT
    45 	friend class TestGlxStateManager;
    45 	friend class TestGlxStateManager;
    46 	
    46 	
    47 public :
    47 public :
       
    48     /*
       
    49      * Constructor
       
    50      */
    48     GlxStateManager();
    51     GlxStateManager();
       
    52     
       
    53     /*
       
    54      * Destructor
       
    55      */
    49     virtual ~GlxStateManager();
    56     virtual ~GlxStateManager();
       
    57     
       
    58     /*
       
    59      * Fuction to launch the application from some external world
       
    60      */
    50     void launchFromExternal();
    61     void launchFromExternal();
       
    62     
       
    63     /*
       
    64      * Clean the all externel data
       
    65      */
    51     void cleanupExternal();
    66     void cleanupExternal();
    52     
    67     
    53     //internal exposed function
    68     /*
       
    69      *  Move the views to the multiple item selection state
       
    70      */
    54     void enterMarkingMode();
    71     void enterMarkingMode();
       
    72     
       
    73     /*
       
    74      * Exit from the multiselection state
       
    75      */
    55     void exitMarkingMode();
    76     void exitMarkingMode();
       
    77     
       
    78     /*
       
    79      * Execute the commant on multiple selected item
       
    80      */
    56     bool executeCommand(qint32 commandId);
    81     bool executeCommand(qint32 commandId);
    57 
    82     
    58 signals :    
    83     /*
       
    84      *  when application goes into background or come back to foreground
       
    85      *  set and reset the background thumbnail generation property
       
    86      */
       
    87     bool eventFilter(QObject *obj, QEvent *ev);    
       
    88 
       
    89 signals :
       
    90     /*
       
    91      * Send the user activities ( command ) to the external world
       
    92      */
    59     void externalCommand(int cmdId);
    93     void externalCommand(int cmdId);
       
    94     
       
    95     /*
       
    96      * TO send the signal to initialise the rest of items
       
    97      * which is not created in the launch sequence
       
    98      */
    60     void setupItemsSignal();
    99     void setupItemsSignal();
    61     
   100     
    62 public slots:
   101 public slots:
       
   102     /*
       
   103      * To launch the application
       
   104      */
    63     void launchApplication();
   105     void launchApplication();
       
   106     
       
   107     /*
       
   108      * To handle the user action, view switching etc
       
   109      */
    64     void actionTriggered(qint32 id);
   110     void actionTriggered(qint32 id);
       
   111     
       
   112     /*
       
   113      * To create the items which is not created in the aluch sequence
       
   114      */
    65     void setupItems();
   115     void setupItems();
       
   116     
       
   117     /*
       
   118      * call back function to monitor the change in thumbnail manager
       
   119      */
    66     void updateTNProgress( int count);
   120     void updateTNProgress( int count);
    67 
   121 
    68 public :
   122 public :
    69 /*
   123     /*
    70  * It will create a new state and replace the current state with new state in the stack.
   124      * It will create a new state and replace the current state with new state in the stack.
    71  * It will use in the case of state switching.
   125      * It will use in the case of state switching.
    72  * use -1 if state does not have internal state
   126      * use -1 if state does not have internal state
    73  */    
   127      */    
    74     void changeState(qint32 newStateId, int internalState );
   128     void changeState(qint32 newStateId, int internalState );
    75 /*
   129     
    76  * Go back to previous state 
   130     /*
    77  */    
   131      * Go back to previous state 
       
   132      */    
    78     void previousState();
   133     void previousState();
    79 
   134 
    80 /*
   135     /*
    81  * Go back to a state in hierarchy and pop all the state upto that level.
   136      * Go back to a state in hierarchy and pop all the state upto that level.
    82  * if state is not found, then all the state from the hierachy is removed and create a new state on level 0
   137      * if state is not found, then all the state from the hierachy is removed and create a new state on level 0
    83  * This function will be use in the case when more then one back is required in single event.
   138      * This function will be use in the case when more then one back is required in single event.
    84  */
   139      */
    85     void goBack(qint32 stateId, int internalState);
   140     void goBack(qint32 stateId, int internalState);
    86        
   141        
    87 /*
   142     /*
    88  * Create a new state and current state should be pushed into stack.
   143      * Create a new state and current state should be pushed into stack.
    89  * use -1 if state does not have internal state
   144      * use -1 if state does not have internal state
    90  */  
   145      */  
    91     void nextState(qint32 newStateId, int internalState );
   146     void nextState(qint32 newStateId, int internalState );
    92 
   147 
    93 /*
   148     /*
    94  * It will delete the current model
   149      * It will delete the current model
    95  */      
   150      */      
    96     void removeCurrentModel();
   151     void removeCurrentModel();
    97     
   152     
    98 /*
   153     /*
    99  * It will delete the all model used by state manager
   154      * It will delete the all model used by state manager
   100  */
   155      */
   101     void cleanAllModel();
   156     void cleanAllModel();
   102     
   157     
   103 
   158 
   104 private:
   159 private:
   105 /*
   160 
   106  * Factory function to create the state.
   161     /*
   107  */  
   162      *  Launch the harvesting and TN generation progress bar dialog
       
   163      */
       
   164     void launchProgressDialog();
       
   165     
       
   166     /*
       
   167      * remove the harvesting and TN generation progress bar dialog
       
   168      */
       
   169     void vanishProgressDialog();
       
   170     
       
   171     /*
       
   172      * Factory function to create the state.
       
   173      */  
   108     GlxState * createState(qint32 state);
   174     GlxState * createState(qint32 state);
   109 /*
   175     
   110  * Factory function to create the model.
   176     /*
   111  */  	
   177      * Factory function to create the model.
       
   178      */  	
   112     void createModel(qint32 stateId, NavigationDir dir = NO_DIR);
   179     void createModel(qint32 stateId, NavigationDir dir = NO_DIR);
   113 /*
   180 
   114  * Factory function to create the grid model.
   181     /*
   115  */  	
   182      * Factory function to create the grid model.
       
   183      */  	
   116     void createGridModel(int internalState, NavigationDir dir = NO_DIR);
   184     void createGridModel(int internalState, NavigationDir dir = NO_DIR);
   117 /*
   185 
   118  * To set the fullscreen context based on the currrent orientation
   186     /*
   119  */    
   187      * To set the fullscreen context based on the currrent orientation
       
   188      */    
   120     void setFullScreenContext();
   189     void setFullScreenContext();
       
   190     
       
   191     /*
       
   192      * Apllication event handler function
       
   193      */
   121     void eventHandler(qint32 &id);
   194     void eventHandler(qint32 &id);
   122 /*
   195     
   123  * A function to care the exit for application, in the case when application launch from internal and external
   196     /*
   124  */        
   197      * A function to care the exit for application, in the case when application launch from internal and external
       
   198      */        
   125     void exitApplication();
   199     void exitApplication();
   126 
   200 
   127 private:
   201 private:
   128     GlxViewManager      *mViewManager;
   202     GlxViewManager      *mViewManager;
   129     GlxMediaModel       *mAllMediaModel;        // for all grid
   203     GlxMediaModel       *mAllMediaModel;        // for all grid