stateproviders/ftustateprovider/src/ftuwizardactivatedstate.cpp
changeset 3 0de9fa4800b7
parent 2 66c26770985f
child 5 1c5fe9af5d39
equal deleted inserted replaced
2:66c26770985f 3:0de9fa4800b7
    90 
    90 
    91     mWizardStackedWidget = qobject_cast<HbStackedWidget *>(mDocumentLoader->findWidget(WIZARD_STACKEDWIDGET));
    91     mWizardStackedWidget = qobject_cast<HbStackedWidget *>(mDocumentLoader->findWidget(WIZARD_STACKEDWIDGET));
    92 
    92 
    93     QString path = QDir::currentPath();
    93     QString path = QDir::currentPath();
    94     
    94     
    95     mBackAction = new HbAction(Hb::BackAction, this);
    95     mBackAction = new HbAction(Hb::BackNaviAction, this);
    96     
    96     
    97 }
    97 }
    98 
    98 
    99 // ---------------------------------------------------------------------------
    99 // ---------------------------------------------------------------------------
   100 // FtuWizardActivatedState::~FtuWizardActivatedState
   100 // FtuWizardActivatedState::~FtuWizardActivatedState
   134             this, SLOT(handleBackEvent()));
   134             this, SLOT(handleBackEvent()));
   135 
   135 
   136     setActiveWizardConnections();
   136     setActiveWizardConnections();
   137 
   137 
   138     mActiveWizard->activateWizard();
   138     mActiveWizard->activateWizard();
       
   139     
       
   140     if (mActiveWizard->wizardSettings().mNoViews)
       
   141     {
       
   142         emit backEventTriggered();
       
   143     }
   139 }
   144 }
   140 
   145 
   141 // ---------------------------------------------------------------------------
   146 // ---------------------------------------------------------------------------
   142 // FtuWizardActivatedState::onExit
   147 // FtuWizardActivatedState::onExit
   143 // ---------------------------------------------------------------------------
   148 // ---------------------------------------------------------------------------
   392     if (wizardIndex != -1)
   397     if (wizardIndex != -1)
   393     {
   398     {
   394         // check if other wizard than current is activated
   399         // check if other wizard than current is activated
   395         if (mActiveWizard != content()->wizard(wizardIndex))
   400         if (mActiveWizard != content()->wizard(wizardIndex))
   396         {
   401         {
   397             mMainWindow->currentView()->takeMenu();
   402             int prevWizardIndex = content()->activeWizard();
       
   403 			mMainWindow->currentView()->takeMenu();
       
   404             
   398             // first deactivate current active wizard
   405             // first deactivate current active wizard
   399 		    if(mActiveWizard)
   406 		    if(mActiveWizard)
   400 		    {
   407 		    {
   401 			    mActiveWizard->deactivateWizard();
   408 			    mActiveWizard->deactivateWizard();
   402 		    }
   409 		    }
   406             mActiveWizard = content()->wizard(wizardIndex);
   413             mActiveWizard = content()->wizard(wizardIndex);
   407             // reset connections for new active wizard
   414             // reset connections for new active wizard
   408             setActiveWizardConnections();
   415             setActiveWizardConnections();
   409             // set new active wizard visible
   416             // set new active wizard visible
   410             mActiveWizard->activateWizard();
   417             mActiveWizard->activateWizard();
       
   418             
       
   419             if (mActiveWizard->wizardSettings().mNoViews) 
       
   420             {
       
   421                 mActiveWizard->deactivateWizard();
       
   422                 content()->setActiveWizard(prevWizardIndex);
       
   423                 mActiveWizard = content()->wizard(prevWizardIndex);
       
   424                 setActiveWizardConnections();
       
   425                 mActiveWizard->activateWizard();
       
   426             }
   411         }
   427         }
   412         
   428         
   413         // temp solution to skip edge indexes - start
   429         // temp solution to skip edge indexes - start
   414         if (wizardIndex == 0) { wizardIndex++; }
   430         if (wizardIndex == 0) { wizardIndex++; }
   415         if (wizardIndex == content()->wizards().count()-1) { wizardIndex--; }
   431         if (wizardIndex == content()->wizards().count()-1) { wizardIndex--; }