/
klischa
/
AstraScanner2
Обзор
Документация
Войти
/
klischa
/
AstraScanner2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/controllers/CalibrationTabBinder.cpp
48 строк
2 KB
Arena Agent
refactor: move calibration and log tab ui composition into binders
17 июн 2026, 07:37
17 июн 2026, 07:37
7004c54
Код
Авторство
О чём код?
#include "CalibrationTabBinder.h" #include <QTabWidget> #include <QWidget> #include <QVBoxLayout> #include <QHBoxLayout> #include <QPushButton> #include <QLabel> CalibrationTabBinder::CalibrationTabBinder(QObject *parent) : QObject(parent) { } CalibrationTabBinder::Widgets CalibrationTabBinder::bind(QTabWidget *tabWidget, QWidget *owner) { Widgets w; QWidget* calibTab = new QWidget(); tabWidget->addTab(calibTab, "Калибровка"); QVBoxLayout* calibLayout = new QVBoxLayout(calibTab); QHBoxLayout* calibBtnLayout = new QHBoxLayout(); w.calibPreviewBtn = new QPushButton("Preview", owner); w.calibCaptureBtn = new QPushButton("Захватить кадр", owner); w.calibCalibrateBtn = new QPushButton("Калибровать", owner); w.calibResetBtn = new QPushButton("Сброс", owner); w.calibCalibrateBtn->setEnabled(false); calibBtnLayout->addWidget(w.calibPreviewBtn); calibBtnLayout->addWidget(w.calibCaptureBtn); calibBtnLayout->addWidget(w.calibCalibrateBtn); calibBtnLayout->addWidget(w.calibResetBtn); calibBtnLayout->addStretch(); calibLayout->addLayout(calibBtnLayout); w.calibRgbLabel = new QLabel("RGB кадр", owner); w.calibRgbLabel->setMinimumSize(640, 480); w.calibRgbLabel->setStyleSheet("border: 1px solid gray; background-color: black;"); w.calibRgbLabel->setAlignment(Qt::AlignCenter); calibLayout->addWidget(w.calibRgbLabel); w.calibFrameCountLabel = new QLabel("Кадров: 0 / 12", owner); w.calibStatusLabel = new QLabel("Нажмите Preview для начала", owner); calibLayout->addWidget(w.calibFrameCountLabel); calibLayout->addWidget(w.calibStatusLabel); calibLayout->addStretch(); return w; }