Package editing

This commit is contained in:
BarsTiger
2022-02-04 22:26:14 +02:00
parent 438db8b7a0
commit b0bfcccf03
7 changed files with 585 additions and 33 deletions

View File

@@ -385,6 +385,9 @@ QPushButton:disabled{
<height>411</height>
</rect>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="styleSheet">
<string notr="true">QTableWidget
{
@@ -423,10 +426,10 @@ border-radius: 45px;
<bool>true</bool>
</property>
<property name="rowCount">
<number>1</number>
<number>0</number>
</property>
<property name="columnCount">
<number>4</number>
<number>0</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
@@ -449,21 +452,6 @@ border-radius: 45px;
<attribute name="verticalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<row/>
<column/>
<column/>
<column/>
<column/>
<item row="0" column="0">
<property name="text">
<string/>
</property>
</item>
<item row="0" column="1">
<property name="text">
<string/>
</property>
</item>
</widget>
<widget class="QTextBrowser" name="manage_packages_message">
<property name="geometry">

123
uis/horsy_package.py Normal file
View File

@@ -0,0 +1,123 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\RAZNOE\prgrming\horsy\Source\client\uis\horsy_package.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(331, 433)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setStyleSheet("QWidget{\n"
" background-color: rgb(30, 30, 30);\n"
"}\n"
"")
self.centralwidget.setObjectName("centralwidget")
self.packagename_box = QtWidgets.QLineEdit(self.centralwidget)
self.packagename_box.setGeometry(QtCore.QRect(20, 20, 151, 31))
self.packagename_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
"border-radius: 5px; \n"
"color: rgb(242, 242, 242);")
self.packagename_box.setText("")
self.packagename_box.setReadOnly(True)
self.packagename_box.setObjectName("packagename_box")
self.main_exe_box = QtWidgets.QLineEdit(self.centralwidget)
self.main_exe_box.setGeometry(QtCore.QRect(20, 305, 291, 31))
self.main_exe_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
"border-radius: 5px; \n"
"color: rgb(242, 242, 242);")
self.main_exe_box.setObjectName("main_exe_box")
self.source_url_box = QtWidgets.QLineEdit(self.centralwidget)
self.source_url_box.setGeometry(QtCore.QRect(20, 200, 291, 31))
self.source_url_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
"border-radius: 5px; \n"
"color: rgb(242, 242, 242);")
self.source_url_box.setObjectName("source_url_box")
self.url_of_exe_box = QtWidgets.QLineEdit(self.centralwidget)
self.url_of_exe_box.setGeometry(QtCore.QRect(20, 165, 291, 31))
self.url_of_exe_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
"border-radius: 5px; \n"
"color: rgb(242, 242, 242);")
self.url_of_exe_box.setObjectName("url_of_exe_box")
self.dependency_url_box = QtWidgets.QLineEdit(self.centralwidget)
self.dependency_url_box.setGeometry(QtCore.QRect(20, 235, 291, 31))
self.dependency_url_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
"border-radius: 5px; \n"
"color: rgb(242, 242, 242);")
self.dependency_url_box.setObjectName("dependency_url_box")
self.dependency_run_box = QtWidgets.QLineEdit(self.centralwidget)
self.dependency_run_box.setGeometry(QtCore.QRect(20, 270, 291, 31))
self.dependency_run_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
"border-radius: 5px; \n"
"color: rgb(242, 242, 242);")
self.dependency_run_box.setObjectName("dependency_run_box")
self.package_desc_box = QtWidgets.QTextBrowser(self.centralwidget)
self.package_desc_box.setGeometry(QtCore.QRect(20, 60, 256, 101))
self.package_desc_box.setStyleSheet("background-color: rgb(74, 76, 83);\n"
"border-radius: 5px; \n"
"color: rgb(242, 242, 242);")
self.package_desc_box.setAcceptRichText(False)
self.package_desc_box.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByKeyboard|QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextBrowserInteraction|QtCore.Qt.TextEditable|QtCore.Qt.TextEditorInteraction|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
self.package_desc_box.setObjectName("package_desc_box")
self.update_button = QtWidgets.QPushButton(self.centralwidget)
self.update_button.setEnabled(True)
self.update_button.setGeometry(QtCore.QRect(20, 360, 291, 50))
self.update_button.setMinimumSize(QtCore.QSize(0, 50))
self.update_button.setStyleSheet("QPushButton {\n"
" color: rgb(204, 204, 204);\n"
" border-width: 1px;\n"
" border-radius:6px;\n"
" border-style: solid;\n"
" background-color: rgb(28, 30, 33);\n"
" border-color: rgb(66, 143, 225);\n"
"}\n"
"QPushButton:hover{\n"
" border-width: 2px;\n"
"}\n"
"QPushButton:pressed{\n"
" background-color: rgb(50, 60, 63);\n"
"}\n"
"QPushButton:disabled{\n"
" border-width: 0px;\n"
" background-color: rgb(92, 99, 109);\n"
"}")
self.update_button.setObjectName("update_button")
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "horsy - editing package"))
self.packagename_box.setPlaceholderText(_translate("MainWindow", "Editing package"))
self.main_exe_box.setPlaceholderText(_translate("MainWindow", "Main executable command (file.exe, python main.py, etc)"))
self.source_url_box.setPlaceholderText(_translate("MainWindow", "Url of source (project on GitHub, source archive)"))
self.url_of_exe_box.setPlaceholderText(_translate("MainWindow", "Url of executable (ends on .exe or .zip)"))
self.dependency_url_box.setPlaceholderText(_translate("MainWindow", "Dependency URL (installer in .exe)"))
self.dependency_run_box.setPlaceholderText(_translate("MainWindow", "Dependency run (run this during installation)"))
self.package_desc_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.package_desc_box.setPlaceholderText(_translate("MainWindow", "Package description. It should be a short text under 256 characters"))
self.update_button.setText(_translate("MainWindow", "Update"))
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_())

