BATS.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:BATS-Bayesian-Adaptive-Trial-Simulator 作者: ContaTP 项目源码 文件源码
def __init__(self, parent=None):

        QtWidgets.QWidget.__init__(self, parent)
        self.setupUi(self)
        # Store plot
        self.parent = parent
        self.table_file = None
        self.plot_file = {}
        self.exportTable_flag = self.exportPlot_flag = 0
        # Set font size amd color for log console
        self.log_tabWidget.setCurrentIndex(0)
        self.log_tabWidget.setTabIcon(0, QtGui.QIcon(":/resources/tab_log.png"))
        self.log_tabWidget.setTabIcon(1, QtGui.QIcon(":/resources/tab_info_disabled.png"))
        self.log_tabWidget.tabBar().setTabTextColor(0, QtGui.QColor("#4f8a10"))  
        self.log_tabWidget.tabBar().setStyleSheet("QTabBar:tab:selected{ border-color: #4f8a10;}")
        font = QtGui.QFont("Segoe UI", 10)
        self.logConsole.setFont(font)
        self.configConsole.setFont(font)
        self.configConsole.setTextColor(QtGui.QColor("#00529B"))
        self.verticalHeaderFont = font
        self.logConsole.setTextColor(NORMAL_LOG_COLOR)
        # Link the stdout to log textedit
        self.originalsys = sys.stdout
        sys.stdout = StdOutStream()
        # self.wheelfilter = WheelFilter()
        # self.graph_comboBox.installEventFilter(self.wheelfilter)
        # Set current index to the comboBox
        # self.graph_comboBox.setCurrentIndex(-1)


        # Action
        self.log_tabWidget.currentChanged.connect(self.changeTab)
        sys.stdout.textWritten.connect(self.writeLog)
        self.logClear_btn.clicked.connect(self.clearLog)
        # self.graph_comboBox.currentIndexChanged.connect(self.changeGraph)
        self.tableExport_btn.clicked.connect(self.exportTable)
        self.plotExport_btn.clicked.connect(self.exportPlot)


    # Function for the log tab
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号