""" 表格线编辑器核心模块 """ import sys from pathlib import Path # ✅ 确保父目录在路径中 _parent_dir = Path(__file__).parent.parent if str(_parent_dir) not in sys.path: sys.path.insert(0, str(_parent_dir)) # 文件处理 from .file_handlers import create_file_uploader_section # 显示控件 from .display_controls import ( create_display_settings_section, create_undo_redo_section, ) # 分析控件 from .analysis_controls import create_analysis_section # 保存控件 from .save_controls import create_save_section # 🆕 批量模板控件 from .batch_template_controls import create_batch_template_section # 模式设置 from .mode_setup import ( setup_new_annotation_mode, setup_edit_annotation_mode, ) # 目录选择器 from .directory_selector import create_directory_selector # 表格视图 from .table_viewer import render_table_structure_view # 绘图 from .drawing import ( draw_table_lines_with_numbers, draw_clean_table_lines, get_cached_table_lines_image, clear_table_image_cache, ) # 状态管理 from .state_manager import ( init_undo_stack, save_state_for_undo, undo_last_action, redo_last_action, ) # 调整 from .adjustments import create_adjustment_section # 配置加载 from .config_loader import ( load_structure_from_config, load_table_editor_config, parse_table_editor_cli_args, build_data_source_catalog, ) # 数据处理 from .data_processor import get_structure_from_ocr # 图片查看器 from .viewer import show_image_with_scroll __all__ = [ # 文件处理 'create_file_uploader_section', # 显示控件 'create_display_settings_section', 'create_undo_redo_section', # 分析控件 'create_analysis_section', # 保存控件 'create_save_section', # 🆕 批量模板控件 'create_batch_template_section', # 模式设置 'setup_new_annotation_mode', 'setup_edit_annotation_mode', # 目录选择器 'create_directory_selector', # 表格视图 'render_table_structure_view', # 绘图 'draw_table_lines_with_numbers', 'draw_clean_table_lines', 'get_cached_table_lines_image', 'clear_table_image_cache', # 状态管理 'init_undo_stack', 'save_state_for_undo', 'undo_last_action', 'redo_last_action', # 调整 'create_adjustment_section', # 配置加载 'load_structure_from_config', 'load_table_editor_config', 'parse_table_editor_cli_args', 'build_data_source_catalog', # 数据处理 'get_structure_from_ocr', # 图片查看器 'show_image_with_scroll', ]