update:测试版本
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -168,4 +168,9 @@ cython_debug/
|
||||
#.idea/
|
||||
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
.pypirc
|
||||
|
||||
|
||||
# 打包封装
|
||||
main.build/
|
||||
main.dist/
|
||||
13
data.py
Normal file
13
data.py
Normal file
@@ -0,0 +1,13 @@
|
||||
img_data = {
|
||||
"loadbg": "",
|
||||
"vol1": "",
|
||||
"vol2": "",
|
||||
"vol3": "",
|
||||
"vol4": "",
|
||||
"after": "",
|
||||
"Mainbg": "",
|
||||
"menubg": "",
|
||||
"start_install_btn": "",
|
||||
"exit_btn": "",
|
||||
"icon": "",
|
||||
}
|
||||
@@ -7,7 +7,9 @@
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from pic_data import img_data
|
||||
from PySide6.QtGui import QPixmap
|
||||
import base64
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
@@ -18,6 +20,11 @@ from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
|
||||
QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QLabel, QMainWindow, QMenu,
|
||||
QMenuBar, QPushButton, QSizePolicy, QWidget)
|
||||
def load_base64_image(base64_str):
|
||||
pixmap = QPixmap()
|
||||
pixmap.loadFromData(base64.b64decode(base64_str))
|
||||
return pixmap
|
||||
|
||||
|
||||
class Ui_MainWindows(object):
|
||||
def setupUi(self, MainWindows):
|
||||
@@ -43,46 +50,49 @@ class Ui_MainWindows(object):
|
||||
self.loadbg = QLabel(self.centralwidget)
|
||||
self.loadbg.setObjectName(u"loadbg")
|
||||
self.loadbg.setGeometry(QRect(0, 0, 1031, 561))
|
||||
self.loadbg.setPixmap(QPixmap(u"IMG/BG/bg2.jpg"))
|
||||
self.loadbg.setPixmap(load_base64_image(img_data["loadbg"]))
|
||||
self.loadbg.setScaledContents(True)
|
||||
self.vol1bg = QLabel(self.centralwidget)
|
||||
self.vol1bg.setObjectName(u"vol1bg")
|
||||
self.vol1bg.setGeometry(QRect(0, 120, 93, 64))
|
||||
self.vol1bg.setPixmap(QPixmap(u"IMG/LOGO/vo01_logo.png"))
|
||||
self.vol1bg.setPixmap(load_base64_image(img_data["vol1"]))
|
||||
self.vol1bg.setScaledContents(True)
|
||||
self.vol2bg = QLabel(self.centralwidget)
|
||||
self.vol2bg.setObjectName(u"vol2bg")
|
||||
self.vol2bg.setGeometry(QRect(0, 180, 93, 64))
|
||||
self.vol2bg.setPixmap(QPixmap(u"IMG/LOGO/vo02_logo.png"))
|
||||
self.vol2bg.setPixmap(load_base64_image(img_data["vol2"]))
|
||||
self.vol2bg.setScaledContents(True)
|
||||
self.vol3bg = QLabel(self.centralwidget)
|
||||
self.vol3bg.setObjectName(u"vol3bg")
|
||||
self.vol3bg.setGeometry(QRect(0, 240, 93, 64))
|
||||
self.vol3bg.setPixmap(QPixmap(u"IMG/LOGO/vo03_logo.png"))
|
||||
self.vol3bg.setPixmap(load_base64_image(img_data["vol3"]))
|
||||
self.vol3bg.setScaledContents(True)
|
||||
self.vol4bg = QLabel(self.centralwidget)
|
||||
self.vol4bg.setObjectName(u"vol4bg")
|
||||
self.vol4bg.setGeometry(QRect(0, 300, 93, 64))
|
||||
self.vol4bg.setPixmap(QPixmap(u"IMG/LOGO/vo04_logo.png"))
|
||||
self.vol4bg.setPixmap(load_base64_image(img_data["vol4"]))
|
||||
self.vol4bg.setScaledContents(True)
|
||||
self.afterbg = QLabel(self.centralwidget)
|
||||
self.afterbg.setObjectName(u"afterbg")
|
||||
self.afterbg.setGeometry(QRect(0, 360, 93, 64))
|
||||
self.afterbg.setPixmap(QPixmap(u"IMG/LOGO/voaf_logo.png"))
|
||||
self.afterbg.setPixmap(load_base64_image(img_data["after"]))
|
||||
self.afterbg.setScaledContents(True)
|
||||
self.Mainbg = QLabel(self.centralwidget)
|
||||
self.Mainbg.setObjectName(u"Mainbg")
|
||||
self.Mainbg.setGeometry(QRect(0, 0, 1031, 561))
|
||||
self.Mainbg.setPixmap(QPixmap(u"IMG/BG/bg3.jpg"))
|
||||
self.Mainbg.setPixmap(load_base64_image(img_data["Mainbg"]))
|
||||
self.Mainbg.setScaledContents(True)
|
||||
self.start_install_btn = QPushButton(self.centralwidget)
|
||||
self.start_install_btn.setObjectName(u"start_install_btn")
|
||||
self.start_install_btn.setEnabled(True)
|
||||
self.start_install_btn.setGeometry(QRect(780, 250, 191, 91))
|
||||
self.start_install_btn.setAutoFillBackground(False)
|
||||
icon = QIcon()
|
||||
icon.addFile(u"IMG/BTN/start_install.bmp", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.start_install_btn.setIcon(icon)
|
||||
start_install_icon = QIcon()
|
||||
start_install_pixmap = load_base64_image(img_data["start_install_btn"])
|
||||
if not start_install_pixmap.isNull():
|
||||
start_install_icon.addPixmap(start_install_pixmap)
|
||||
self.start_install_btn.setIcon(start_install_icon)
|
||||
self.start_install_btn.setIcon(start_install_icon)
|
||||
self.start_install_btn.setIconSize(QSize(189, 110))
|
||||
self.start_install_btn.setCheckable(False)
|
||||
self.start_install_btn.setAutoRepeat(False)
|
||||
@@ -93,16 +103,19 @@ class Ui_MainWindows(object):
|
||||
self.exit_btn.setEnabled(True)
|
||||
self.exit_btn.setGeometry(QRect(780, 340, 191, 91))
|
||||
self.exit_btn.setAutoFillBackground(False)
|
||||
icon1 = QIcon()
|
||||
icon1.addFile(u"IMG/BTN/exit.bmp", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.exit_btn.setIcon(icon1)
|
||||
exit_icon = QIcon()
|
||||
exit_pixmap = load_base64_image(img_data["exit_btn"])
|
||||
if not exit_pixmap.isNull():
|
||||
exit_icon.addPixmap(exit_pixmap)
|
||||
self.exit_btn.setIcon(exit_icon)
|
||||
self.exit_btn.setIcon(exit_icon)
|
||||
self.exit_btn.setIconSize(QSize(189, 110))
|
||||
self.exit_btn.setCheckable(False)
|
||||
self.exit_btn.setFlat(True)
|
||||
self.menubg = QLabel(self.centralwidget)
|
||||
self.menubg.setObjectName(u"menubg")
|
||||
self.menubg.setGeometry(QRect(710, 0, 321, 561))
|
||||
self.menubg.setPixmap(QPixmap(u"IMG/BG/menubg.jpg"))
|
||||
self.menubg.setPixmap(load_base64_image(img_data["menubg"]))
|
||||
self.menubg.setScaledContents(True)
|
||||
MainWindows.setCentralWidget(self.centralwidget)
|
||||
self.loadbg.raise_()
|
||||
@@ -136,7 +149,7 @@ class Ui_MainWindows(object):
|
||||
|
||||
def retranslateUi(self, MainWindows):
|
||||
MainWindows.setWindowTitle(QCoreApplication.translate("MainWindows", u" UI Test", None))
|
||||
self.action_2.setText(QCoreApplication.translate("MainWindows", u"update - sd", None))
|
||||
self.action_2.setText(QCoreApplication.translate("MainWindows", u"\u68c0\u67e5\u66f4\u65b0(\u672a\u5b8c\u6210)", None))
|
||||
self.loadbg.setText("")
|
||||
self.vol1bg.setText("")
|
||||
self.vol2bg.setText("")
|
||||
|
||||
@@ -12,10 +12,10 @@ class MultiStageAnimations:
|
||||
# 动画时序配置
|
||||
self.animation_config = {
|
||||
"logo": {
|
||||
"delay_after": 1800 # Logo动画完成后等待300ms
|
||||
"delay_after": 2800
|
||||
},
|
||||
"mainbg": {
|
||||
"delay_after": 500 # 主背景淡入完成后等待200ms
|
||||
"delay_after": 500
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ class MultiStageAnimations:
|
||||
widget.setGraphicsEffect(effect)
|
||||
widget.move(-widget.width(), item["end_pos"].y())
|
||||
widget.show()
|
||||
print("初始化支持栏动画")
|
||||
|
||||
# 初始化菜单元素(底部外)
|
||||
for item in self.menu_widgets:
|
||||
|
||||
BIN
source/icon.ico
Normal file
BIN
source/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
BIN
source/main.exe
Normal file
BIN
source/main.exe
Normal file
Binary file not shown.
@@ -10,6 +10,7 @@ import ctypes
|
||||
import concurrent.futures
|
||||
from PySide6.QtGui import QIcon
|
||||
from collections import deque
|
||||
from pic_data import img_data
|
||||
|
||||
from PySide6.QtCore import ( Qt,
|
||||
Signal, QThread, QTimer)
|
||||
@@ -22,12 +23,15 @@ from animations import MultiStageAnimations
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def load_base64_image(base64_str):
|
||||
pixmap = QPixmap()
|
||||
pixmap.loadFromData(base64.b64decode(base64_str))
|
||||
return pixmap
|
||||
|
||||
# 配置信息
|
||||
app_data = {
|
||||
"APP_VERSION": "4.10.0.17496",
|
||||
"APP_NAME": "@FRAISEMOE Addons Installer",
|
||||
"APP_NAME": "@FRAISEMOE2 Addons Installer",
|
||||
"TEMP": "TEMP",
|
||||
"CACHE": "FRAISEMOE",
|
||||
"PLUGIN": "PLUGIN",
|
||||
@@ -84,15 +88,15 @@ def msgbox_frame(title, text, buttons=QMessageBox.StandardButton.NoButton):
|
||||
msg_box.setWindowTitle(title)
|
||||
|
||||
# 设置弹窗图标
|
||||
icon_path = "IMG/ICO/icon.png"
|
||||
if os.path.exists(icon_path):
|
||||
msg_box.setWindowIcon(QIcon(icon_path))
|
||||
pixmap = QPixmap(icon_path)
|
||||
icon_data = img_data.get("icon")
|
||||
if icon_data:
|
||||
pixmap = load_base64_image(icon_data)
|
||||
if not pixmap.isNull():
|
||||
msg_box.setWindowIcon(QIcon(pixmap))
|
||||
msg_box.setIconPixmap(pixmap.scaled(64, 64, Qt.KeepAspectRatio))
|
||||
else:
|
||||
msg_box.setIcon(QMessageBox.Information)
|
||||
|
||||
|
||||
msg_box.setText(text)
|
||||
msg_box.setStandardButtons(buttons)
|
||||
return msg_box
|
||||
@@ -313,9 +317,10 @@ class MainWindow(QMainWindow):
|
||||
self.ui = Ui_MainWindows()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
icon_path = "IMG/ICO/icon.png"
|
||||
if os.path.exists(icon_path):
|
||||
self.setWindowIcon(QIcon(icon_path))
|
||||
icon_data = img_data.get("icon")
|
||||
if icon_data:
|
||||
pixmap = load_base64_image(icon_data)
|
||||
self.setWindowIcon(QIcon(pixmap))
|
||||
|
||||
# 设置窗口标题为APP_NAME加版本号
|
||||
self.setWindowTitle(f"{APP_NAME} v{APP_VERSION}")
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user