Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/*********************************************************************************
 *CheckNextStep: Check conditions to enable or not the different buttons.
 *********************************************************************************/
Check conditions to enable or not the different buttons.
Check conditions to enable or not the different buttons .
void DTIAtlasFiberAnalyzerguiwindow::CheckNextStep()
{
    if(m_numberstep==0)
    {
        previousstep->setEnabled(false);
        Apply->setVisible(false);
        nextstep->setVisible(true);
        if(outputfolder->text().compare("")!=0 && m_CSV!=NULL && m_DataCol!=-1)
        {
            nextstep->setEnabled(true);
        }
        else
        {
            nextstep->setEnabled(false);
        }
        AutomatedComputation->setEnabled(true);
    }
    if(m_numberstep==1)
    {
        previousstep->setEnabled(true);
        Apply->setVisible(true);
        nextstep->setVisible(false);
        if(m_AtlasFiberDir.size()!=0 && m_FiberSelectedname.size()!=0)
        {
            Apply->setEnabled(true);
        }
        else
        {
            Apply->setEnabled(false);
        }
        AutomatedComputation->setEnabled(true);
    }
    if(m_numberstep==2)
    {
        previousstep->setEnabled(true);
        Apply->setVisible(true);
        nextstep->setVisible(false);
        setParam();
        if(m_NumberOfParameters==0)
        {
            Apply->setEnabled(false);
        }
        else
        {
            Apply->setEnabled(true);
        }
        AutomatedComputation->setEnabled(true);
    }
    if(m_numberstep==3)
    {
        previousstep->setEnabled(false);
        Apply->setVisible(false);
        nextstep->setEnabled(false);
        AutomatedComputation->setEnabled(false);
    }
}
void DTIAtlasFiberAnalyzerguiwindow :: CheckNextStep ( ) { if ( m_numberstep == 0 ) { previousstep -> setEnabled ( false ) ; Apply -> setVisible ( false ) ; nextstep -> setVisible ( true ) ; if ( outputfolder -> text ( ) . compare ( " " ) != 0 && m_CSV != NULL && m_DataCol != -1 ) { nextstep -> setEnabled ( true ) ; } else { nextstep -> setEnabled ( false ) ; } AutomatedComputation -> setEnabled ( true ) ; } if ( m_numberstep == 1 ) { previousstep -> setEnabled ( true ) ; Apply -> setVisible ( true ) ; nextstep -> setVisible ( false ) ; if ( m_AtlasFiberDir . size ( ) != 0 && m_FiberSelectedname . size ( ) != 0 ) { Apply -> setEnabled ( true ) ; } else { Apply -> setEnabled ( false ) ; } AutomatedComputation -> setEnabled ( true ) ; } if ( m_numberstep == 2 ) { previousstep -> setEnabled ( true ) ; Apply -> setVisible ( true ) ; nextstep -> setVisible ( false ) ; setParam ( ) ; if ( m_NumberOfParameters == 0 ) { Apply -> setEnabled ( false ) ; } else { Apply -> setEnabled ( true ) ; } AutomatedComputation -> setEnabled ( true ) ; } if ( m_numberstep == 3 ) { previousstep -> setEnabled ( false ) ; Apply -> setVisible ( false ) ; nextstep -> setEnabled ( false ) ; AutomatedComputation -> setEnabled ( false ) ; } }
CheckNextStep: Check conditions to enable or not the different buttons.
CheckNextStep : Check conditions to enable or not the different buttons .
//Previous always visible //Next visible & disabled; Previous disabled; Apply not visible //if an output folder, a datacolumn is precised and a csv existed Next becomes enabled //Next not visible; Previous enabled; Apply visible & disabled //if there is an atlas folder and at least one fiber is selected Apply becomes enabled //Next not visible; Previous enabled; Apply visible & disabled //if there is at least one parameter Apply becomes enabled //Next visible & disabled; Previous enabled; Apply not visible