コード例 #1
0
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)
コード例 #2
0
ファイル: GUI.py プロジェクト: lemauffcam/OpenETran
 def newResistor():
     Add_Delete_Widgets.addResistor(self, self.Resistor.layout())