ui/viewmanagement/viewmanager/inc/glxviewmanager.h
changeset 72 0a8e959402e5
parent 71 27f2d7aec52a
--- a/ui/viewmanagement/viewmanager/inc/glxviewmanager.h	Wed Oct 06 14:49:39 2010 +0530
+++ b/ui/viewmanagement/viewmanager/inc/glxviewmanager.h	Thu Oct 14 17:54:23 2010 +0530
@@ -67,141 +67,189 @@
      * Constructor
      */
     GlxViewManager();
+    
     /**
      * Destructor
      */
     ~GlxViewManager();
 
+    /**
+     * setupItems() - For initial setup of application after view is ready for drawing
+     */
     void setupItems( );
 
     /**
-     * launch application
+     * launchApplication() - Api to launch the photos application
      * @param id viewId
      * @param model model to be used for the view
      */
     void launchApplication( qint32 id, QAbstractItemModel *model );
 
     /**
-     * add back key action
+     * addBackSoftKeyAction() - add back key action
      */
     void addBackSoftKeyAction();
 
     /**
-     * This will return the orientation of main window
+     * orientation() - This will return the current orientation of device
      */    
     Qt::Orientation orientation() const;
+    
+    /**
+     * This function is used to launch the view
+     * @param view id
+     * @param pointer of data model
+     */
+    void launchView ( qint32 id, QAbstractItemModel *model );
 
     /**
-     * This will deactivate the current function
+     * It is over load slot and used to run the animation for view transition and launch the view
+     * @param view id
+     * @param pointer of data model
+     * @param 
+     * @param View transtion id
+     * @param to play the animation on which views
+     */    
+    void launchView ( qint32 id, QAbstractItemModel *model, GlxEffect effect, GlxViewEffect viewEffect );
+    
+    /**
+     * launchProgressDialog() - To launch the refreshing media progress dialog
+     * @param - number of item left to populate
+     */
+    void launchProgressDialog( int maxValue );
+    
+    /**
+     * updateProgressDialog() - To update the refreshing media progress dialog value
+     * @param - number of item left to populate
+     */
+    void updateProgressDialog( int currentValue );
+
+    /**
+     * deactivateCurrentView() - This will deactivate the current function
      * to be used only in cases where External launch was done
      */     
     void deactivateCurrentView();
 
     /**
-     *  To update the tool bar enable and disable icon
-     *  id = This should be selected toolbar tab id
+     *  updateToolBarIcon() -To update the tool bar enable and disable icon
+     *  @parma This should be selected toolbar tab id
      */    
     void updateToolBarIcon( int id );
+	
+    /**
+     *  updateToolBarActionState() - To update the tool bar action check state
+     *  @param This should be selected toolbar tab id
+     *  @param action check state
+     */        
+    void updateToolBarActionState( int id, bool isChecked );	
 
     /**
-     * Enable the marking mode of the view to select multiple item
+     * enterMarkingMode() - Enable the marking mode of the view to select multiple item
+     * @param view id
+     * @parma command id
      */    
     void enterMarkingMode( qint32 viewId, qint32 commandId );
 
     /**
-     * Enable the normal mode of the view
+     * exitMarkingMode() - Enable the normal mode of the view
+     * @param view id
      */    
     void exitMarkingMode( qint32 viewId );
 
     /**
-     * Pass the user action to the view
+     * handleUserAction() - Pass the user action to the view to process action
+     * @param view id
+     * @parma user action id ( command id )
      */    
     void handleUserAction( qint32 viewId, qint32 commandId );
 
     /**
-     *  Return the selection model to the user
+     *  getSelectionModel() Return the selection model to the user
+     *  @param - view id of the current view
+     *  @return - selection model of the view 
      */    
     QItemSelectionModel * getSelectionModel( qint32 viewId );
 
     /**
-     * To set the model of current view
+     * setModel() - To set the model of current view
+     * @param model pointer
      */
     void setModel( QAbstractItemModel *model );
+    
+    /**
+     * cancelViewTransitionEffect() - To cancel the current runing view transition
+     */
+    void cancelViewTransitionEffect();
 	    
 signals :
     /**
-     *  emit the user action
+     * actionTriggered() - emit the signal of user action for state manager
+     * @param action or command id
      */
     void actionTriggered( qint32 id );
-    void externalCommand( int cmdId );
 
 public slots:
-    /**
-     *  This public slot is used to launch the view
-     */
-    void launchView ( qint32 id, QAbstractItemModel *model );
-
+    
     /**
-     *  It is over load slot and used to run the animation for view transition and launch the view
-     */    
-    void launchView ( qint32 id, QAbstractItemModel *model, GlxEffect effect, GlxViewEffect viewEffect );
-    
-    void launchProgressDialog( int maxValue );
-    void updateProgressDialog( int currentValue );
-
-    /**
-     *  It will removed and deleted the view.
-     *  Currently It is not used so may be in future, It will be removed.
+     * destroyView() - It will removed and deleted the view form the view list.
+     * Currently It is not used so may be in future, It will be removed.
+     * @param - view id of view which is suppose to destroy
      */    
     void destroyView ( qint32 id );
 
     /**
-     *  It will pass the user action to the state manager
+     * actionProcess() - It will pass the user action to the state manager
+     * @param action id to process
      */    
     void actionProcess( qint32 id );
 
     /**
-     *  It will pass the user selected menu action to state manager 
-     *  check for depricated with actionProcess api
+     *  handleAction() - It will pass the user action ( tool bar + back ) to state manager
      */    
