ui/viewmanagement/viewmanager/src/glxviewmanager.cpp
changeset 50 a0f57508af73
parent 45 863223ea6961
child 52 a3a4c0de738e
equal deleted inserted replaced
45:863223ea6961 50:a0f57508af73
   127 
   127 
   128 void GlxViewManager::addBackSoftKeyAction ( )
   128 void GlxViewManager::addBackSoftKeyAction ( )
   129 {
   129 {
   130     qDebug("GlxViewManager::addBackSoftKeyAction ");
   130     qDebug("GlxViewManager::addBackSoftKeyAction ");
   131     //create the back soft key action and set the data
   131     //create the back soft key action and set the data
   132     mBackAction = new HbAction(Hb::BackNaviAction, this);
   132     mBackAction = new HbAction( Hb::BackNaviAction, this );
   133     mBackAction->setData(EGlxCmdBack);
   133     mBackAction->setData( EGlxCmdBack );
   134     mBackAction->setObjectName( "App Back" );
   134     mBackAction->setObjectName( "App Back" );
   135     mView->setNavigationAction( mBackAction );
   135     mView->setNavigationAction( mBackAction );
   136 }
   136 }
   137 
   137 
   138 Qt::Orientation GlxViewManager::orientation() const
   138 Qt::Orientation GlxViewManager::orientation() const
   177     GlxView *curr_view = (GlxView *) mMainWindow->currentView();
   177     GlxView *curr_view = (GlxView *) mMainWindow->currentView();
   178     curr_view->resetView();
   178     curr_view->resetView();
   179     
   179     
   180     mView = resolveView(id);
   180     mView = resolveView(id);
   181     //partially initialise the view so that animation run smoothly
   181     //partially initialise the view so that animation run smoothly
   182     mView->initializeView( model);
   182     mView->initializeView( model, curr_view );
   183     mModel = model; 
   183     mModel = model; 
   184 
   184 
   185     if ( viewEffect == CURRENT_VIEW || viewEffect == BOTH_VIEW ) { 
   185     if ( viewEffect == CURRENT_VIEW || viewEffect == BOTH_VIEW ) { 
   186         item = curr_view->getAnimationItem(effect);
   186         item = curr_view->getAnimationItem(effect);
   187         if ( item ) {
   187         if ( item ) {
   287         }
   287         }
   288         
   288         
   289         mProgressDialog->setIcon(icon);
   289         mProgressDialog->setIcon(icon);
   290         
   290         
   291         if ( currentValue < 0 ) {
   291         if ( currentValue < 0 ) {
   292             mProgressDialog->setText( QString( "Refreshing" ) ); //To:Do string will change later
   292             mProgressDialog->setText( QString( GLX_REFRESHING ) ); //To:Do string will change later
   293             mProgressDialog->setProgressValue( 0 );
   293             mProgressDialog->setProgressValue( 0 );
   294         }
   294         }
   295         else {
   295         else {
   296             int value = max - currentValue;
   296             int value = max - currentValue;
   297             mProgressDialog->setProgressValue( value );
   297             mProgressDialog->setProgressValue( value );
   341     QModelIndexList selectedModelIndex = mSelectionModel->selectedIndexes();
   341     QModelIndexList selectedModelIndex = mSelectionModel->selectedIndexes();
   342     for ( int i = 0 ; i <  mMarkingActionList.count(); i++) {
   342     for ( int i = 0 ; i <  mMarkingActionList.count(); i++) {
   343         if( mMarkingActionList.at(i)->data()==EGlxCmdSelect) {
   343         if( mMarkingActionList.at(i)->data()==EGlxCmdSelect) {
   344        	    bool noSelection=selectedModelIndex.empty();
   344        	    bool noSelection=selectedModelIndex.empty();
   345             mMarkingActionList.at(i)->setDisabled(noSelection);
   345             mMarkingActionList.at(i)->setDisabled(noSelection);
   346             mMenuManager->disableAction(mView->menu(),noSelection);
       
   347             break;
   346             break;
   348         }
   347         }
   349     }
   348     }
   350 }
   349 }
   351 
   350