214
uis/horsy_package.ui Normal file
View File

@@ -0,0 +1,214 @@
<?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>331</width>
<height>433</height>
</rect>
</property>
<property name="windowTitle">
<string>horsy - editing package</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="styleSheet">
<string notr="true">QWidget{
background-color: rgb(30, 30, 30);
}
</string>
</property>
<widget class="QLineEdit" name="packagename_box">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>151</width>
<height>31</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="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="placeholderText">
<string>Editing package</string>
</property>
</widget>
<widget class="QLineEdit" name="main_exe_box">
<property name="geometry">
<rect>
<x>20</x>
<y>305</y>
<width>291</width>
<height>31</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="placeholderText">
<string>Main executable command (file.exe, python main.py, etc)</string>
</property>
</widget>
<widget class="QLineEdit" name="source_url_box">
<property name="geometry">
<rect>
<x>20</x>
<y>200</y>
<width>291</width>
<height>31</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="placeholderText">
<string>Url of source (project on GitHub, source archive)</string>
</property>
</widget>
<widget class="QLineEdit" name="url_of_exe_box">
<property name="geometry">
<rect>
<x>20</x>
<y>165</y>
<width>291</width>
<height>31</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="placeholderText">
<string>Url of executable (ends on .exe or .zip)</string>
</property>
</widget>
<widget class="QLineEdit" name="dependency_url_box">
<property name="geometry">
<rect>
<x>20</x>
<y>235</y>
<width>291</width>
<height>31</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="placeholderText">
<string>Dependency URL (installer in .exe)</string>
</property>
</widget>
<widget class="QLineEdit" name="dependency_run_box">
<property name="geometry">
<rect>
<x>20</x>
<y>270</y>
<width>291</width>
<height>31</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="placeholderText">
<string>Dependency run (run this during installation)</string>
</property>
</widget>
<widget class="QTextBrowser" name="package_desc_box">
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>256</width>
<height>101</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::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
<property name="placeholderText">
<string>Package description. It should be a short text under 256 characters</string>
</property>
</widget>
<widget class="QPushButton" name="update_button">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>360</y>
<width>291</width>
<height>50</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
color: rgb(204, 204, 204);
border-width: 1px;
border-radius:6px;
border-style: solid;
background-color: rgb(28, 30, 33);
border-color: rgb(66, 143, 225);
}
QPushButton:hover{
border-width: 2px;
}
QPushButton:pressed{
background-color: rgb(50, 60, 63);
}
QPushButton:disabled{
border-width: 0px;
background-color: rgb(92, 99, 109);
}</string>
</property>
<property name="text">
<string>Update</string>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>