This commit is contained in:
2025-11-23 20:41:50 +08:00
commit f7d5b7be07
65 changed files with 14986 additions and 0 deletions

82
ui/utilities/__init__.py Normal file
View File

@@ -0,0 +1,82 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
UI Utilities Package
-------------------
UI工具包包含对话框、图标管理、工具函数等
"""
from .custom_dialogs import (
MessageDialog,
InputDialog,
show_info,
show_warning,
show_error,
ask_yes_no,
ask_string
)
from .base_dialog import BaseDialog
# 图标工具
from .icon_utils import (
get_icons_dir,
get_icon_path,
set_window_icon,
setup_dialog_icon
)
# 窗口工具
from .window_utils import (
set_dark_title_bar,
setup_dialog_window
)
# 颜色工具
from .color_utils import (
darken_color,
lighten_color,
hex_to_rgb,
rgb_to_hex
)
# 向后兼容已迁移到具体模块不再需要utils.py
from .icon_manager import IconManager
from .window_manager import WindowManager
from .ui_helpers import UIHelpers
__all__ = [
# 对话框类
'MessageDialog',
'InputDialog',
'BaseDialog',
# 对话框便捷函数
'show_info',
'show_warning',
'show_error',
'ask_yes_no',
'ask_string',
# 图标工具函数
'get_icons_dir',
'get_icon_path',
'set_window_icon',
'setup_dialog_icon',
# 窗口工具函数
'set_dark_title_bar',
'setup_dialog_window',
# 颜色工具函数
'darken_color',
'lighten_color',
'hex_to_rgb',
'rgb_to_hex',
# 管理器类
'IconManager',
'WindowManager',
'UIHelpers'
]