初始化

This commit is contained in:
2025-12-11 10:30:15 +08:00
parent 721c105946
commit e6ab690a5f
14 changed files with 10750 additions and 10639 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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')],

View File

@@ -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'),

View File

@@ -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)

View File

@@ -3332,6 +3332,7 @@ imported by:
&#8226; <a href="#ui.image_preview">ui.image_preview</a>
&#8226; <a href="#ui.log_viewer">ui.log_viewer</a>
&#8226; <a href="#ui.main_window">ui.main_window</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.settings">ui.settings</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <a href="#ui.tool_list">ui.tool_list</a>
@@ -3376,6 +3377,7 @@ imported by:
&#8226; <a href="#ui.image_preview">ui.image_preview</a>
&#8226; <a href="#ui.log_viewer">ui.log_viewer</a>
&#8226; <a href="#ui.main_window">ui.main_window</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.settings">ui.settings</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <a href="#ui.tool_list">ui.tool_list</a>
@@ -3492,6 +3494,7 @@ imported by:
&#8226; <a href="#ui.image_preview">ui.image_preview</a>
&#8226; <a href="#ui.log_viewer">ui.log_viewer</a>
&#8226; <a href="#ui.main_window">ui.main_window</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.settings">ui.settings</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <a href="#ui.tool_list">ui.tool_list</a>
@@ -23114,6 +23117,7 @@ imports:
&#8226; <a href="#importlib">importlib</a>
&#8226; <a href="#importlib._bootstrap">importlib._bootstrap</a>
&#8226; <a href="#importlib._bootstrap_external">importlib._bootstrap_external</a>
&#8226; <a href="#importlib.machinery">importlib.machinery</a>
&#8226; <a href="#sys">sys</a>
&#8226; <a href="#warnings">warnings</a>
@@ -23276,6 +23280,7 @@ imported by:
<a href="#cffi._imp_emulation">cffi._imp_emulation</a>
&#8226; <a href="#cffi.verifier">cffi.verifier</a>
&#8226; <a href="#ctypes.util">ctypes.util</a>
&#8226; <a href="#importlib">importlib</a>
&#8226; <a href="#importlib.abc">importlib.abc</a>
&#8226; <a href="#inspect">inspect</a>
&#8226; <a href="#packaging.tags">packaging.tags</a>
@@ -25564,6 +25569,7 @@ imported by:
&#8226; <a href="#setuptools._vendor.more_itertools.more">setuptools._vendor.more_itertools.more</a>
&#8226; <a href="#setuptools._vendor.more_itertools.recipes">setuptools._vendor.more_itertools.recipes</a>
&#8226; <a href="#statistics">statistics</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#urllib.parse">urllib.parse</a>
</div>
@@ -43084,6 +43090,7 @@ imported by:
&#8226; <a href="#tools.pdf.split">tools.pdf.split</a>
&#8226; <a href="#tools.pdf.to_word">tools.pdf.to_word</a>
&#8226; <a href="#ui.image_preview">ui.image_preview</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <a href="#unittest.loader">unittest.loader</a>
&#8226; <a href="#unittest.main">unittest.main</a>
@@ -56493,6 +56500,8 @@ imported by:
&#8226; <a href="#tools.pdf.to_word">tools.pdf.to_word</a>
&#8226; <a href="#ui.image_preview">ui.image_preview</a>
&#8226; <a href="#ui.log_viewer">ui.log_viewer</a>
&#8226; <a href="#ui.main_window">ui.main_window</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <a href="#zipfile._path">zipfile._path</a>
@@ -77854,6 +77863,9 @@ imported by:
&#8226; <a href="#types">types</a>
&#8226; <a href="#typing">typing</a>
&#8226; <a href="#typing_extensions">typing_extensions</a>
&#8226; <a href="#ui.main_window">ui.main_window</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <a href="#unittest.case">unittest.case</a>
&#8226; <a href="#unittest.loader">unittest.loader</a>
&#8226; <a href="#unittest.main">unittest.main</a>
@@ -79934,6 +79946,7 @@ imported by:
&#8226; <a href="#ui.image_preview">ui.image_preview</a>
&#8226; <a href="#ui.log_viewer">ui.log_viewer</a>
&#8226; <a href="#ui.main_window">ui.main_window</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.settings">ui.settings</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <a href="#ui.tool_list">ui.tool_list</a>
@@ -80027,6 +80040,8 @@ imports:
&#8226; <a href="#PySide6.QtWidgets">PySide6.QtWidgets</a>
&#8226; <a href="#core.config">core.config</a>
&#8226; <a href="#logging">logging</a>
&#8226; <a href="#pathlib">pathlib</a>
&#8226; <a href="#sys">sys</a>
&#8226; <a href="#tools.excel.chart">tools.excel.chart</a>
&#8226; <a href="#tools.excel.preview">tools.excel.preview</a>
&#8226; <a href="#tools.image.compress">tools.image.compress</a>
@@ -80037,6 +80052,7 @@ imports:
&#8226; <a href="#tools.pdf.to_word">tools.pdf.to_word</a>
&#8226; <a href="#ui">ui</a>
&#8226; <a href="#ui.animations">ui.animations</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
&#8226; <a href="#ui.settings">ui.settings</a>
&#8226; <a href="#ui.sidebar">ui.sidebar</a>
&#8226; <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>
&#8226; <a href="#PySide6.QtGui">PySide6.QtGui</a>
&#8226; <a href="#PySide6.QtWidgets">PySide6.QtWidgets</a>
&#8226; <a href="#math">math</a>
&#8226; <a href="#os">os</a>
&#8226; <a href="#pathlib">pathlib</a>
&#8226; <a href="#sys">sys</a>
&#8226; <a href="#ui">ui</a>
&#8226; <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:
&#8226; <a href="#PySide6.QtWidgets">PySide6.QtWidgets</a>
&#8226; <a href="#os">os</a>
&#8226; <a href="#pathlib">pathlib</a>
&#8226; <a href="#sys">sys</a>
&#8226; <a href="#ui">ui</a>
</div>
@@ -81236,6 +81277,7 @@ imported by:
&#8226; <a href="#matplotlib.backends.backend_webagg">matplotlib.backends.backend_webagg</a>
&#8226; <a href="#pdf2docx.gui.MainFrame">pdf2docx.gui.MainFrame</a>
&#8226; <a href="#pydoc">pydoc</a>
&#8226; <a href="#ui.profile_card">ui.profile_card</a>
</div>