-    void handleMenuAction( qint32 commandId );
+    void handleAction();
 
     /**
-     *  It will pass the user action ( tool bar + back ) to state manager
-     */    
-    void handleAction();
-    void cancelTimer();
-
-    /**
-     *  This is slot used for the animation finished call back
+     *  effectFinished() -This is slot used for the transition animation finished call back
      */    
     void effectFinished( );
 
     /**
-     *  This will open the item specifc Menu
+     *  itemSpecificMenuTriggered() - This will open the item specifc Menu
+     *  @parma - view id 
+     *  @param - postion of the context menu
      */    
     void itemSpecificMenuTriggered( qint32, QPointF );
     
     void handleReadyView();
 	
 private slots:
-
+   /**
+    * checkMarked() -  cheche the some item is marked or no item is marked
+    */
    void checkMarked();
+   
+   /**
+    * hideProgressDialog() - put the application into background
+    */
    void hideProgressDialog();
    
 private:
     /**
-     * It will create and return the view
+     * resolveView() - It will create and return the view
+     * @parma - view id
+     * @return the object of desired view or create the view if it is not created and return
      */
     GlxView * resolveView ( qint32 id );
 
     /**
-     *  It will find a view from the view list and return it
+     * findView() - It will find a view from the view list and return it
+     * @parma - view id
+     * @return the object of desired view or null
      */    
     GlxView * findView ( qint32 id );
 
     /**
-     *  It will deativate the current view
+     * deActivateView() - It will deativate the current view
      */    
     void deActivateView();
 
@@ -211,61 +259,64 @@
     void activateView();
 
     /**
-     *  It will create the grid and list view tool bar action
+     * activateView() - It will create the grid and list view tool bar action
      */    
     void createActions();
 
     /**
-     *  It will create the marking mode toll bar action
+     * createMarkingModeActions() - It will create the marking mode toll bar action
      */    
     void createMarkingModeActions(); 
 
     /**
-     *  It will create the grid and list view tool bar
+     * createToolBar() - It will create the grid and list view tool bar
      */    
     void createToolBar();
 
     /**
-     *  It will create the marking mode tool bar
+     * createMarkingModeToolBar() - It will create the marking mode tool bar
      */    
     void createMarkingModeToolBar();
     
     /**
      * setMarkingToolBarAction() - set the toolbar action text
+     * @parma command id
      */
     void setMarkingToolBarAction( qint32 commandId );
 
     /**
-     *  It will add all the view manager related connection
+     * addConnection() -  It will add all the view manager related connection
      */    
     void addConnection();
 
     /**
-     *  It will remove all the view manager releted connection
+     * removeConnection() - It will remove all the view manager releted connection
      */    
     void removeConnection();
     
     /**
-     * 
+     * getSubState() - return the substate of state
      */    
     int getSubState();
 
 private:
-    QList<GlxView *> mViewList;  //It contains all the view created by it self.
-    HbMainWindow     *mMainWindow; //main window pointer, It have ownership only if 
-    HbAction         *mBackAction; // For back soft key
-    GlxMenuManager   *mMenuManager; //Pointer of menu manger to add the menu in the view 
-    GlxEffectEngine  *mEffectEngine; //To run the animation in between view transition
-    QList<HbAction *>  mActionList; //Tool bar action list
-    QList<HbAction *>  mMarkingActionList; //marking mode tool bar action list
-    HbToolBar          *mViewToolBar; //view tool bar
-    HbToolBar          *mMarkingToolBar; //marking mode tool bar
-    GlxView *mView;
-    QAbstractItemModel *mModel; //no ownership
-    QItemSelectionModel * mSelectionModel;
-    HbProgressDialog *mProgressDialog;
-    GlxMainWindowEventFilter* mWindowEventFilter;
-
+    QList<GlxView *>            mViewList;  //It contains all the view created by it self.
+    HbMainWindow                *mMainWindow; //main window pointer, It have ownership only if 
+    HbAction                    *mBackAction; // For back soft key
+    GlxMenuManager              *mMenuManager; //Pointer of menu manger to add the menu in the view 
+    GlxEffectEngine             *mEffectEngine; //To run the animation in between view transition
+    QList<HbAction *>           mActionList; //Tool bar action list
+    QList<HbAction *>           mMarkingActionList; //marking mode tool bar action list
+    HbToolBar                   *mViewToolBar; //view tool bar
+    HbToolBar                   *mMarkingToolBar; //marking mode tool bar
+    GlxView                     *mView;
+    QAbstractItemModel          *mModel; //no ownership
+    QItemSelectionModel         *mSelectionModel;
+    HbProgressDialog            *mProgressDialog;
+    GlxMainWindowEventFilter    *mWindowEventFilter;
+    bool                        mIsViewTransitionRunning;
+    GlxEffect                   mEffect;
+    QList< QGraphicsItem * >    mItemList;
 };