示例#1
0
 def sorption_substance_dialog(self):
     '''
     Dialog for sorption substance details - for flow 1.6.7
     '''    
     subst = self.window().flow_ini.substances
     if subst['Sorption'] == 'Yes':
         
         idx = str(self.selector_material.currentText())
         
         material = self.window().material_dict
         sorption_dict = material[idx]['sorption']
         substances = subst['Substances'].split()
         
         dlg = SubstancesDialog(len(substances), sorption_dict, self, substances)
         if dlg.exec_():
             values = dlg.get_values()
             material[idx]['sorption'] = values
             self.set_material_to_dict()
             self.window().statusBar.showMessage(
             'New value for sorption substances saved to memory', 8000)
     
         
     else:
         self.window().statusBar.showMessage(
             'No sorption substances', 8000)
 def sorption_substance_subdialog(self):
     '''
     dialog for sorption substances
     '''
         
     dlg = SubstancesDialog(len(self.substance_names), self.sorption_dict, self, self.substance_names)
     if dlg.exec_():
         pattern = 'button_sens_sorption_'
         sender = self.sender().objectName()
         sender = str(sender[len(pattern):])
         
         self.sorption_values[sender] = dlg.get_values()
示例#3
0
 def sorption_substance_dialog(self):
     '''
     dialog for sorption substances
     '''
     subst = self.window().flow_ini.substances
     if subst['Sorption'] == 'Yes':
         
         substances = subst['Substances'].split()
         sorption_dict = {}
         for row, subst in enumerate(substances):
             sorption_dict[str(row)] = '0.0'
         
         
         dlg = SubstancesDialog(len(substances), sorption_dict, self, substances)
         if dlg.exec_():
             self.sorption_values = dlg.get_values()
             self.window().statusBar.showMessage(
             'Sorption coefficients are ready for computing.', 8000)
             
     else:
         self.window().statusBar.showMessage(
             'No sorption substances', 8000)