示例#1
0
 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')
示例#2
0
 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
示例#3
0
 def setUp(self):
     self.app = QApplication(sys.argv)
     self.newModel = NewModel()
示例#4
0
 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