GUI development

This commit is contained in:
BarsTiger
2022-01-27 12:22:20 +02:00
parent 1b5eda340f
commit afbd4c995f
4 changed files with 336 additions and 0 deletions

View File

@@ -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():

View File

@@ -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",
"<!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:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<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>"))
self.logs_box.setPlaceholderText(_translate("MainWindow", "Logs"))
if __name__ == "__main__":
import sys

102
uis/horsy_download.py Normal file
View File

@@ -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", "<!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:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<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>"))
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_())

148
uis/horsy_download.ui Normal file
View File

@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>682</width>
<height>184</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>682</width>
<height>184</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>682</width>
<height>184</height>
</size>
</property>
<property name="windowTitle">
<string>Downloading</string>
</property>
<property name="styleSheet">
<string notr="true">QWidget{
background-color: rgb(30, 30, 30);
}
</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QProgressBar" name="progressBar_1">
<property name="geometry">
<rect>
<x>30</x>
<y>80</y>
<width>621</width>
<height>23</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">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;
}</string>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
<widget class="QTextBrowser" name="logs_box">
<property name="geometry">
<rect>
<x>30</x>
<y>20</y>
<width>621</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(74, 76, 83);
border-radius: 5px;
color: rgb(242, 242, 242);</string>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
<property name="placeholderText">
<string>Logs</string>
</property>
</widget>
<widget class="QProgressBar" name="progressBar_2">
<property name="geometry">
<rect>
<x>30</x>
<y>110</y>
<width>621</width>
<height>23</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">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;
}</string>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
<widget class="QProgressBar" name="progressBar_3">
<property name="geometry">
<rect>
<x>30</x>
<y>140</y>
<width>621</width>
<height>23</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">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;
}</string>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>