25
main.py
View File

@@ -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
# 添加项目根目录到路径
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)

View File

@@ -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 = {}

View File

@@ -4,6 +4,7 @@
- 高级UI设计带装饰元素和动画
"""
import os
import sys
from pathlib import Path
from PySide6.QtWidgets import (
QDialog, QVBoxLayout, QHBoxLayout, QLabel, QPushButton,
@@ -21,7 +22,12 @@ import math
def get_resource_path(relative_path: str) -> str:
"""获取资源文件的绝对路径"""
"""获取资源文件的绝对路径(兼容打包后)"""
if getattr(sys, 'frozen', False):
# 打包后的路径
base_path = Path(sys._MEIPASS)
else:
# 开发时的路径
base_path = Path(__file__).parent.parent
return str(base_path / relative_path)

View File

@@ -7,6 +7,7 @@
- 水波纹点击效果
"""
import os
import sys
from pathlib import Path
from PySide6.QtWidgets import (
QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QButtonGroup,
@@ -25,9 +26,14 @@ from PySide6.QtSvg import QSvgRenderer
from PySide6.QtCore import QByteArray
# 获取资源目录
# 获取资源目录(兼容打包后)
def get_resource_path(relative_path: str) -> str:
"""获取资源文件的绝对路径"""
if getattr(sys, 'frozen', False):
# 打包后的路径
base_path = Path(sys._MEIPASS)
else:
# 开发时的路径
base_path = Path(__file__).parent.parent
return str(base_path / relative_path)