Development of daun-builder

This commit is contained in:
BarsTiger
2022-04-09 21:01:54 +03:00
parent eb8c9313ba
commit 0d8cbd0a71
7 changed files with 2699 additions and 0 deletions

5
ui/images.qrc Normal file
View File

@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="img">
<file>logo.ico</file>
</qresource>
</RCC>

2104
ui/images_rc.py Normal file

File diff suppressed because it is too large Load Diff

BIN
ui/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

129
ui/main.py Normal file
View File

@@ -0,0 +1,129 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'main.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(566, 466)
MainWindow.setMinimumSize(QtCore.QSize(566, 466))
MainWindow.setMaximumSize(QtCore.QSize(566, 466))
MainWindow.setFocusPolicy(QtCore.Qt.TabFocus)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/img/logo.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setWindowOpacity(0.99)
MainWindow.setStyleSheet("background-color: #202020;\n"
"color: #ffffff;")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.build_button = QtWidgets.QPushButton(self.centralwidget)
self.build_button.setGeometry(QtCore.QRect(450, 430, 101, 25))
self.build_button.setMouseTracking(False)
self.build_button.setTabletTracking(False)
self.build_button.setFocusPolicy(QtCore.Qt.TabFocus)
self.build_button.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
self.build_button.setStyleSheet("QPushButton {\n"
" color: white;\n"
" border-width: 1px;\n"
" border-radius:6px;\n"
" border-style: solid;\n"
" border-color: #303030;\n"
" background-color: #2c2d2e;\n"
" font: 10pt \"Segoe UI\";\n"
"}\n"
"QPushButton:hover{\n"
" border-width: 2px;\n"
" background-color: #323232;\n"
"}\n"
"QPushButton:pressed{\n"
" background-color: #262728;\n"
"}\n"
"QPushButton:disabled{\n"
" background-color: #434343;\n"
" border-color: #0000;\n"
"}")
self.build_button.setAutoDefault(False)
self.build_button.setFlat(False)
self.build_button.setObjectName("build_button")
self.modules_list = QtWidgets.QListWidget(self.centralwidget)
self.modules_list.setGeometry(QtCore.QRect(10, 70, 270, 350))
self.modules_list.setStyleSheet("border-width: 1px;\n"
"border-radius:15px;\n"
"border-style: solid;\n"
"border-color: #303030;\n"
"padding: 10px;\n"
"background-color: #242424;\n"
"font: 10pt \"Segoe UI\";")
self.modules_list.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.modules_list.setFrameShadow(QtWidgets.QFrame.Raised)
self.modules_list.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored)
self.modules_list.setDragEnabled(False)
self.modules_list.setMovement(QtWidgets.QListView.Static)
self.modules_list.setUniformItemSizes(False)
self.modules_list.setObjectName("modules_list")
self.desc_list = QtWidgets.QTextBrowser(self.centralwidget)
self.desc_list.setGeometry(QtCore.QRect(285, 70, 270, 350))
self.desc_list.setStyleSheet("border-width: 1px;\n"
"border-radius:15px;\n"
"border-style: solid;\n"
"border-color: #303030;\n"
"padding: 10px;\n"
"background-color: #242424;\n"
"font: 10pt \"Segoe UI\";")
self.desc_list.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.desc_list.setFrameShadow(QtWidgets.QFrame.Raised)
self.desc_list.setAcceptRichText(True)
self.desc_list.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
self.desc_list.setObjectName("desc_list")
self.daun_builder_logo = QtWidgets.QTextBrowser(self.centralwidget)
self.daun_builder_logo.setGeometry(QtCore.QRect(10, 10, 545, 50))
self.daun_builder_logo.setStyleSheet("border-width: 1px;\n"
"border-radius:15px;\n"
"border-style: solid;\n"
"border-color: #303030;\n"
"background-color: #242424;\n"
"font: 20pt \"Segoe UI\";")
self.daun_builder_logo.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.daun_builder_logo.setFrameShadow(QtWidgets.QFrame.Raised)
self.daun_builder_logo.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
self.daun_builder_logo.setObjectName("daun_builder_logo")
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "daun builder"))
self.build_button.setText(_translate("MainWindow", "Build it"))
self.desc_list.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:\'Segoe UI\'; font-size:10pt; 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.daun_builder_logo.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:\'Segoe UI\'; font-size:20pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">daun builder</p></body></html>"))
import images_rc
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_())

429
ui/main.ui Normal file
View File

