from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 718)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_3 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_3.setObjectName("gridLayout_3")
self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox_3.sizePolicy().hasHeightForWidth())
self.groupBox_3.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_3.setFont(font)
self.groupBox_3.setStyleSheet("QGroupBox{border:1px ridge gray;margin-top: 1ex;} QGroupBox::title{subcontrol-origin: margin;subcontrol-position:top center;padding:0 3px;}")
self.groupBox_3.setObjectName("groupBox_3")
self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3)
self.gridLayout_2.setContentsMargins(-1, -1, 30, -1)
self.gridLayout_2.setObjectName("gridLayout_2")
self.label_4 = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_4.setFont(font)
self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_4.setObjectName("label_4")
self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1)
self.label_time_elapsed = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setFamily("Ubuntu Mono")
font.setPointSize(12)
self.label_time_elapsed.setFont(font)
self.label_time_elapsed.setObjectName("label_time_elapsed")
self.gridLayout_2.addWidget(self.label_time_elapsed, 0, 1, 1, 1)
self.label_2 = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_2.setFont(font)
self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_2.setObjectName("label_2")
self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
self.progressBar_total = QtWidgets.QProgressBar(self.groupBox_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.progressBar_total.sizePolicy().hasHeightForWidth())
self.progressBar_total.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Ubuntu Mono")
font.setPointSize(12)
self.progressBar_total.setFont(font)
self.progressBar_total.setStyleSheet("")
self.progressBar_total.setMaximum(1000)
self.progressBar_total.setProperty("value", 0)
self.progressBar_total.setAlignment(QtCore.Qt.AlignCenter)
self.progressBar_total.setFormat("")
self.progressBar_total.setObjectName("progressBar_total")
self.gridLayout_2.addWidget(self.progressBar_total, 1, 1, 1, 1)
self.label_3 = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_3.setFont(font)
self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_3.setObjectName("label_3")
self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
self.progressBar_current = QtWidgets.QProgressBar(self.groupBox_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.progressBar_current.sizePolicy().hasHeightForWidth())
self.progressBar_current.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Ubuntu Mono")
font.setPointSize(12)
self.progressBar_current.setFont(font)
self.progressBar_current.setStyleSheet("/*\n"
"QProgressBar {\n"
" border: 2px solid gray;\n"
" background-color: rgba(0, 0, 0, 0);\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: rgba(0, 200, 0);\n"
" width: 1px;\n"
"}*/")
self.progressBar_current.setMaximum(1000)
self.progressBar_current.setProperty("value", 0)
self.progressBar_current.setAlignment(QtCore.Qt.AlignCenter)
self.progressBar_current.setFormat("")
self.progressBar_current.setObjectName("progressBar_current")
self.gridLayout_2.addWidget(self.progressBar_current, 2, 1, 1, 1)
self.gridLayout_2.setColumnStretch(0, 1)
self.gridLayout_2.setColumnStretch(1, 3)
self.gridLayout_3.addWidget(self.groupBox_3, 1, 0, 1, 2)
self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_2.setFont(font)
self.groupBox_2.setStyleSheet("QGroupBox{border:1px ridge gray;margin-top: 1ex;} QGroupBox::title{subcontrol-origin: margin;subcontrol-position:top center;padding:0 3px;}")
self.groupBox_2.setObjectName("groupBox_2")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2)
self.verticalLayout_2.setContentsMargins(30, 30, 30, 30)
self.verticalLayout_2.setSpacing(20)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.pushButton_start = QtWidgets.QPushButton(self.groupBox_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_start.sizePolicy().hasHeightForWidth())
self.pushButton_start.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.pushButton_start.setFont(font)
self.pushButton_start.setObjectName("pushButton_start")
self.verticalLayout_2.addWidget(self.pushButton_start)
self.pushButton_cancel = QtWidgets.QPushButton(self.groupBox_2)
self.pushButton_cancel.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_cancel.sizePolicy().hasHeightForWidth())
self.pushButton_cancel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.pushButton_cancel.setFont(font)
self.pushButton_cancel.setObjectName("pushButton_cancel")
self.verticalLayout_2.addWidget(self.pushButton_cancel)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.verticalLayout_2.addItem(spacerItem)
self.verticalLayout_2.setStretch(0, 1)
self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 1)
self.gridLayout_3.addWidget(self.groupBox_2, 0, 1, 1, 1)
self.groupBox_config = QtWidgets.QGroupBox(self.centralwidget)
sizePolicy = Qt