初始化
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -77,7 +77,7 @@
|
||||
[],
|
||||
False,
|
||||
False,
|
||||
1765416156,
|
||||
1765420156,
|
||||
[('runw.exe',
|
||||
'C:\\Users\\Lenovo\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\PyInstaller\\bootloader\\Windows-64bit-intel\\runw.exe',
|
||||
'EXECUTABLE')],
|
||||
|
||||
Binary file not shown.
@@ -6441,6 +6441,9 @@
|
||||
('ui.main_window',
|
||||
'D:\\workers\\project\\ai\\nly-tool\\ui\\main_window.py',
|
||||
'PYMODULE'),
|
||||
('ui.profile_card',
|
||||
'D:\\workers\\project\\ai\\nly-tool\\ui\\profile_card.py',
|
||||
'PYMODULE'),
|
||||
('ui.settings',
|
||||
'D:\\workers\\project\\ai\\nly-tool\\ui\\settings.py',
|
||||
'PYMODULE'),
|
||||
|
||||
Binary file not shown.
@@ -16,8 +16,8 @@ IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
|
||||
|
||||
missing module named urllib.urlopen - imported by urllib (delayed, optional), lxml.html (delayed, optional)
|
||||
missing module named urllib.urlencode - imported by urllib (delayed, optional), lxml.html (delayed, optional)
|
||||
missing module named pwd - imported by posixpath (delayed, conditional, optional), subprocess (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), http.server (delayed, optional), netrc (delayed, conditional), getpass (delayed), setuptools._distutils.util (delayed, conditional, optional), setuptools._vendor.backports.tarfile (optional), setuptools._distutils.archive_util (optional)
|
||||
missing module named grp - imported by subprocess (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), setuptools._vendor.backports.tarfile (optional), setuptools._distutils.archive_util (optional)
|
||||
missing module named pwd - imported by posixpath (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional), http.server (delayed, optional), netrc (delayed, conditional), getpass (delayed), setuptools._distutils.util (delayed, conditional, optional), setuptools._vendor.backports.tarfile (optional), setuptools._distutils.archive_util (optional)
|
||||
missing module named grp - imported by shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional), setuptools._vendor.backports.tarfile (optional), setuptools._distutils.archive_util (optional)
|
||||
missing module named posix - imported by os (conditional, optional), posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional)
|
||||
missing module named resource - imported by posix (top-level)
|
||||
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
|
||||
|
||||
@@ -3332,6 +3332,7 @@ imported by:
|
||||
• <a href="#ui.image_preview">ui.image_preview</a>
|
||||
• <a href="#ui.log_viewer">ui.log_viewer</a>
|
||||
• <a href="#ui.main_window">ui.main_window</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.settings">ui.settings</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#ui.tool_list">ui.tool_list</a>
|
||||
@@ -3376,6 +3377,7 @@ imported by:
|
||||
• <a href="#ui.image_preview">ui.image_preview</a>
|
||||
• <a href="#ui.log_viewer">ui.log_viewer</a>
|
||||
• <a href="#ui.main_window">ui.main_window</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.settings">ui.settings</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#ui.tool_list">ui.tool_list</a>
|
||||
@@ -3492,6 +3494,7 @@ imported by:
|
||||
• <a href="#ui.image_preview">ui.image_preview</a>
|
||||
• <a href="#ui.log_viewer">ui.log_viewer</a>
|
||||
• <a href="#ui.main_window">ui.main_window</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.settings">ui.settings</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#ui.tool_list">ui.tool_list</a>
|
||||
@@ -23114,6 +23117,7 @@ imports:
|
||||
• <a href="#importlib">importlib</a>
|
||||
• <a href="#importlib._bootstrap">importlib._bootstrap</a>
|
||||
• <a href="#importlib._bootstrap_external">importlib._bootstrap_external</a>
|
||||
• <a href="#importlib.machinery">importlib.machinery</a>
|
||||
• <a href="#sys">sys</a>
|
||||
• <a href="#warnings">warnings</a>
|
||||
|
||||
@@ -23276,6 +23280,7 @@ imported by:
|
||||
<a href="#cffi._imp_emulation">cffi._imp_emulation</a>
|
||||
• <a href="#cffi.verifier">cffi.verifier</a>
|
||||
• <a href="#ctypes.util">ctypes.util</a>
|
||||
• <a href="#importlib">importlib</a>
|
||||
• <a href="#importlib.abc">importlib.abc</a>
|
||||
• <a href="#inspect">inspect</a>
|
||||
• <a href="#packaging.tags">packaging.tags</a>
|
||||
@@ -25564,6 +25569,7 @@ imported by:
|
||||
• <a href="#setuptools._vendor.more_itertools.more">setuptools._vendor.more_itertools.more</a>
|
||||
• <a href="#setuptools._vendor.more_itertools.recipes">setuptools._vendor.more_itertools.recipes</a>
|
||||
• <a href="#statistics">statistics</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#urllib.parse">urllib.parse</a>
|
||||
|
||||
</div>
|
||||
@@ -43084,6 +43090,7 @@ imported by:
|
||||
• <a href="#tools.pdf.split">tools.pdf.split</a>
|
||||
• <a href="#tools.pdf.to_word">tools.pdf.to_word</a>
|
||||
• <a href="#ui.image_preview">ui.image_preview</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#unittest.loader">unittest.loader</a>
|
||||
• <a href="#unittest.main">unittest.main</a>
|
||||
@@ -56493,6 +56500,8 @@ imported by:
|
||||
• <a href="#tools.pdf.to_word">tools.pdf.to_word</a>
|
||||
• <a href="#ui.image_preview">ui.image_preview</a>
|
||||
• <a href="#ui.log_viewer">ui.log_viewer</a>
|
||||
• <a href="#ui.main_window">ui.main_window</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#zipfile._path">zipfile._path</a>
|
||||
|
||||
@@ -77854,6 +77863,9 @@ imported by:
|
||||
• <a href="#types">types</a>
|
||||
• <a href="#typing">typing</a>
|
||||
• <a href="#typing_extensions">typing_extensions</a>
|
||||
• <a href="#ui.main_window">ui.main_window</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#unittest.case">unittest.case</a>
|
||||
• <a href="#unittest.loader">unittest.loader</a>
|
||||
• <a href="#unittest.main">unittest.main</a>
|
||||
@@ -79934,6 +79946,7 @@ imported by:
|
||||
• <a href="#ui.image_preview">ui.image_preview</a>
|
||||
• <a href="#ui.log_viewer">ui.log_viewer</a>
|
||||
• <a href="#ui.main_window">ui.main_window</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.settings">ui.settings</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#ui.tool_list">ui.tool_list</a>
|
||||
@@ -80027,6 +80040,8 @@ imports:
|
||||
• <a href="#PySide6.QtWidgets">PySide6.QtWidgets</a>
|
||||
• <a href="#core.config">core.config</a>
|
||||
• <a href="#logging">logging</a>
|
||||
• <a href="#pathlib">pathlib</a>
|
||||
• <a href="#sys">sys</a>
|
||||
• <a href="#tools.excel.chart">tools.excel.chart</a>
|
||||
• <a href="#tools.excel.preview">tools.excel.preview</a>
|
||||
• <a href="#tools.image.compress">tools.image.compress</a>
|
||||
@@ -80037,6 +80052,7 @@ imports:
|
||||
• <a href="#tools.pdf.to_word">tools.pdf.to_word</a>
|
||||
• <a href="#ui">ui</a>
|
||||
• <a href="#ui.animations">ui.animations</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
• <a href="#ui.settings">ui.settings</a>
|
||||
• <a href="#ui.sidebar">ui.sidebar</a>
|
||||
• <a href="#ui.tool_list">ui.tool_list</a>
|
||||
@@ -80052,6 +80068,30 @@ imported by:
|
||||
|
||||
</div>
|
||||
|
||||
<div class="node">
|
||||
<a name="ui.profile_card"></a>
|
||||
<a target="code" href="///D:/workers/project/ai/nly-tool/ui/profile_card.py" type="text/plain"><tt>ui.profile_card</tt></a>
|
||||
<span class="moduletype">SourceModule</span> <div class="import">
|
||||
imports:
|
||||
<a href="#PySide6.QtCore">PySide6.QtCore</a>
|
||||
• <a href="#PySide6.QtGui">PySide6.QtGui</a>
|
||||
• <a href="#PySide6.QtWidgets">PySide6.QtWidgets</a>
|
||||
• <a href="#math">math</a>
|
||||
• <a href="#os">os</a>
|
||||
• <a href="#pathlib">pathlib</a>
|
||||
• <a href="#sys">sys</a>
|
||||
• <a href="#ui">ui</a>
|
||||
• <a href="#webbrowser">webbrowser</a>
|
||||
|
||||
</div>
|
||||
<div class="import">
|
||||
imported by:
|
||||
<a href="#ui.main_window">ui.main_window</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="node">
|
||||
<a name="ui.settings"></a>
|
||||
<a target="code" href="///D:/workers/project/ai/nly-tool/ui/settings.py" type="text/plain"><tt>ui.settings</tt></a>
|
||||
@@ -80086,6 +80126,7 @@ imports:
|
||||
• <a href="#PySide6.QtWidgets">PySide6.QtWidgets</a>
|
||||
• <a href="#os">os</a>
|
||||
• <a href="#pathlib">pathlib</a>
|
||||
• <a href="#sys">sys</a>
|
||||
• <a href="#ui">ui</a>
|
||||
|
||||
</div>
|
||||
@@ -81236,6 +81277,7 @@ imported by:
|
||||
• <a href="#matplotlib.backends.backend_webagg">matplotlib.backends.backend_webagg</a>
|
||||
• <a href="#pdf2docx.gui.MainFrame">pdf2docx.gui.MainFrame</a>
|
||||
• <a href="#pydoc">pydoc</a>
|
||||
• <a href="#ui.profile_card">ui.profile_card</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
27
main.py
27
main.py
@@ -3,19 +3,37 @@
|
||||
Cheese Cloud Tools - Main Entry
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# 处理打包后的资源路径
|
||||
def get_resource_path(relative_path):
|
||||
"""获取资源文件的绝对路径(兼容打包后)"""
|
||||
if getattr(sys, 'frozen', False):
|
||||
# 打包后的路径
|
||||
base_path = Path(sys._MEIPASS)
|
||||
else:
|
||||
# 开发时的路径
|
||||
base_path = Path(__file__).parent
|
||||
return base_path / relative_path
|
||||
|
||||
# 添加项目根目录到路径
|
||||
PROJECT_ROOT = Path(__file__).parent
|
||||
if getattr(sys, 'frozen', False):
|
||||
PROJECT_ROOT = Path(sys._MEIPASS)
|
||||
else:
|
||||
PROJECT_ROOT = Path(__file__).parent
|
||||
sys.path.insert(0, str(PROJECT_ROOT))
|
||||
|
||||
from PySide6.QtWidgets import QApplication
|
||||
from PySide6.QtGui import QFont
|
||||
from PySide6.QtGui import QFont, QIcon
|
||||
|
||||
from core.logger import setup_logging
|
||||
from core.error_handler import ErrorHandler
|
||||
from ui.main_window import MainWindow
|
||||
|
||||
# Logo 图标路径
|
||||
LOGO_PATH = get_resource_path("image/生成奶酪商城官方店介绍.png")
|
||||
|
||||
|
||||
def load_stylesheet() -> str:
|
||||
"""加载样式表"""
|
||||
@@ -36,6 +54,11 @@ def main():
|
||||
app.setApplicationName("奶酪云工具箱")
|
||||
app.setApplicationVersion("1.0.0")
|
||||
|
||||
# 设置应用图标(任务栏图标)
|
||||
if LOGO_PATH.exists():
|
||||
app_icon = QIcon(str(LOGO_PATH))
|
||||
app.setWindowIcon(app_icon)
|
||||
|
||||
# 设置默认字体
|
||||
font = QFont("Microsoft YaHei", 10)
|
||||
app.setFont(font)
|
||||
|
||||
@@ -8,7 +8,8 @@ from PySide6.QtWidgets import (
|
||||
QMainWindow, QWidget, QHBoxLayout, QStackedWidget, QGraphicsOpacityEffect
|
||||
)
|
||||
from PySide6.QtCore import Qt, QPropertyAnimation, QEasingCurve
|
||||
from PySide6.QtGui import QFont
|
||||
from PySide6.QtGui import QFont, QIcon
|
||||
from pathlib import Path
|
||||
import logging
|
||||
|
||||
from ui.sidebar import PrimarySidebar
|
||||
@@ -29,6 +30,15 @@ class MainWindow(QMainWindow):
|
||||
self.setMinimumSize(1200, 700)
|
||||
self.resize(1400, 800)
|
||||
|
||||
# 设置窗口图标
|
||||
import sys
|
||||
if getattr(sys, 'frozen', False):
|
||||
logo_path = Path(sys._MEIPASS) / "image" / "生成奶酪商城官方店介绍.png"
|
||||
else:
|
||||
logo_path = Path(__file__).parent.parent / "image" / "生成奶酪商城官方店介绍.png"
|
||||
if logo_path.exists():
|
||||
self.setWindowIcon(QIcon(str(logo_path)))
|
||||
|
||||
# 工具页面映射
|
||||
self.tool_pages = {}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
- 高级UI设计,带装饰元素和动画
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from PySide6.QtWidgets import (
|
||||
QDialog, QVBoxLayout, QHBoxLayout, QLabel, QPushButton,
|
||||
@@ -21,8 +22,13 @@ import math
|
||||
|
||||
|
||||
def get_resource_path(relative_path: str) -> str:
|
||||
"""获取资源文件的绝对路径"""
|
||||
base_path = Path(__file__).parent.parent
|
||||
"""获取资源文件的绝对路径(兼容打包后)"""
|
||||
if getattr(sys, 'frozen', False):
|
||||
# 打包后的路径
|
||||
base_path = Path(sys._MEIPASS)
|
||||
else:
|
||||
# 开发时的路径
|
||||
base_path = Path(__file__).parent.parent
|
||||
return str(base_path / relative_path)
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
- 水波纹点击效果
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from PySide6.QtWidgets import (
|
||||
QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QButtonGroup,
|
||||
@@ -25,10 +26,15 @@ from PySide6.QtSvg import QSvgRenderer
|
||||
from PySide6.QtCore import QByteArray
|
||||
|
||||
|
||||
# 获取资源目录
|
||||
# 获取资源目录(兼容打包后)
|
||||
def get_resource_path(relative_path: str) -> str:
|
||||
"""获取资源文件的绝对路径"""
|
||||
base_path = Path(__file__).parent.parent
|
||||
if getattr(sys, 'frozen', False):
|
||||
# 打包后的路径
|
||||
base_path = Path(sys._MEIPASS)
|
||||
else:
|
||||
# 开发时的路径
|
||||
base_path = Path(__file__).parent.parent
|
||||
return str(base_path / relative_path)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user