/
klischa
/
AstraScanner2
Обзор
Документация
Войти
/
klischa
/
AstraScanner2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/controllers/TurntableController.h
50 строк
1 KB
Arena Agent
refactor: introduce turntable controller for scan flow
17 июн 2026, 10:09
17 июн 2026, 10:09
7a1bb0c
Код
Авторство
О чём код?
#ifndef TURNTABLECONTROLLER_H #define TURNTABLECONTROLLER_H #include <QObject> #include <QString> class TurntableController : public QObject { Q_OBJECT public: struct ToggleOutcome { bool startTimer = false; bool stopTimer = false; bool uncheckCheckbox = false; int intervalMs = 0; QString statusText; QString warningText; }; struct TickPreparation { bool proceed = false; bool stopTimer = false; bool uncheckCheckbox = false; QString statusText; QString warningText; }; struct StepOutcome { bool completed = false; bool requestStopCapture = false; int capturedCount = 0; QString statusText; }; explicit TurntableController(QObject *parent = nullptr); ToggleOutcome handleToggle(bool enabled, bool projectOpen, int intervalSec, int targetCount); TickPreparation beginTick(bool scanning, bool projectOpen); StepOutcome onEmptyCloud(); StepOutcome onAccumulateStep(int pointCount, int targetCount); StepOutcome onSeparateStep(int pointCount, int targetCount); int capturedCount() const { return m_turntableCaptured; } int nextSeparateOrdinal() const { return m_turntableCaptured + 1; } private: int m_turntableCaptured = 0; }; #endif // TURNTABLECONTROLLER_H