def get_day_layout(self, day_text): day_label = QLabel(day_text) day_label.setFixedWidth(120) day_label.setFixedHeight(50) day_label.setFont(self.day_font) day_label.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) gen_day_button = QPushButton("Plan day") gen_day_button.setFont(self.general_font) gen_day_button.font().setBold(False) use_day_check = QCheckBox("Use: ") use_day_check.setLayoutDirection(QtCore.Qt.RightToLeft) use_day_check.setChecked(True) use_day_check.setFont(self.general_font) day_layout = QHBoxLayout() day_layout.addWidget(day_label) day_layout.addWidget(use_day_check) info_layout = QVBoxLayout() info_layout.addLayout(day_layout) info_layout.addWidget(gen_day_button) day_text_edit = QTextEdit() day_text_edit.setFont(self.general_font) #Create, fill and return the day layout day_layout = QHBoxLayout() day_layout.addLayout(info_layout) day_layout.addWidget(day_text_edit) return day_layout
class CheckBoxWithLineEdit(QWidget, ): def __init__(self, checkBoxLabel="Prefix", lineEditText="JNT", contentMargin=[0, 0, 0, 0]): super(CheckBoxWithLineEdit, self).__init__() self.checkBox = QCheckBox(checkBoxLabel) self.lineEdit = QLineEdit(lineEditText, self) # setting up fonts self.checkBox.setFont(small_font) self.lineEdit.setFont(small_font) self.lineEdit.setTextMargins(5, 5, 5, 5) self.lineEdit.setContentsMargins(contentMargin[0], contentMargin[1], \ contentMargin[2], contentMargin[3]) # margin = self.lineEdit.getContentsMargins() # margin = QLabel(str(margin), self) self.hbox = QHBoxLayout() self.hbox.addWidget(self.checkBox) self.hbox.addWidget(self.lineEdit) # self.hbox.addWidget(margin) self.setLayout(self.hbox) self.setFixedHeight(60)
class TrainingWindow(QWidget): # Dataset __dataset = None # Netwok model __modelList = [] # Start training @Slot() def startTraining(self): # Get split value split = 1 - float( (self.__datasetSplitComboBox.currentIndex() + 1) / 10.0) # Get split method if self.__datasetSplitRandom.isChecked(): ((x_train, y_train), (x_test, y_test)) = self.network.random_split(self.__dataset, split) elif self.__datasetSplitRegular.isChecked(): ((x_train, y_train), (x_test, y_test)) = self.network.regular_split(self.__dataset, split) # Get epochs number if not self.__epochsLineEdit.text(): ret = QMessageBox.warning(self, "Epochs number", "Please enter the number of epochs", QMessageBox.Ok) return else: epochs = int(self.__epochsLineEdit.text()) self.__xAxis.setRange(0, epochs) # Get learning rate value if not self.__learningRateLineEdit.text(): ret = QMessageBox.warning(self, "Learning rate", "Please select a learning rate", QMessageBox.Ok) return else: learning_rate = float(self.__learningRateLineEdit.text().replace( ",", ".")) if not learning_rate: ret = QMessageBox.warning( self, "Learning rate", "The learning rate cannot be equal to zero", QMessageBox.Ok) return # Get learning rate mode if self.__learningRateCheckBox.isChecked(): mode = 2 else: mode = 1 # Save before training ret = QMessageBox.question( self, "Network save", "Would you like to save the network before the training starts?", QMessageBox.Yes | QMessageBox.No) if ret == QMessageBox.Yes: save_matrix_neural_network(self.network, self.networkName) manual_save_model_neural_network(self.network, self.networkName) QMessageBox.information(self, "Network save", "Network successfully saved !", QMessageBox.Ok) # Clearing the graph self.__series.clear() # Starting training length = len(x_train) for i in range(epochs): err = 0 training_accuracy = 0 l_rate = self.network.Learning_rate_schedule( mode, epochs, epochs - i + 1, learning_rate) for j in range(length): outputs = x_train[j] for layer in self.network.layers: outputs = layer.forward_propagation(outputs) err += self.network.loss(y_train[j], outputs) training_accuracy = training_accuracy + self.network.verification_of_prediction( x_train, y_train, j) error = self.network.loss_prime(y_train[j], outputs) for layer in reversed(self.network.layers): error = layer.backward_propagation(error, l_rate) err = err / length training_accuracy = training_accuracy / float(length) self.__epochNumberLabel.setText("Epoch : " + str(i + 1) + "/" + str(epochs)) self.__trainingAccuracyLabel.setText("Taux de precision : " + str(training_accuracy * 100) + "%") # Appending values to the chart self.__series.append(i, training_accuracy * 100) self.__chartView.repaint() # Auto saving network save_matrix_neural_network(self.network, self.networkName + "_auto") manual_save_model_neural_network(self.network, self.networkName + "_auto") # Saving trained network ret = QMessageBox.question( self, "Network save", "Would you like to save the trained network? ", QMessageBox.Yes | QMessageBox.No) if ret == QMessageBox.Yes: save_matrix_neural_network(self.network, self.networkName) manual_save_model_neural_network(self.network, self.networkName) QMessageBox.information(self, "Network save", "Network successfully saved !", QMessageBox.Ok) # Evaluate network and show confusion matrix (self.test_accuracy, self.matrix) = self.network.evaluate(x_test, y_test) self.__confusionMatrixButton.show() # Showing the confusion matrix @Slot() def showStats(self): # Creating matrix window self.matrixWindow = QMainWindow() self.matrixWindow.setFixedSize(640, 480) key_list = list(self.__classes.keys()) val_list = list(self.__classes.values()) # Creating matrix table self.matrixTable = QTableWidget( len(self.matrix) + 1, len(self.matrix[0]) + 1) for i in range(len(self.matrix)): self.matrixTable.setItem( i + 1, 0, QTableWidgetItem(str(key_list[val_list.index(i)]))) self.matrixTable.setItem( 0, i + 1, QTableWidgetItem(str(key_list[val_list.index(i)]))) for i in range(len(self.matrix)): for j in range(len(self.matrix[0])): self.matrixTable.setItem( i + 1, j + 1, QTableWidgetItem(str(self.matrix[i][j]))) # Printing test accuracy self.matrixLabel = QLabel( "Test accuracy : " + str(self.test_accuracy * 100) + "%", self) self.matrixLabel.setFont(QFont("BebasNeue", 20, QFont.Bold)) # Matrix window layout self.matrixLayout = QVBoxLayout() self.matrixLayout.addWidget(self.matrixTable) self.matrixLayout.addWidget(self.matrixLabel) # Matrix window groupbox self.matrixGroupBox = QGroupBox(self.matrixWindow) self.matrixGroupBox.setLayout(self.matrixLayout) # Showing the matrix window self.matrixWindow.setCentralWidget(self.matrixGroupBox) self.matrixWindow.show() def __init__(self, ds, classes, model, created, *args, **kwargs): super(TrainingWindow, self).__init__(*args, **kwargs) if created: # Initialising network self.network = Network() self.network.use(mean_squared_error, mean_squared_error_prime) else: self.network = model[0] # Getting inputs and outputs self.__dataset = ds self.__classes = classes #fill_missing_values(self.__dataset) #min_max_normalize_dataset(self.__dataset) ((x_train, y_train), (x_test, y_test)) = self.network.regular_split(self.__dataset, 0.5) # Getting inputs if len(x_train.shape) == 2: inputs = x_train.shape[1] else: inputs = x_train.shape[1:] first = inputs[0] second = inputs[1] third = inputs[2] # Getting expected outputs expected_output = y_train.shape[1] # Getting network name self.networkName = model[1] if created: # Getting model list self.__modelList = model[0] self.__modelList[0].setOutput(inputs) for i in range(1, len(self.__modelList)): # Getting the layer name name = self.__modelList[i].text( )[:len(self.__modelList[i].text()) - 6] activation = None activ_prime = None # Getting the activation function if self.__modelList[i].activation() == 0: activation = sigmoid activ_prime = sigmoid_prime elif self.__modelList[i].activation() == 1: activation = tanh activ_prime = tanh_prime elif self.__modelList[i].activation() == 2: activation = rectified_linear_unit activ_prime = rectified_linear_unit_prime elif self.__modelList[i].activation() == 3: activation = softmax activ_prime = softmax_prime # Adding layer to the network if name == "Dense": if self.__modelList[i - 1].text()[:2] == "Fl": self.network.add( FullyConnectedLayer(first * second * third, self.__modelList[i].output())) self.network.add( ActivationLayer(activation, activ_prime)) else: self.network.add( FullyConnectedLayer( self.__modelList[i - 1].output(), self.__modelList[i].output())) self.network.add( ActivationLayer(activation, activ_prime)) elif name == "Flatten": self.network.add(FlattenLayer()) elif name == "Convolutional": self.network.add( ConvLayer((first, second, third), (self.__modelList[i].kernelRows, self.__modelList[i].kernelColumns), 1)) self.network.add(ActivationLayer(activation, activ_prime)) first = first - self.__modelList[i].kernelRows + 1 second = second - self.__modelList[i].kernelColumns + 1 self.network.add( FullyConnectedLayer( self.__modelList[len(self.__modelList) - 1].output(), expected_output)) self.network.add(ActivationLayer(sigmoid, sigmoid_prime)) # Loading Fonts QFontDatabase.addApplicationFont("fonts/BebasNeue-Light.ttf") # Window Settings self.setFixedSize(1280, 720) self.setWindowTitle("Training window") #background = QPixmap("images/menu") #palette = QPalette() #palette.setBrush(QPalette.Background, background) #self.setAttribute(Qt.WA_StyledBackground, True) #self.setPalette(palette) self.setAutoFillBackground(True) # Stylesheet Settings styleFile = QFile("stylesheets/training.qss") styleFile.open(QFile.ReadOnly) style = str(styleFile.readAll()) self.setStyleSheet(style) # Title Settings self.title = QLabel("Training", self) self.title.setFont(QFont("BebasNeue", 30, QFont.Bold)) self.title.setAlignment(Qt.AlignCenter) self.title.setGeometry(600, 10, 300, 120) # Epochs line edit settings self.__epochsLineEdit = QLineEdit(self) self.__epochsLineEdit.setValidator(QIntValidator(0, 100000, self)) # Epochs label settings self.__epochsLabel = QLabel("Epoch number", self) self.__epochsLabel.setFont(QFont("BebasNeue", 20, QFont.Bold)) # Learning rate line edit settings self.__learningRateLineEdit = QLineEdit(self) self.__learningRateLineEdit.setValidator( QDoubleValidator(0.0, 1.0, 3, self)) # Learning rate label settings self.__learningRateLabel = QLabel("Learning rate", self) self.__learningRateLabel.setFont(QFont("BebasNeue", 20, QFont.Bold)) # Learning rate checkboxsettings (auto or not) self.__learningRateCheckBox = QCheckBox("Auto adjustment", self) self.__learningRateCheckBox.setFont(QFont("BebasNeue", 15, QFont.Bold)) # Dataset split settings label self.__datasetSplitLabel = QLabel("Dataset split percentage", self) self.__datasetSplitLabel.setFont((QFont("BebasNeue", 20, QFont.Bold))) # Dataset split mode buttons self.__datasetSplitRegular = QRadioButton("Regular split") self.__datasetSplitRandom = QRadioButton("Random split") # Dataset split mode buttons groupbox self.__datasetSplitModeButtonsLayout = QHBoxLayout(self) self.__datasetSplitModeButtonsGroupBox = QGroupBox(self) self.__datasetSplitModeButtonsGroupBox.setObjectName("setting") self.__datasetSplitModeButtonsLayout.addWidget( self.__datasetSplitRegular) self.__datasetSplitModeButtonsLayout.addWidget( self.__datasetSplitRandom) self.__datasetSplitModeButtonsGroupBox.setLayout( self.__datasetSplitModeButtonsLayout) self.__datasetSplitRegular.setChecked(True) # Dataset split combo box settings self.__datasetSplitComboBox = QComboBox(self) self.__datasetSplitComboBox.addItems( ['90% - 10%', '80% - 20%', '70% - 30%', '60% - 40%']) # Dataset split form layout settings self.__datasetSplitLayout = QFormLayout(self) self.__datasetSplitGroupBox = QGroupBox(self) self.__datasetSplitGroupBox.setObjectName("setting") self.__datasetSplitLayout.addWidget(self.__datasetSplitLabel) self.__datasetSplitLayout.addWidget(self.__datasetSplitComboBox) self.__datasetSplitGroupBox.setLayout(self.__datasetSplitLayout) # Epochs form layout settings self.__epochsFormLayout = QFormLayout(self) self.__epochsGroupBox = QGroupBox(self) self.__epochsGroupBox.setObjectName("setting") self.__epochsFormLayout.addWidget(self.__epochsLabel) self.__epochsFormLayout.addWidget(self.__epochsLineEdit) self.__epochsGroupBox.setLayout(self.__epochsFormLayout) # Learning rate form layout settings self.__learningRateFormLayout = QFormLayout(self) self.__learningRateGroupBox = QGroupBox(self) self.__learningRateGroupBox.setObjectName("setting") self.__learningRateFormLayout.addWidget(self.__learningRateLabel) self.__learningRateFormLayout.addWidget(self.__learningRateCheckBox) self.__learningRateFormLayout.addWidget(self.__learningRateLineEdit) self.__learningRateGroupBox.setLayout(self.__learningRateFormLayout) # Epochs number label self.__epochNumberLabel = QLabel("Epoch : ", self) self.__epochNumberLabel.setFont((QFont("BebasNeue", 15, QFont.Bold))) # Training accuracy label self.__trainingAccuracyLabel = QLabel("Accuracy : ", self) self.__trainingAccuracyLabel.setFont((QFont("BebasNeue", 15, QFont.Bold))) # Training stats layout self.__trainingStatsLayout = QVBoxLayout(self) self.__trainingStatsGroupBox = QGroupBox(self) self.__trainingStatsLayout.addWidget(self.__epochNumberLabel) self.__trainingStatsLayout.addWidget(self.__trainingAccuracyLabel) self.__trainingStatsGroupBox.setLayout(self.__trainingStatsLayout) self.__trainingStatsGroupBox.setGeometry(1000, -30, 300, 150) # Training button settings self.__trainingButton = QPushButton("Start", self) self.__trainingButton.setCursor(Qt.PointingHandCursor) self.__trainingButton.setFont((QFont("BebasNeue", 30, QFont.Bold))) self.__trainingButton.clicked.connect(self.startTraining) # Go back button self.goBackButton = QPushButton("Back", self) self.goBackButton.setObjectName("retour") # Customising go back button self.goBackButton.setCursor(Qt.PointingHandCursor) self.goBackButton.setIcon(QIcon("images/goback_icon")) self.goBackButton.setIconSize(QSize(30, 30)) self.goBackButton.setFont(QFont("BebasNeue", 20, QFont.Bold)) # Confusion matrix button self.__confusionMatrixButton = QPushButton("Show confusion matrix", self) self.__confusionMatrixButton.setCursor(Qt.PointingHandCursor) self.__confusionMatrixButton.setFont((QFont("BebasNeue", 17, QFont.Bold))) self.__confusionMatrixButton.clicked.connect(self.showStats) self.__confusionMatrixButton.setGeometry(420, 20, 250, 80) self.__confusionMatrixButton.hide() # Parameters group box settings self.__parametersGroupBox = QGroupBox("Training parameters", self) self.__parametersGroupBox.setObjectName("parameters") self.__parametersLayout = QVBoxLayout(self) self.__parametersLayout.addWidget(self.__epochsGroupBox) self.__parametersLayout.addWidget(self.__datasetSplitGroupBox) self.__parametersLayout.addWidget( self.__datasetSplitModeButtonsGroupBox) self.__parametersLayout.addWidget(self.__learningRateGroupBox) self.__parametersLayout.addWidget(self.__trainingButton) self.__parametersLayout.addWidget(self.goBackButton) self.__parametersGroupBox.setLayout(self.__parametersLayout) self.__parametersGroupBox.setGeometry(0, 0, 400, 720) # Chart axis settings self.__xAxis = QtCharts.QValueAxis() self.__xAxis.setRange(0, 5) self.__yAxis = QtCharts.QValueAxis() self.__yAxis.setRange(0, 100) # Chart settings self.__series = QtCharts.QLineSeries() self.__chart = QtCharts.QChart() self.__chart.addAxis(self.__xAxis, Qt.AlignBottom) self.__chart.addAxis(self.__yAxis, Qt.AlignLeft) self.__chart.addSeries(self.__series) self.__series.attachAxis(self.__xAxis) self.__series.attachAxis(self.__yAxis) self.__chart.setTitle("Accuracy") self.__chartView = QtCharts.QChartView(self.__chart) self.__chartView.setRenderHint(QPainter.Antialiasing) # Chart layout settings self.__chartLayout = QVBoxLayout(self) self.__chartGroupBox = QGroupBox(self) self.__chartGroupBox.setObjectName("chart") self.__chartLayout.addWidget(self.__chartView) self.__chartGroupBox.setLayout(self.__chartLayout) self.__chartGroupBox.setGeometry(390, 100, 900, 600) # Update timer settings #self.__timer = QTimer(self) #self.__timer.timeout.connect(self.autoSave) #self.__timer.start(1000) #app = QApplication(sys.argv) #window = TrainingWindow() #window.show() #app.exec_()
class Ui_MainWindow(object): def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(787, 415) self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.verticalLayout = QVBoxLayout(self.centralwidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.base = QFrame(self.centralwidget) self.base.setObjectName(u"base") self.base.setStyleSheet(u"QFrame{\n" "\n" " \n" " background-color: rgb(97, 101, 157);\n" "}") self.base.setFrameShape(QFrame.StyledPanel) self.base.setFrameShadow(QFrame.Raised) self.horizontalLayout = QHBoxLayout(self.base) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.frame_for_widgets = QFrame(self.base) self.frame_for_widgets.setObjectName(u"frame_for_widgets") self.frame_for_widgets.setStyleSheet( u"QFrame{\n" "\n" "border-radius:25px;\n" "\n" "\n" "\n" "background-color: rgb(24, 25, 39);\n" "\n" "\n" "\n" "\n" "\n" "\n" "}") self.frame_for_widgets.setFrameShape(QFrame.NoFrame) self.frame_for_widgets.setFrameShadow(QFrame.Raised) self.verticalLayout_4 = QVBoxLayout(self.frame_for_widgets) self.verticalLayout_4.setSpacing(0) self.verticalLayout_4.setObjectName(u"verticalLayout_4") self.verticalLayout_4.setContentsMargins(0, 0, 0, 0) self.frame = QFrame(self.frame_for_widgets) self.frame.setObjectName(u"frame") sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setFrameShape(QFrame.StyledPanel) self.frame.setFrameShadow(QFrame.Raised) self.horizontalLayout_2 = QHBoxLayout(self.frame) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.select_zip_button = QPushButton(self.frame) self.select_zip_button.setObjectName(u"select_zip_button") self.select_zip_button.setMinimumSize(QSize(75, 75)) self.select_zip_button.setMaximumSize(QSize(75, 75)) font = QFont() font.setFamily(u"Segoe UI Light") font.setPointSize(24) self.select_zip_button.setFont(font) self.select_zip_button.setStyleSheet( u"QPushButton{\n" " color:rgb(30, 149, 198);\n" " border: 2px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:10px;\n" "}\n" "QPushButton:hover{\n" "\n" "\n" "border-color:rgb(255, 37, 255);\n" "\n" "\n" "}") self.horizontalLayout_2.addWidget(self.select_zip_button) self.horizontalSpacer = QSpacerItem(331, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_2.addItem(self.horizontalSpacer) self.verticalLayout_4.addWidget(self.frame) self.frame_left_middle = QFrame(self.frame_for_widgets) self.frame_left_middle.setObjectName(u"frame_left_middle") self.frame_left_middle.setFrameShape(QFrame.StyledPanel) self.frame_left_middle.setFrameShadow(QFrame.Raised) self.verticalLayout_5 = QVBoxLayout(self.frame_left_middle) self.verticalLayout_5.setSpacing(0) self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setContentsMargins(0, 0, 0, 0) self.frame_left_middle_up = QFrame(self.frame_left_middle) self.frame_left_middle_up.setObjectName(u"frame_left_middle_up") self.frame_left_middle_up.setFrameShape(QFrame.StyledPanel) self.frame_left_middle_up.setFrameShadow(QFrame.Raised) self.horizontalLayout_4 = QHBoxLayout(self.frame_left_middle_up) self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.horizontalLayout_3 = QHBoxLayout() self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.label = QLabel(self.frame_left_middle_up) self.label.setObjectName(u"label") font1 = QFont() font1.setFamily(u"Arial Rounded MT Bold") font1.setPointSize(11) self.label.setFont(font1) self.label.setStyleSheet(u"QLabel{\n" " color:rgb(30, 149, 198);\n" "\n" " \n" "\n" " }") self.label.setAlignment(Qt.AlignCenter) self.horizontalLayout_3.addWidget(self.label) self.lineEdit = QLineEdit(self.frame_left_middle_up) self.lineEdit.setObjectName(u"lineEdit") self.lineEdit.setStyleSheet(u"QLineEdit{\n" "color:rgb(30, 149, 198);\n" " background-color: rgb(65, 69, 106);\n" "\n" "border:2px solid black;\n" "\n" "border-radius:3px;\n" "border-color:rgb(240, 123, 255);\n" "\n" "}") self.horizontalLayout_3.addWidget(self.lineEdit) self.same_as_zip_name_checkbox = QCheckBox(self.frame_left_middle_up) self.same_as_zip_name_checkbox.setObjectName( u"same_as_zip_name_checkbox") font2 = QFont() font2.setFamily(u"Arial Rounded MT Bold") font2.setPointSize(10) self.same_as_zip_name_checkbox.setFont(font2) self.same_as_zip_name_checkbox.setStyleSheet( u"QCheckBox{\n" "color:rgb(30, 149, 198);\n" "\n" "}\n" "QCheckBox:unchecked {\n" " \n" " color:rgb(30, 149, 198);\n" "}\n" "QCheckBox::indicator {\n" " width: 13px;\n" " height: 13px;\n" " \n" " color: rgb(30, 149, 198);\n" " background-color: rgb(42, 44, 68);\n" "}\n" "QCheckBox::indicator:checked {\n" " \n" " \n" " background-color: rgb(192, 98, 204);\n" "}\n" "QCheckBox:checked {\n" "\n" "color: rgb(38, 194, 255);\n" " \n" "}\n" "\n" "QCheckBox::indicator:checked {\n" "color: rgb(253, 111, 54);\n" " \n" "}\n" "") self.horizontalLayout_3.addWidget(self.same_as_zip_name_checkbox) self.horizontalLayout_4.addLayout(self.horizontalLayout_3) self.horizontalSpacer_2 = QSpacerItem(85, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_4.addItem(self.horizontalSpacer_2) self.verticalLayout_5.addWidget(self.frame_left_middle_up) self.frame_3 = QFrame(self.frame_left_middle) self.frame_3.setObjectName(u"frame_3") self.frame_3.setFrameShape(QFrame.StyledPanel) self.frame_3.setFrameShadow(QFrame.Raised) self.horizontalLayout_6 = QHBoxLayout(self.frame_3) self.horizontalLayout_6.setObjectName(u"horizontalLayout_6") self.horizontalLayout_5 = QHBoxLayout() self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") self.label_2 = QLabel(self.frame_3) self.label_2.setObjectName(u"label_2") self.label_2.setMinimumSize(QSize(100, 0)) font3 = QFont() font3.setFamily(u"Segoe UI") font3.setPointSize(12) self.label_2.setFont(font3) self.label_2.setStyleSheet(u"QLabel{\n" "\n" " \n" " \n" " color:rgb(30, 149, 198);\n" "\n" " \n" "\n" " }") self.label_2.setAlignment(Qt.AlignCenter) self.horizontalLayout_5.addWidget(self.label_2) self.algorithm_combobox = QComboBox(self.frame_3) self.algorithm_combobox.addItem("") self.algorithm_combobox.addItem("") self.algorithm_combobox.addItem("") self.algorithm_combobox.addItem("") self.algorithm_combobox.setObjectName(u"algorithm_combobox") self.algorithm_combobox.setMinimumSize(QSize(150, 0)) font4 = QFont() font4.setFamily(u"Segoe UI") font4.setPointSize(10) font4.setBold(True) font4.setWeight(75) self.algorithm_combobox.setFont(font4) self.algorithm_combobox.setStyleSheet( u"QComboBox{\n" "\n" " \n" " color:rgb(30, 149, 198);\n" "\n" " border:2px solid black;\n" " border-color:rgb(240, 123, 255);\n" " background-color: rgb(42, 44, 68);\n" " \n" "\n" "}\n" "QComboBox::down-arrow {\n" " border:1px solid black;\n" "border-color:rgb(30, 149, 198);\n" "}\n" "\n" "ComboBox::drop-down {\n" " \n" " color: rgb(30, 149, 198);\n" " background-color: rgb(56, 58, 91);\n" "}\n" "\n" "\n" "QComboBox::down-arrow:on { /* shift the arrow when popup is open */\n" " top: 1px;\n" " left: 1px;\n" "}\n" "") self.horizontalLayout_5.addWidget(self.algorithm_combobox) self.horizontalLayout_6.addLayout(self.horizontalLayout_5) self.horizontalSpacer_3 = QSpacerItem(146, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_6.addItem(self.horizontalSpacer_3) self.verticalLayout_5.addWidget(self.frame_3) self.verticalLayout_4.addWidget(self.frame_left_middle) self.frame_left_bottom = QFrame(self.frame_for_widgets) self.frame_left_bottom.setObjectName(u"frame_left_bottom") self.frame_left_bottom.setFrameShape(QFrame.StyledPanel) self.frame_left_bottom.setFrameShadow(QFrame.Raised) self.verticalLayout_6 = QVBoxLayout(self.frame_left_bottom) self.verticalLayout_6.setSpacing(0) self.verticalLayout_6.setObjectName(u"verticalLayout_6") self.verticalLayout_6.setContentsMargins(0, 0, 0, 0) self.frame_for_start_button = QFrame(self.frame_left_bottom) self.frame_for_start_button.setObjectName(u"frame_for_start_button") self.frame_for_start_button.setFrameShape(QFrame.StyledPanel) self.frame_for_start_button.setFrameShadow(QFrame.Raised) self.horizontalLayout_8 = QHBoxLayout(self.frame_for_start_button) self.horizontalLayout_8.setObjectName(u"horizontalLayout_8") self.horizontalLayout_7 = QHBoxLayout() self.horizontalLayout_7.setObjectName(u"horizontalLayout_7") self.label_3 = QLabel(self.frame_for_start_button) self.label_3.setObjectName(u"label_3") self.label_3.setMinimumSize(QSize(100, 0)) self.label_3.setFont(font2) self.label_3.setStyleSheet(u"QLabel{\n" "\n" " \n" " color:rgb(30, 149, 198);\n" "\n" " \n" "\n" " }") self.label_3.setAlignment(Qt.AlignCenter) self.horizontalLayout_7.addWidget(self.label_3) self.toolButton = QToolButton(self.frame_for_start_button) self.toolButton.setObjectName(u"toolButton") self.toolButton.setStyleSheet(u"QToolButton{\n" " color:rgb(30, 149, 198);\n" " border: 2px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:1px;\n" "}\n" "QToolButton:hover{\n" "\n" "\n" "border-color:rgb(255, 37, 255);\n" "\n" "\n" "}") self.horizontalLayout_7.addWidget(self.toolButton) self.horizontalLayout_8.addLayout(self.horizontalLayout_7) self.horizontalSpacer_4 = QSpacerItem(190, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_8.addItem(self.horizontalSpacer_4) self.start_button = QPushButton(self.frame_for_start_button) self.start_button.setObjectName(u"start_button") self.start_button.setMinimumSize(QSize(75, 75)) font5 = QFont() font5.setFamily(u"Segoe UI Light") font5.setPointSize(28) self.start_button.setFont(font5) self.start_button.setStyleSheet(u"QPushButton{\n" " color:rgb(30, 149, 198);\n" " border: 2px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:10px;\n" "}\n" "QPushButton:hover{\n" "\n" "\n" "border-color:rgb(255, 37, 255);\n" "\n" "\n" "}") self.horizontalLayout_8.addWidget(self.start_button) self.verticalLayout_6.addWidget(self.frame_for_start_button) self.frame_for_progressbar = QFrame(self.frame_left_bottom) self.frame_for_progressbar.setObjectName(u"frame_for_progressbar") self.frame_for_progressbar.setFrameShape(QFrame.StyledPanel) self.frame_for_progressbar.setFrameShadow(QFrame.Raised) self.horizontalLayout_10 = QHBoxLayout(self.frame_for_progressbar) self.horizontalLayout_10.setObjectName(u"horizontalLayout_10") self.horizontalSpacer_5 = QSpacerItem(13, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_10.addItem(self.horizontalSpacer_5) self.horizontalLayout_9 = QHBoxLayout() self.horizontalLayout_9.setObjectName(u"horizontalLayout_9") self.label_progress = QLabel(self.frame_for_progressbar) self.label_progress.setObjectName(u"label_progress") self.label_progress.setFont(font2) self.label_progress.setStyleSheet(u"QLabel{\n" "\n" " color:rgb(30, 149, 198);\n" " \n" "\n" " }") self.label_progress.setAlignment(Qt.AlignCenter) self.horizontalLayout_9.addWidget(self.label_progress) self.progressBar = QProgressBar(self.frame_for_progressbar) self.progressBar.setObjectName(u"progressBar") self.progressBar.setMinimumSize(QSize(350, 20)) self.progressBar.setMaximumSize(QSize(450, 20)) font6 = QFont() font6.setFamily(u"Segoe UI") font6.setPointSize(9) self.progressBar.setFont(font6) self.progressBar.setStyleSheet(u"QProgressBar{\n" "\n" " \n" " color:rgb(30, 149, 198);\n" "\n" " border: 1px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:2px;\n" "}\n" "QProgressBar::chunk{\n" "\n" "border-radius:2px;\n" "\n" " background-color:rgb(30, 149, 198);\n" "}\n" "QProgressBar:hover{\n" "border-color:rgb(255, 37, 255);\n" "}") self.progressBar.setMaximum(100) self.progressBar.setValue(56) self.progressBar.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) self.progressBar.setTextVisible(True) self.progressBar.setInvertedAppearance(False) self.horizontalLayout_9.addWidget(self.progressBar) self.horizontalLayout_10.addLayout(self.horizontalLayout_9) self.verticalLayout_6.addWidget(self.frame_for_progressbar) self.verticalLayout_4.addWidget(self.frame_left_bottom) self.horizontalLayout.addWidget(self.frame_for_widgets) self.frame_for_textedit = QFrame(self.base) self.frame_for_textedit.setObjectName(u"frame_for_textedit") sizePolicy1 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.frame_for_textedit.sizePolicy().hasHeightForWidth()) self.frame_for_textedit.setSizePolicy(sizePolicy1) self.frame_for_textedit.setMinimumSize(QSize(30, 0)) self.frame_for_textedit.setMaximumSize(QSize(350, 16777215)) self.frame_for_textedit.setFrameShape(QFrame.StyledPanel) self.frame_for_textedit.setFrameShadow(QFrame.Raised) self.verticalLayout_2 = QVBoxLayout(self.frame_for_textedit) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setContentsMargins(-1, 0, 0, 0) self.terminal_output = QTextEdit(self.frame_for_textedit) self.terminal_output.setObjectName(u"terminal_output") self.terminal_output.setFont(font2) self.terminal_output.setStyleSheet( u"\n" "QTextEdit, QListView {\n" " color:rgb(255, 37, 255);\n" " background-color:rgb(40, 41, 65);\n" " border:3px solid black;\n" " border-radius:10px;\n" " border-color:rgb(30, 149, 198);\n" " background-attachment: scroll;\n" "}") self.verticalLayout_2.addWidget(self.terminal_output) self.horizontalLayout.addWidget(self.frame_for_textedit) self.verticalLayout.addWidget(self.base) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow) # setupUi def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QCoreApplication.translate("MainWindow", u"MainWindow", None)) self.select_zip_button.setText( QCoreApplication.translate("MainWindow", u"Zip", None)) self.label.setText( QCoreApplication.translate("MainWindow", u"Video Name :", None)) self.same_as_zip_name_checkbox.setText( QCoreApplication.translate("MainWindow", u"Same as Zip name", None)) self.label_2.setText( QCoreApplication.translate("MainWindow", u"Algorithm", None)) self.algorithm_combobox.setItemText( 0, QCoreApplication.translate("MainWindow", u"Select", None)) self.algorithm_combobox.setItemText( 1, QCoreApplication.translate("MainWindow", u"Very Fast - Good", None)) self.algorithm_combobox.setItemText( 2, QCoreApplication.translate("MainWindow", u"Fast - Better", None)) self.algorithm_combobox.setItemText( 3, QCoreApplication.translate("MainWindow", u"Slow - Best", None)) self.label_3.setText( QCoreApplication.translate("MainWindow", u"Video Location", None)) self.toolButton.setText( QCoreApplication.translate("MainWindow", u"...", None)) self.start_button.setText( QCoreApplication.translate("MainWindow", u"Start", None)) self.label_progress.setText( QCoreApplication.translate("MainWindow", u"Progress :", None)) self.terminal_output.setHtml( QCoreApplication.translate( "MainWindow", u"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'Arial Rounded MT Bold'; font-size:10pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:'Segoe UI Light'; color:#f07bff;\">Zipvy Ready...</span></p></body></html>", None))