def writeResistor(self, openetran): grid = self.Resistor.layout() status = 0 # Status = 1 when no widgets are left to delete while status == 0: status = Add_Delete_Widgets.deleteResistor(self, grid) # Number of Meters in the system num = len(openetran['resistor']) if num > 1: for k in range(num - 1): Add_Delete_Widgets.addResistor(self, grid) writeWidgets(openetran, grid, 'resistor', 2, 4, 1)
def newResistor(): Add_Delete_Widgets.addResistor(self, self.Resistor.layout())