add image paths

This commit is contained in:
2025-11-01 16:13:14 +08:00
parent 290324b5e4
commit d002ffb9e8
15 changed files with 242 additions and 181 deletions

View File

@ -3,6 +3,7 @@ from PySide6.QtGui import QPixmap
from PySide6.QtCore import Qt, QPropertyAnimation, Property
import os
import resources.resources_rc
from utils.image_paths import ImagePaths
# 拱形进度条
class OverlapArcProgress(QWidget):
@ -107,7 +108,7 @@ class ArcProgressWidget(QWidget):
super().__init__()
# 加载ArcProgressWidget背景图
# 添加了 拱3.png 作为背景图
bg_img = ":/icons/images/拱3.png" # 需要修改为实际的图片的路径
bg_img = ImagePaths.ARCH3 # 需要修改为实际的图片的路径
# self.setStyleSheet(f"background-image: url({bg_img}); background-repeat: no-repeat; background-position: center;")
self.bg_pixmap = QPixmap(bg_img)
# self.setStyleSheet("background-color: red;")
@ -132,10 +133,10 @@ class ArcProgressWidget(QWidget):
self.arc_title_label = QLabel("振捣模具车", self)
self.arc_title_label.setFixedSize(555, 29)
self.arc_title_label.setAlignment(Qt.AlignCenter)
self.arc_title_label.setStyleSheet("""
self.arc_title_label.setStyleSheet(f"""
color: #0bffff;
font-size: 18px;
background-image: url(:/icons/images/文字标题底.png);
background-image: url({ImagePaths.TEXT_TITLE_BG});
background-repeat: no-repeat;
background-position: center;
margin: 4px auto;
@ -155,8 +156,8 @@ class ArcProgressWidget(QWidget):
# 3. 在容器内添加所有标签和拱形进度条用setGeometry定位
# 创建拱形进度条控件
arc_bg_img = ":/icons/images/拱2.png" # 替换为实际路径
arc_fg_img = ":/icons/images/拱1.png" # 替换为实际路径
arc_bg_img = ImagePaths.ARCH2 # 替换为实际路径
arc_fg_img = ImagePaths.ARCH1 # 替换为实际路径
self.arc_progress = OverlapArcProgress(arc_bg_img, arc_fg_img, container)
# 显示环号的标签