Files
douyi_guaji_main/gui/components/ocr_panel.py
T
Your Name 07c387751d chore: Clean up blank lines across multiple files to enhance readability
- Removed excessive blank lines in various Python scripts, markdown files, and configuration files to improve overall code clarity and maintainability.
- Ensured consistent formatting throughout the project, contributing to a more organized codebase.
2025-12-31 17:00:58 +08:00

83 lines
867 B
Python

"""OCR面板组件
包含OCR区域配置、截图OCR等功能的GUI组件。
"""
from __future__ import annotations
from typing import Any, Callable
import tkinter as tk
from tkinter import ttk
def create_ocr_panel(
parent: Any,
device_var: tk.StringVar,
y_var: tk.IntVar,
on_line: Callable[[str], None],
) -> tuple[Any, Callable[[], None]]:
"""创建OCR面板组件。
参数:
parent: 父容器
device_var: 设备ID变量
y_var: Y偏移变量
on_line: 日志输出回调
返回:
(ocr_results_var, do_screenshot_func)
"""
ocr_results_var = {"results": []}
def do_screenshot() -> None:
"""执行截图和OCR识别。"""
# TODO: 从原文件迁移函数实现
pass
return ocr_results_var, do_screenshot