new project for personal toolbox

This commit is contained in:
2025-09-09 16:22:57 +08:00
parent 4bacbb7bb8
commit 648dedb611
33 changed files with 1555 additions and 20 deletions

0
gui/codes/ui/__init__.py Normal file
View File

85
gui/codes/ui/app.py Normal file
View File

@@ -0,0 +1,85 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'app.ui'
##
## Created by: Qt User Interface Compiler version 6.9.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
QCursor, QFont, QFontDatabase, QGradient,
QIcon, QImage, QKeySequence, QLinearGradient,
QPainter, QPalette, QPixmap, QRadialGradient,
QTransform)
from PySide6.QtWidgets import (QApplication, QMainWindow, QMenu, QMenuBar,
QSizePolicy, QStatusBar, QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(1100, 550)
MainWindow.setMinimumSize(QSize(1100, 550))
font = QFont()
font.setFamilies([u"Consolas"])
font.setPointSize(12)
MainWindow.setFont(font)
self.actionExit = QAction(MainWindow)
self.actionExit.setObjectName(u"actionExit")
self.action = QAction(MainWindow)
self.action.setObjectName(u"action")
self.actionExit_2 = QAction(MainWindow)
self.actionExit_2.setObjectName(u"actionExit_2")
self.action_2 = QAction(MainWindow)
self.action_2.setObjectName(u"action_2")
self.action_3 = QAction(MainWindow)
self.action_3.setObjectName(u"action_3")
self.action_4 = QAction(MainWindow)
self.action_4.setObjectName(u"action_4")
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(MainWindow)
self.menubar.setObjectName(u"menubar")
self.menubar.setGeometry(QRect(0, 0, 1100, 33))
self.menu = QMenu(self.menubar)
self.menu.setObjectName(u"menu")
self.menu_2 = QMenu(self.menubar)
self.menu_2.setObjectName(u"menu_2")
self.menu_3 = QMenu(self.menubar)
self.menu_3.setObjectName(u"menu_3")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)
self.menubar.addAction(self.menu.menuAction())
self.menubar.addAction(self.menu_3.menuAction())
self.menubar.addAction(self.menu_2.menuAction())
self.menu.addAction(self.action_4)
self.menu.addAction(self.action_3)
self.menu_2.addAction(self.action_2)
self.retranslateUi(MainWindow)
QMetaObject.connectSlotsByName(MainWindow)
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Toolbox", None))
self.actionExit.setText(QCoreApplication.translate("MainWindow", u"Exit", None))
self.action.setText(QCoreApplication.translate("MainWindow", u"\u5173\u4e8e", None))
self.actionExit_2.setText(QCoreApplication.translate("MainWindow", u"Exit", None))
self.action_2.setText(QCoreApplication.translate("MainWindow", u"\u5173\u4e8e", None))
self.action_3.setText(QCoreApplication.translate("MainWindow", u"\u9000\u51fa", None))
self.action_4.setText(QCoreApplication.translate("MainWindow", u"\u8bbe\u7f6e", None))
self.menu.setTitle(QCoreApplication.translate("MainWindow", u"\u6587\u4ef6", None))
self.menu_2.setTitle(QCoreApplication.translate("MainWindow", u"\u5e2e\u52a9", None))
self.menu_3.setTitle(QCoreApplication.translate("MainWindow", u"\u65e5\u5fd7", None))
# retranslateUi

145
gui/codes/ui/login.py Normal file
View File

