def load_file(self): #reset connections try: self.comboBox.currentIndexChanged.disconnect() except: pass try: self.comboBox_2.currentIndexChanged.disconnect() except: pass try: self.comboBox_3.currentIndexChanged.disconnect() except: pass #reset self.systemname = None self.systems = None self.cur_language = None self.cur_flowdiagram = None #load objects objAPI = view_edit_tool_API.API() AutXML = autecology_xml.AutecologyXML(None) #load and refresh data self = objAPI.load_file(self) if (hasattr(self, "xmlroot")): (self, AutXML) = objAPI.refresh_data(self, AutXML) #set connections self.comboBox.currentIndexChanged.connect( lambda: objAPI.refresh_language(self, self.cur_language)) self.comboBox_2.currentIndexChanged.connect( lambda: objAPI.refresh_group_data( self, AutXML, self.modeltypename, self.systemname, self. groupBox)) self.comboBox_3.currentIndexChanged.connect( lambda: objAPI.refresh_flowdiagram( self, AutXML, self.modeltypename, self.systemname, self. cur_flowdiagram)) return ()
def refresh_group_data(self, cur_window): objAPI = view_edit_tool_API.API() objAPI.refresh_group_data(self, cur_window) return ()
def refresh_data(self): objAPI = view_edit_tool_API.API() objAPI.refresh_data(self) return ()
def quit(self): objAPI = view_edit_tool_API.API() objAPI.quit(self) return ()
def save_file(self): objAPI = view_edit_tool_API.API() objAPI.save_file(self) return ()
def new_file(self): objAPI = view_edit_tool_API.API() objAPI.new_file(self) return ()