@@ -0,0 +1,429 @@
<?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>566</width>
<height>466</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>566</width>
<height>466</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>566</width>
<height>466</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="windowTitle">
<string>daun builder</string>
</property>
<property name="windowIcon">
<iconset resource="images.qrc">
<normaloff>:/img/logo.ico</normaloff>:/img/logo.ico</iconset>
</property>
<property name="windowOpacity">
<double>0.990000000000000</double>
</property>
<property name="styleSheet">
<string notr="true">background-color: #202020;
color: #ffffff;</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QPushButton" name="build_button">
<property name="geometry">
<rect>
<x>450</x>
<y>430</y>
<width>101</width>
<height>25</height>
</rect>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="tabletTracking">
<bool>false</bool>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
color: white;
border-width: 1px;
border-radius:6px;
border-style: solid;
border-color: #303030;
background-color: #2c2d2e;
font: 10pt &quot;Segoe UI&quot;;
}
QPushButton:hover{
border-width: 2px;
background-color: #323232;
}
QPushButton:pressed{
background-color: #262728;
}
QPushButton:disabled{
background-color: #434343;
border-color: #0000;
}</string>
</property>
<property name="text">
<string>Build it</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
<widget class="QListWidget" name="modules_list">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>270</width>
<height>310</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QListWidget {
border-width: 1px;
border-radius:15px;
border-style: solid;
border-color: #303030;
padding: 10px;
background-color: #242424;
font: 10pt &quot;Segoe UI&quot;;
}
QScrollBar {
background: #959595;
width: 8px;
}
QScrollBar::handle:vertical {
background: #303030;
min-height: 20px;
}
</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustIgnored</enum>
</property>
<property name="dragEnabled">
<bool>false</bool>
</property>
<property name="movement">
<enum>QListView::Static</enum>
</property>
<property name="uniformItemSizes">
<bool>false</bool>
</property>
</widget>
<widget class="QTextBrowser" name="desc_list">
<property name="geometry">
<rect>
<x>285</x>
<y>70</y>
<width>270</width>
<height>310</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-width: 1px;
border-radius:15px;
border-style: solid;
border-color: #303030;
padding: 10px;
background-color: #242424;
font: 10pt &quot;Segoe UI&quot;;</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</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:'Segoe UI'; font-size:10pt; 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>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
<widget class="QTextBrowser" name="daun_builder_logo">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>545</width>
<height>50</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-width: 1px;
border-radius:15px;
border-style: solid;
border-color: #303030;
background-color: #242424;
font: 20pt &quot;Segoe UI&quot;;</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</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:'Segoe UI'; font-size:20pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;daun builder&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
<widget class="QPushButton" name="choose_button">
<property name="geometry">
<rect>
<x>450</x>
<y>390</y>
<width>101</width>
<height>25</height>
</rect>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="tabletTracking">
<bool>false</bool>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
color: white;
border-width: 1px;
border-radius:6px;
border-style: solid;
border-color: #303030;
background-color: #2c2d2e;
font: 10pt &quot;Segoe UI&quot;;
}
QPushButton:hover{
border-width: 2px;
background-color: #323232;
}
QPushButton:pressed{
background-color: #262728;
}
QPushButton:disabled{
background-color: #434343;
border-color: #0000;
}</string>
</property>
<property name="text">
<string>Choose</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
<widget class="QLineEdit" name="path_box">
<property name="geometry">
<rect>
<x>285</x>
<y>390</y>
<width>160</width>
<height>25</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-width: 1px;
border-radius:5px;
border-style: solid;
border-color: #303030;
background-color: #242424;
font: 10pt &quot;Segoe UI&quot;;</string>
</property>
</widget>
<widget class="QPushButton" name="choose_button_2">
<property name="geometry">
<rect>
<x>285</x>
<y>430</y>
<width>160</width>
<height>25</height>
</rect>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="tabletTracking">
<bool>false</bool>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
color: white;
border-width: 1px;
border-radius:6px;
border-style: solid;
border-color: #303030;
background-color: #2c2d2e;
font: 10pt &quot;Segoe UI&quot;;
}
QPushButton:hover{
border-width: 2px;
background-color: #323232;
}
QPushButton:pressed{
background-color: #262728;
}
QPushButton:disabled{
background-color: #434343;
border-color: #0000;
}</string>
</property>
<property name="text">
<string>Choose custom icon</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
<widget class="QRadioButton" name="is_pyinstaller">
<property name="geometry">
<rect>
<x>20</x>
<y>415</y>
<width>80</width>
<height>15</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 10pt &quot;Segoe UI&quot;;</string>
</property>
<property name="text">
<string>pyinstaller</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="is_nuitka">
<property name="geometry">
<rect>
<x>20</x>
<y>435</y>
<width>80</width>
<height>15</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 10pt &quot;Segoe UI&quot;;</string>
</property>
<property name="text">
<string>nuitka</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>390</y>
<width>90</width>
<height>25</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 10pt &quot;Segoe UI&quot;;</string>
</property>
<property name="text">
<string>Choose builder</string>
</property>
</widget>
<widget class="QWidget" name="builder_bg" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>389</y>
<width>121</width>
<height>71</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-width: 1px;
border-radius:15px;
border-style: solid;
border-color: #303030;
padding: 10px;
background-color: #242424;
font: 10pt &quot;Segoe UI&quot;;</string>
</property>
</widget>
<zorder>builder_bg</zorder>
<zorder>build_button</zorder>
<zorder>modules_list</zorder>
<zorder>desc_list</zorder>
<zorder>daun_builder_logo</zorder>
<zorder>choose_button</zorder>
<zorder>path_box</zorder>
<zorder>choose_button_2</zorder>
<zorder>is_pyinstaller</zorder>
<zorder>is_nuitka</zorder>
<zorder>label</zorder>
</widget>
</widget>
<resources>
<include location="images.qrc"/>
</resources>
<connections/>
</ui>