def _newModel(self): # create new model. self.newModel = NewModel() # connect the new model to the controller. self.newModel.procDone.connect(self._runNewModel) # set new model screen to main widget. self.setCentralWidget(self.newModel) # close ferts. self.newModel.closeAllFerts() # add status bar. self.statusBar().showMessage('Ready to Run New Model')
def createNewModel_returnInputs(self): # add title nm = NewModel() nm.leTitle.setText('title') # add allocation nm.leAllocCG.setText('.25') # check every check box. nm.selectAll.setCheckState(2) nm.showAll(nm.selectAll) # add fertilizer distributions. ferts = nm.getAllAtributes('leF_') [fert[1].setText('.2') for fert in ferts] # create inputs inputs = nm.getInputs(nm.getBoxes(), nm.leTitle.text(), nm.getFerts(), nm.operations, nm.leAllocCG.text()) return inputs
def setUp(self): self.app = QApplication(sys.argv) self.newModel = NewModel()
def createNewModel_empty_returnInputs(self): nm = NewModel() # create inputs inputs = nm.getInputs(nm.getBoxes(), nm.leTitle.text(), nm.getFerts(), nm.operations, nm.leAllocCG.text()) return inputs