diff -r f291796e213d -r fb37077c270f ui/views/fullscreenview/inc/glxfullscreenview.h --- a/ui/views/fullscreenview/inc/glxfullscreenview.h Tue Jul 06 14:16:16 2010 +0300 +++ b/ui/views/fullscreenview/inc/glxfullscreenview.h Wed Aug 18 09:48:53 2010 +0300 @@ -26,6 +26,9 @@ //User Defined Includes #include #include + +#define NBR_ANIM_ITEM 2 + //Orbit/Qt forward declartion class QTimer; class HbAction; @@ -40,83 +43,261 @@ class GlxZoomWidget; class GlxTvOutWrapper; +/** + * Class Description + * This is full screen view class to show the image in fullscreen, zoom the image and + * browse the image through coverflow and imagstrip + */ class GlxFullScreenView : public GlxView { Q_OBJECT public : + /** + * Constructor + * @param - HbMainWindow object + * @param - fullscreen docloader object + */ GlxFullScreenView(HbMainWindow *window,HbDocumentLoader *DocLoader); + + /** + * Destructor + */ ~GlxFullScreenView(); + + /** + * activate() + * ///From GlxView + */ void activate() ; + + /** + * deActivate() + * ///From GlxView + */ void deActivate(); - /* - * Initialize the coverflow and partially creates the coverflow with one image + /** + * initializeView() - Initialize the coverflow and partially creates the coverflow with one image * to make the widget light weight in order to make transition smooth * and also loads the widgets. + * @param - pointer of model to retreive the view releted data + * @parm - previous view pointer to get the staus of fullscreen mode of the view */ - void initializeView(QAbstractItemModel *model); + void initializeView( QAbstractItemModel *model, GlxView *preView ); - /* - * resets the view, with just one icon being present in the widget - * to make the widget light weight in order to make - * transition smooth + /** + * resetView() - resets the view, with just one icon being present in the widget + * to make the widget light weight in order to make transition smooth */ void resetView(); + + /** + * setmodel() + * ///from GlxView + */ void setModel(QAbstractItemModel *model); + + /** + * setModelContext() - to set the context mode of the model. + */ void setModelContext ( ); + + /** + * cleanUp() - To clean the custom widgets. + */ void cleanUp(); + + /** + * getAnimationItem() - To return the animation object to play the view transition animation. + * @return pointer of widget on which animation are suppose to play. + */ QGraphicsItem * getAnimationItem(GlxEffect transitionEffect); public slots: - void orientationChanged(Qt::Orientation); + /** + * orientationChanged() - Slot to upadte the layout when orientation of device has changed + * @param new orientation + */ + void orientationChanged( Qt::Orientation ); + + /** + * activateUI() - To show the ui content like status bar, toolbar, and imzge strip. + */ void activateUI(); + + /** + * hideUi() - To hide the ui content like status bar, toolbar, and imzge strip. + */ void hideUi(); + + /** + * changeSelectedIndex() - Call back when index is chnaged due to browsing of images in coverflow + * It will update the selected index in model and notify other widget about index changed. + * @param - index of new selected item. + */ void changeSelectedIndex(const QModelIndex &index); + + /** + * indexChanged() - call back when index is changed from the image strip. + * It will update the selected index in model and notify other widget about index changed. + * @param - index of new selected item. + */ void indexChanged(const QModelIndex &index ); + + /** + * scrollingStarted() - Call back function to get notification of when scrolling of + * image strip is start. + */ void scrollingStarted(); + + /** + * scrollingEnded() - Call back function to get notification of when scrolling of + * image strip is stop. + */ void scrollingEnded(); + + /** + * pressed() - Call back function to get notification of user pressed mouse key or touch the fingure. + * @param - index of selected item. + */ void pressed(const QModelIndex &index ); + + /** + * released() - Call back function to get notification of user released mouse key or released the fingure. + * @param - index of new selected item. + */ void released(const QModelIndex &index ); - void setVisvalWindowIndex(); + + /** + * setVisvalWindowIndex() - Set the viisual window index of medialist. + */ + void setVisvalWindowIndex(); + + /** + * coverFlowEventHandle() - Handle the event generated by cover flow. + * @param - cover flow event type + */ void coverFlowEventHandle( GlxCoverFlowEvent e); + + /** + * effectFinished() - call back when ui on\off effect has finished. + * @param - staus of effect + */ void effectFinished( const HbEffect::EffectStatus ); + + /** + * imageSelectionEffectFinished() - call back when ui image strip selection effect has been finished. + * @param - staus of effect + */ void imageSelectionEffectFinished( const HbEffect::EffectStatus ); + + /** + * orientChangeAnimFinished() - call back when custom orientation change effect has been finished. + * @param - staus of effect + */ + void orientChangeAnimFinished( const HbEffect::EffectStatus ); + + /** + * effectFinished - call back when ui on\off effect has finished + * @param - staus of effect + */ void handleToolBarAction(); + + /** + * In case of image fetcher handle select command and emit selected index and model + */ + void handleFSSelect(); protected : + /** + * eventFilter - To handle the application foregrond and background event + * ///From HbView + */ bool eventFilter(QObject *obj, QEvent *ev); -private: - /* - * The widgets are retrieved from the docml +private: + /** + * loadWidgets() - The widgets are retrieved from the docml */ void loadWidgets(); - /* - * Loads the corresponding sections in the docml while the orentation is changed. + /** + * loadViewSection() - Loads the corresponding sections in the docml while the orentation is changed. */ void loadViewSection(); + /** + * setLayout() - To set the widgets laout. + */ void setLayout(); + + /** + * addConnection() - Add the call back of the widgets. + */ void addConnection(); - void addImageStripConnection(); + + /** + * removeConnection() - Remove the call back of widgets. + */ void removeConnection(); - void createUiControl(); + + /** + * setImageStripModel() - set the image strip model. + */ void setImageStripModel(); + /** + * loadFullScreenToolBar() - load the fullscreen tool bar from the docml. + */ void loadFullScreenToolBar(); + + /** + * addToolBarAction() - Crete and add the toolbar acton in toolbar. + * @param - coomand id to recognise the action. + * @param - toolbar action icon. + * @param - action name it is used for automation of test cases. + */ void addToolBarAction( int commandId, const QString &iconName, const QString &name) ; + + /** + * initAnimationItem() - Initialise the custom animation item. + */ + void initAnimationItem(); + + /** + * imageSelectionAnimation() - To trigger the image setection animtaion form the imge strip. + */ void imageSelectionAnimation( const QModelIndex &index ); + + /** + * cancelSelectionAnimation()- To cancel the image selection animation. + */ + void cancelSelectionAnimation( ); + + /** + * playOrientChangeAnim() - To trigger the custom orientation change animation. + */ + void playOrientChangeAnim(); + + /** + * get the substate of fullscreen state. + */ int getSubState(); + + /** + * setHdmiModel() - set the image strip model. + * @param - model + */ void setHdmiModel( QAbstractItemModel *model ); + private: QAbstractItemModel *mModel; //no ownership HbMainWindow *mWindow; //no ownership GlxCoverFlow *mCoverFlow; HbGridView *mImageStrip; QTimer *mUiOffTimer; //use for ui off after 30 sec - HbIconItem *mIconItem ; //temporary item for play the image strip select animation + HbIconItem *mIconItems[ NBR_ANIM_ITEM ] ; //temporary item for play the image strip select animation GlxTvOutWrapper *mTvOutWrapper; HbToolBar *mFullScreenToolBar; //Fullscreen Toolbar //for Zoom