From afbd4c995f14aabe1562e523783d820a6ba5a1c9 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Thu, 27 Jan 2022 12:22:20 +0200 Subject: [PATCH] GUI development --- horsygui.py | 4 ++ modules/gui.py | 82 +++++++++++++++++++++++ uis/horsy_download.py | 102 +++++++++++++++++++++++++++++ uis/horsy_download.ui | 148 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 336 insertions(+) create mode 100644 uis/horsy_download.py create mode 100644 uis/horsy_download.ui diff --git a/horsygui.py b/horsygui.py index 89a1545..c323b0d 100644 --- a/horsygui.py +++ b/horsygui.py @@ -19,6 +19,10 @@ UiMainWindow = QtWidgets.QMainWindow() login_ui = gui.Ui_LoginWindow() login_ui.setupUi(UiMainWindow) +UiDownloadWindow = QtWidgets.QMainWindow() +download_ui = gui.Ui_DownloadWindow() +download_ui.setupUi(UiDownloadWindow) + # Functions def refresh_gui(): diff --git a/modules/gui.py b/modules/gui.py index 289e367..356d4b5 100644 --- a/modules/gui.py +++ b/modules/gui.py @@ -747,6 +747,88 @@ class Ui_LoginWindow(object): self.password_box.setPlaceholderText(_translate("MainWindow", "Password")) +class Ui_DownloadWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(682, 184) + MainWindow.setMinimumSize(QtCore.QSize(682, 184)) + MainWindow.setMaximumSize(QtCore.QSize(682, 184)) + MainWindow.setStyleSheet("QWidget{\n" + " background-color: rgb(30, 30, 30);\n" + "}\n" + "") + self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.progressBar_1 = QtWidgets.QProgressBar(self.centralwidget) + self.progressBar_1.setGeometry(QtCore.QRect(30, 80, 621, 23)) + self.progressBar_1.setStyleSheet("QProgressBar { \n" + "font: 14pt;\n" + "color: rgb(200, 200, 200);\n" + "border: 2px solid grey;\n" + "text-align: center;\n" + "background-color: rgb(74, 76, 83);\n" + "}\n" + "QProgressBar::chunk {\n" + " background-color: rgb(54, 99, 197);\n" + " margin: 0.5px;\n" + "}") + self.progressBar_1.setProperty("value", 0) + self.progressBar_1.setObjectName("progressBar_1") + self.logs_box = QtWidgets.QTextBrowser(self.centralwidget) + self.logs_box.setGeometry(QtCore.QRect(30, 20, 621, 41)) + self.logs_box.setStyleSheet("background-color: rgb(74, 76, 83);\n" + "border-radius: 5px; \n" + "color: rgb(242, 242, 242);") + self.logs_box.setAcceptRichText(False) + self.logs_box.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) + self.logs_box.setObjectName("logs_box") + self.progressBar_2 = QtWidgets.QProgressBar(self.centralwidget) + self.progressBar_2.setGeometry(QtCore.QRect(30, 110, 621, 23)) + self.progressBar_2.setStyleSheet("QProgressBar { \n" + "font: 14pt;\n" + "color: rgb(200, 200, 200);\n" + "border: 2px solid grey;\n" + "text-align: center;\n" + "background-color: rgb(74, 76, 83);\n" + "}\n" + "QProgressBar::chunk {\n" + " background-color: rgb(54, 99, 197);\n" + " margin: 0.5px;\n" + "}") + self.progressBar_2.setProperty("value", 0) + self.progressBar_2.setObjectName("progressBar_2") + self.progressBar_3 = QtWidgets.QProgressBar(self.centralwidget) + self.progressBar_3.setGeometry(QtCore.QRect(30, 140, 621, 23)) + self.progressBar_3.setStyleSheet("QProgressBar { \n" + " font: 14pt;\n" + " color: rgb(200, 200, 200);\n" + " border: 2px solid grey;\n" + " text-align: center;\n" + " background-color: rgb(74, 76, 83);\n" + "}\n" + "QProgressBar::chunk {\n" + " background-color: rgb(54, 99, 197);\n" + " margin: 0.5px;\n" + "}") + self.progressBar_3.setProperty("value", 0) + self.progressBar_3.setObjectName("progressBar_3") + MainWindow.setCentralWidget(self.centralwidget) + + self.retranslateUi(MainWindow) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): + _translate = QtCore.QCoreApplication.translate + MainWindow.setWindowTitle(_translate("MainWindow", "Downloading")) + self.logs_box.setHtml(_translate("MainWindow", + "\n" + "\n" + "


