b15106fc09
- CMakeLists.txt - app.md - appicon.ico - main.cpp - perf_tests.cpp - perf_tests.h - qa_panel.cpp - qa_panel.h - qa_state.cpp - qa_state.h - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
27 lines
801 B
C++
27 lines
801 B
C++
#include "qa_state.h"
|
|
|
|
namespace qa {
|
|
|
|
QaToggles& toggles() { static QaToggles t; return t; }
|
|
QaCounters& counters() { static QaCounters c; return c; }
|
|
|
|
void rebuild_ptrs(TabState& s) {
|
|
s.ptrs.clear();
|
|
s.ptrs.reserve(s.back.size());
|
|
for (auto& str : s.back) s.ptrs.push_back(str.c_str());
|
|
}
|
|
|
|
void consume_events(const std::vector<data_table::TableEvent>& events) {
|
|
auto& c = counters();
|
|
for (const auto& ev : events) {
|
|
switch (ev.kind) {
|
|
case data_table::TableEventKind::ButtonClick: c.button_clicks++; break;
|
|
case data_table::TableEventKind::RowDoubleClick: c.row_double_click++; break;
|
|
case data_table::TableEventKind::RowRightClick: c.row_right_click++; break;
|
|
default: break;
|
|
}
|
|
}
|
|
}
|
|
|
|
} // namespace qa
|