__init__.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. """
  2. 表格线编辑器核心模块
  3. """
  4. # 文件处理
  5. from .file_handlers import create_file_uploader_section
  6. # 显示控件
  7. from .display_controls import (
  8. create_display_settings_section,
  9. create_undo_redo_section,
  10. )
  11. # 分析控件
  12. from .analysis_controls import create_analysis_section
  13. # 保存控件
  14. from .save_controls import create_save_section
  15. # 模式设置
  16. from .mode_setup import (
  17. setup_new_annotation_mode,
  18. setup_edit_annotation_mode,
  19. )
  20. # 目录选择器
  21. from .directory_selector import create_directory_selector
  22. # 表格视图
  23. from .table_viewer import render_table_structure_view
  24. # 绘图
  25. from .drawing import (
  26. draw_table_lines_with_numbers,
  27. draw_clean_table_lines,
  28. get_cached_table_lines_image,
  29. clear_table_image_cache,
  30. )
  31. # 状态管理
  32. from .state_manager import (
  33. init_undo_stack,
  34. save_state_for_undo,
  35. undo_last_action,
  36. redo_last_action,
  37. )
  38. # 调整
  39. from .adjustments import create_adjustment_section
  40. # 配置加载
  41. from .config_loader import (
  42. load_structure_from_config,
  43. save_structure_to_config,
  44. load_table_editor_config,
  45. parse_table_editor_cli_args,
  46. build_data_source_catalog,
  47. )
  48. # 数据处理
  49. from .data_processor import parse_ocr_data
  50. # 图片查看器
  51. from .viewer import show_image_with_scroll
  52. __all__ = [
  53. # 文件处理
  54. 'create_file_uploader_section',
  55. # 显示控件
  56. 'create_display_settings_section',
  57. 'create_undo_redo_section',
  58. # 分析控件
  59. 'create_analysis_section',
  60. # 保存控件
  61. 'create_save_section',
  62. # 模式设置
  63. 'setup_new_annotation_mode',
  64. 'setup_edit_annotation_mode',
  65. # 目录选择器
  66. 'create_directory_selector',
  67. # 表格视图
  68. 'render_table_structure_view',
  69. # 绘图
  70. 'draw_table_lines_with_numbers',
  71. 'draw_clean_table_lines',
  72. 'get_cached_table_lines_image',
  73. 'clear_table_image_cache',
  74. # 状态管理
  75. 'init_undo_stack',
  76. 'save_state_for_undo',
  77. 'undo_last_action',
  78. 'redo_last_action',
  79. # 调整
  80. 'create_adjustment_section',
  81. # 配置加载
  82. 'load_structure_from_config',
  83. 'save_structure_to_config',
  84. 'load_table_editor_config',
  85. 'parse_table_editor_cli_args',
  86. 'build_data_source_catalog',
  87. # 数据处理
  88. 'parse_ocr_data',
  89. # 图片查看器
  90. 'show_image_with_scroll',
  91. ]