")) + self.logs_box.setPlaceholderText(_translate("MainWindow", "Logs")) + + if __name__ == "__main__": import sys diff --git a/uis/horsy_download.py b/uis/horsy_download.py new file mode 100644 index 0000000..00efcb6 --- /dev/null +++ b/uis/horsy_download.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'D:\RAZNOE\prgrming\horsy\Source\client\uis\horsy_download.ui' +# +# Created by: PyQt5 UI code generator 5.15.6 +# +# WARNING: Any manual changes made to this file will be lost when pyuic5 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(682, 184) + MainWindow.setMinimumSize(QtCore.QSize(682, 184)) + MainWindow.setMaximumSize(QtCore.QSize(682, 184)) + MainWindow.setStyleSheet("QWidget{\n" +" background-color: rgb(30, 30, 30);\n" +"}\n" +"") + self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.progressBar_1 = QtWidgets.QProgressBar(self.centralwidget) + self.progressBar_1.setGeometry(QtCore.QRect(30, 80, 621, 23)) + self.progressBar_1.setStyleSheet("QProgressBar { \n" +"font: 14pt;\n" +"color: rgb(200, 200, 200);\n" +"border: 2px solid grey;\n" +"text-align: center;\n" +"background-color: rgb(74, 76, 83);\n" +"}\n" +"QProgressBar::chunk {\n" +" background-color: rgb(54, 99, 197);\n" +" margin: 0.5px;\n" +"}") + self.progressBar_1.setProperty("value", 0) + self.progressBar_1.setObjectName("progressBar_1") + self.logs_box = QtWidgets.QTextBrowser(self.centralwidget) + self.logs_box.setGeometry(QtCore.QRect(30, 20, 621, 41)) + self.logs_box.setStyleSheet("background-color: rgb(74, 76, 83);\n" +"border-radius: 5px; \n" +"color: rgb(242, 242, 242);") + self.logs_box.setAcceptRichText(False) + self.logs_box.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) + self.logs_box.setObjectName("logs_box") + self.progressBar_2 = QtWidgets.QProgressBar(self.centralwidget) + self.progressBar_2.setGeometry(QtCore.QRect(30, 110, 621, 23)) + self.progressBar_2.setStyleSheet("QProgressBar { \n" +"font: 14pt;\n" +"color: rgb(200, 200, 200);\n" +"border: 2px solid grey;\n" +"text-align: center;\n" +"background-color: rgb(74, 76, 83);\n" +"}\n" +"QProgressBar::chunk {\n" +" background-color: rgb(54, 99, 197);\n" +" margin: 0.5px;\n" +"}") + self.progressBar_2.setProperty("value", 0) + self.progressBar_2.setObjectName("progressBar_2") + self.progressBar_3 = QtWidgets.QProgressBar(self.centralwidget) + self.progressBar_3.setGeometry(QtCore.QRect(30, 140, 621, 23)) + self.progressBar_3.setStyleSheet("QProgressBar { \n" +" font: 14pt;\n" +" color: rgb(200, 200, 200);\n" +" border: 2px solid grey;\n" +" text-align: center;\n" +" background-color: rgb(74, 76, 83);\n" +"}\n" +"QProgressBar::chunk {\n" +" background-color: rgb(54, 99, 197);\n" +" margin: 0.5px;\n" +"}") + self.progressBar_3.setProperty("value", 0) + self.progressBar_3.setObjectName("progressBar_3") + MainWindow.setCentralWidget(self.centralwidget) + + self.retranslateUi(MainWindow) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): + _translate = QtCore.QCoreApplication.translate + MainWindow.setWindowTitle(_translate("MainWindow", "Downloading")) + self.logs_box.setHtml(_translate("MainWindow", "\n" +"\n" +"


")) + self.logs_box.setPlaceholderText(_translate("MainWindow", "Logs")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + MainWindow = QtWidgets.QMainWindow() + ui = Ui_MainWindow() + ui.setupUi(MainWindow) + MainWindow.show() + sys.exit(app.exec_()) diff --git a/uis/horsy_download.ui b/uis/horsy_download.ui new file mode 100644 index 0000000..1b6ff41 --- /dev/null +++ b/uis/horsy_download.ui @@ -0,0 +1,148 @@ + + + MainWindow + + + + 0 + 0 + 682 + 184 + + + + + 682 + 184 + + + + + 682 + 184 + + + + Downloading + + + QWidget{ + background-color: rgb(30, 30, 30); +} + + + + + + + 30 + 80 + 621 + 23 + + + + QProgressBar { +font: 14pt; +color: rgb(200, 200, 200); +border: 2px solid grey; +text-align: center; +background-color: rgb(74, 76, 83); +} +QProgressBar::chunk { + background-color: rgb(54, 99, 197); + margin: 0.5px; +} + + + 0 + + + + + + 30 + 20 + 621 + 41 + + + + background-color: rgb(74, 76, 83); +border-radius: 5px; +color: rgb(242, 242, 242); + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + false + + + Qt::NoTextInteraction + + + Logs + + + + + + 30 + 110 + 621 + 23 + + + + QProgressBar { +font: 14pt; +color: rgb(200, 200, 200); +border: 2px solid grey; +text-align: center; +background-color: rgb(74, 76, 83); +} +QProgressBar::chunk { + background-color: rgb(54, 99, 197); + margin: 0.5px; +} + + + 0 + + + + + + 30 + 140 + 621 + 23 + + + + QProgressBar { + font: 14pt; + color: rgb(200, 200, 200); + border: 2px solid grey; + text-align: center; + background-color: rgb(74, 76, 83); +} +QProgressBar::chunk { + background-color: rgb(54, 99, 197); + margin: 0.5px; +} + + + 0 + + + + + + +