def switchStopBoundary(self):
if self.stopBoundary_flag:
self.patColHeaders = []
for i in range(self.nStage):
self.patColHeaders.append("Stage "+str(i+1))
# There are two rows, corresponding to the futility and efficacy boundary
self.stopBoundary_tableWidget.setRowCount(2)
self.stopBoundary_tableWidget.setColumnCount(self.nStage)
self.stopBoundary_tableWidget.setCurrentCell(-1, -1)
self.stopBoundary_tableWidget.setHorizontalHeaderLabels(self.patColHeaders)
self.stopBoundary_tableWidget.setVerticalHeaderLabels(["Futility", "Efficacy"])
# If unchanged, load the settings last time
if self.nStage == len(self.fut_list) and self.nStage == len(self.eff_list):
for j in range(self.nStage):
self.stopBoundary_tableWidget.setItem(0, j, QtWidgets.QTableWidgetItem(str(self.fut_list[j])))
self.stopBoundary_tableWidget.setItem(1, j, QtWidgets.QTableWidgetItem(str(self.eff_list[j])))
self.nStage_comboBox.setEnabled(False)
self.nArm_comboBox.setEnabled(False)
else:
self.setStopBoundary_btn.setFocus()
self.nStage_comboBox.setEnabled(True)
self.nArm_comboBox.setEnabled(True)
self.stopBoundary_Frame.setVisible(self.stopBoundary_flag)
self.stopBoundary_flag = not self.stopBoundary_flag
# Toggle for added patient frame
BATS_MAMS.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录