@@ -0,0 +1,145 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'login.ui'
##
## Created by: Qt User Interface Compiler version 6.9.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QFormLayout, QHBoxLayout, QLabel,
QLineEdit, QPushButton, QSizePolicy, QVBoxLayout,
QWidget)
class Ui_login(object):
def setupUi(self, login):
if not login.objectName():
login.setObjectName(u"login")
login.resize(450, 150)
sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(login.sizePolicy().hasHeightForWidth())
login.setSizePolicy(sizePolicy)
login.setMinimumSize(QSize(450, 150))
login.setMaximumSize(QSize(450, 150))
self.verticalLayout_3 = QVBoxLayout(login)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.verticalLayout_2 = QVBoxLayout()
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.lb_logo = QLabel(login)
self.lb_logo.setObjectName(u"lb_logo")
self.lb_logo.setMinimumSize(QSize(100, 100))
self.lb_logo.setMaximumSize(QSize(105, 105))
self.lb_logo.setScaledContents(True)
self.lb_logo.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.lb_logo.setMargin(0)
self.lb_logo.setIndent(-1)
self.verticalLayout_2.addWidget(self.lb_logo)
self.lb_none = QLabel(login)
self.lb_none.setObjectName(u"lb_none")
self.lb_none.setMinimumSize(QSize(0, 40))
self.verticalLayout_2.addWidget(self.lb_none)
self.horizontalLayout_2.addLayout(self.verticalLayout_2)
self.verticalLayout = QVBoxLayout()
self.verticalLayout.setObjectName(u"verticalLayout")
self.formLayout = QFormLayout()
self.formLayout.setObjectName(u"formLayout")
self.formLayout.setLabelAlignment(Qt.AlignmentFlag.AlignCenter)
self.formLayout.setFormAlignment(Qt.AlignmentFlag.AlignCenter)
self.formLayout.setContentsMargins(30, 15, 30, 15)
self.lb_username = QLabel(login)
self.lb_username.setObjectName(u"lb_username")
font = QFont()
font.setFamilies([u"Consolas"])
font.setPointSize(12)
font.setItalic(True)
self.lb_username.setFont(font)
self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.lb_username)
self.le_username = QLineEdit(login)
self.le_username.setObjectName(u"le_username")
font1 = QFont()
font1.setFamilies([u"Consolas"])
font1.setPointSize(12)
self.le_username.setFont(font1)
self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.le_username)
self.lb_password = QLabel(login)
self.lb_password.setObjectName(u"lb_password")
self.lb_password.setFont(font)
self.formLayout.setWidget(1, QFormLayout.ItemRole.LabelRole, self.lb_password)
self.le_password = QLineEdit(login)
self.le_password.setObjectName(u"le_password")
self.le_password.setFont(font1)
self.le_password.setEchoMode(QLineEdit.EchoMode.Password)
self.formLayout.setWidget(1, QFormLayout.ItemRole.FieldRole, self.le_password)
self.verticalLayout.addLayout(self.formLayout)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setContentsMargins(40, 0, 40, 20)
self.pb_login = QPushButton(login)
self.pb_login.setObjectName(u"pb_login")
font2 = QFont()
font2.setFamilies([u"Consolas"])
font2.setPointSize(12)
font2.setBold(True)
self.pb_login.setFont(font2)
self.horizontalLayout.addWidget(self.pb_login)
self.pb_cancel = QPushButton(login)
self.pb_cancel.setObjectName(u"pb_cancel")
self.pb_cancel.setFont(font2)
self.horizontalLayout.addWidget(self.pb_cancel)
self.verticalLayout.addLayout(self.horizontalLayout)
self.horizontalLayout_2.addLayout(self.verticalLayout)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
self.retranslateUi(login)
QMetaObject.connectSlotsByName(login)
# setupUi
def retranslateUi(self, login):
login.setWindowTitle(QCoreApplication.translate("login", u"\u767b\u5f55", None))
self.lb_logo.setText("")
self.lb_none.setText("")
self.lb_username.setText(QCoreApplication.translate("login", u"Username", None))
self.lb_password.setText(QCoreApplication.translate("login", u"Password", None))
self.pb_login.setText(QCoreApplication.translate("login", u"\u767b\u5f55", None))
self.pb_cancel.setText(QCoreApplication.translate("login", u"\u53d6\u6d88", None))
# retranslateUi