#NEWLINE# def on_mode_changed( self , new_index ) : #NEWLINE# #INDENT# if ( new_index == StopMode . Continuous ) : #NEWLINE# #INDENT# self . widget . duration . setEnabled ( False ) #NEWLINE# self . widget . iterations . setEnabled ( False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( new_index == StopMode . Duration ) : #NEWLINE# #INDENT# self . widget . duration . setEnabled ( True ) #NEWLINE# self . widget . iterations . setEnabled ( True ) #NEWLINE# self . widget . duration . setReadOnly ( False ) #NEWLINE# self . widget . iterations . setReadOnly ( True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( new_index == StopMode . Iterations ) : #NEWLINE# #INDENT# self . widget . duration . setEnabled ( True ) #NEWLINE# self . widget . iterations . setEnabled ( True ) #NEWLINE# self . widget . duration . setReadOnly ( True ) #NEWLINE# self . widget . iterations . setReadOnly ( False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( new_index == StopMode . IterationsTimeOut ) : #NEWLINE# #INDENT# self . widget . duration . setEnabled ( True ) #NEWLINE# self . widget . iterations . setEnabled ( True ) #NEWLINE# self . widget . duration . setReadOnly ( False ) #NEWLINE# self . widget . iterations . setReadOnly ( False ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# self . recalculate ( )