Files
radar_system/python_app/gui/controllers/sections/preprocess_summary_section.py
T
2026-10-06 14:16:14 +03:00

27 lines
1.0 KiB
Python

"""Builder for preprocess set summary section."""
from PyQt6.QtWidgets import QGroupBox, QLabel, QVBoxLayout
from python_app.gui.controllers.sections.layout_helpers import FormRow, build_two_column_form_widget
from python_app.orchestration.preprocess_assets import PREPROCESS_ASSET_NAMES, preprocess_asset_display_name
from python_app.gui.controllers.sections.views import PreprocessView
def build_preprocess_summary_group() -> PreprocessView:
"""Create selected preprocess-set summary section."""
view = PreprocessView(group=QGroupBox("Selected Preprocess Sets"), labels={})
group = view.group
layout = QVBoxLayout(group)
layout.setContentsMargins(10, 10, 10, 10)
layout.setSpacing(8)
rows: list[FormRow] = []
for key in PREPROCESS_ASSET_NAMES:
label = QLabel("<not selected>")
view.labels[key] = label
rows.append((preprocess_asset_display_name(key).capitalize(), label))
layout.addWidget(build_two_column_form_widget(group, rows, split_index=(len(rows) + 1) // 2))
return view