YODAU 1.0
YEAR OF THE DEPEND ADULT UNDERGARMENT
Loading...
Searching...
No Matches
controller Class Referencefinal

Frontend coordinator for streams, lines, templates, and events. More...

#include <frontend/include/helpers/controller.hpp>

Inheritance diagram for controller:
Collaboration diagram for controller:

Classes

struct  tpl_line
 Stored template geometry (percentage coordinates). More...

Public Slots

void handle_add_file (const QString &path, const QString &name, bool loop)
 Handler for adding a file stream from UI.
void handle_add_local (const QString &source, const QString &name)
 Handler for adding a local capture device from UI.
void handle_add_url (const QString &url, const QString &name)
 Handler for adding a network URL stream from UI.
void handle_detect_local_sources ()
 Handler for detecting available local sources.
void handle_show_stream_changed (const QString &name, bool show)
 Handler for stream visibility toggles in UI.
void handle_backend_event (const QString &text)
 Append a textual message to the "active log" in settings.
void on_gui_frame (const QString &stream_name, const QImage &image)
 Slot receiving GUI frames from stream tiles.

Public Member Functions

 controller (yodau::backend::stream_manager *mgr, settings_panel *panel, board *zone, QObject *parent=nullptr)
 Construct a controller.
void init_from_backend ()
 Populate settings UI from backend at startup.

Private Slots

void on_active_stream_selected (const QString &name)
 Handler for selecting an active stream in settings.
void on_active_edit_mode_changed (bool drawing_new)
 Handler for toggling active edit mode.
void on_active_line_params_changed (const QString &name, const QColor &color, bool closed)
 Handler for changes to "new line" draft parameters.
void on_active_line_save_requested (const QString &name, bool closed)
 Handler for saving a newly drawn draft line.
void on_active_template_selected (const QString &template_name)
 Handler for selecting a template while in template mode.
void on_active_template_color_changed (const QColor &color)
 Handler for changing template preview color.
void on_active_template_add_requested (const QString &template_name, const QColor &color)
 Handler for adding the selected template to the active stream.
void on_active_line_undo_requested ()
 Handler for undoing last draft point.
void on_active_labels_enabled_changed (bool on)
 Handler for toggling persistent label visibility in active view.

Private Member Functions

void setup_settings_connections ()
 Connect settings_panel signals to controller slots.
void setup_grid_connections ()
 Connect grid_view signals to controller handlers.
void handle_add_stream_common (const QString &source, const QString &name, const QString &type, bool loop)
 shared implementation for add-stream commands.
void register_stream_in_ui (const QString &final_name, const QString &source_desc)
 Add newly created backend stream into UI structures.
void handle_enlarge_requested (const QString &name)
 Handle focus/enlarge requests from grid tiles.
void handle_back_to_grid ()
 Return to grid mode (clear active stream).
void handle_thumb_activate (const QString &name)
 Convenience alias for activating a thumbnail stream.
stream_cellactive_cell_checked (const QString &fail_prefix)
 Get active cell or log a failure.
void sync_active_persistent ()
 Sync persistent line overlays and template candidates for active stream.
void apply_template_preview (const QString &template_name)
 Apply a template preview into the active cell draft.
void log_active (const QString &msg) const
 Append a message to the active log (if settings exists).
void apply_added_line (stream_cell *cell, const QString &final_name, const std::vector< QPointF > &pts, bool closed)
 Apply effects of a newly added line to UI and state.
void sync_active_cell_lines () const
 Push per-stream persistent lines into the active UI cell.
QSet< QString > used_template_names_for_stream (const QString &stream) const
 Collect template names already used by a stream.
QStringList template_candidates_excluding (const QSet< QString > &used) const
 List templates not present in a given used set.
void update_repaint_caps ()
 Update repaint interval caps for all visible tiles.
void update_analysis_caps ()
 Update backend analysis interval based on visible tile count.
void on_backend_event (const yodau::backend::event &e)
 Handle a single backend event (GUI-thread safe).
void on_backend_events (const std::vector< yodau::backend::event > &evs)
 Handle a batch of backend events.
stream_celltile_for_stream_name (const QString &name) const
 Resolve a tile widget for a given stream name.
yodau::backend::frame frame_from_image (const QImage &image) const
 Convert a QImage into backend frame.

Static Private Member Functions

static QString now_ts ()
 Current wall-clock timestamp as human-readable string.
static QString points_str_from_pct (const std::vector< QPointF > &pts)
 Convert draft points to backend format string.
static int repaint_interval_for_count (int n)
 Choose repaint interval given number of visible streams.

Private Attributes

yodau::backend::stream_managerstream_mgr { nullptr }
 Backend stream manager (non-owning).
settings_panelsettings { nullptr }
 Settings panel (non-owning).
boardmain_zone { nullptr }
 Main board/zone widget (non-owning).
grid_viewgrid { nullptr }
 Grid view extracted from board (non-owning).
QString active_name
 Name of currently active stream (empty if none).
bool drawing_new_mode { true }
 True if active edit mode is "draw new line".
bool active_labels_enabled { true }
 Whether labels are enabled in active cell.
QString draft_line_name
 Draft line name being edited.
QColor draft_line_color { Qt::red }
 Draft line preview color.
bool draft_line_closed { false }
 Draft line closed flag.
QMap< QString, tpl_linetemplates
 Template registry keyed by template name.
QMap< QString, std::vector< stream_cell::line_instance > > per_stream_lines
 Per-stream persistent line instances keyed by stream name.
QMap< QString, QUrl > stream_sources
 Remembered stream sources (as QUrl) keyed by stream name.
QMap< QString, bool > stream_loops
 Remembered stream loop flags keyed by stream name.
int active_interval_ms { 33 }
 Repaint interval for active (focused) stream in ms.
int idle_interval_ms { 66 }
 Repaint interval for idle grid streams in ms.

Detailed Description

Frontend coordinator for streams, lines, templates, and events.

Responsibilities:

  • Initialize settings UI from current backend state.
  • Add/remove/show streams in the grid view.
  • Manage "active" stream state (focused view and edit mode).
  • Convert GUI frames to backend frames and push them for analysis.
  • Receive backend events and reflect them visually:
    • motion events -> transient bubbles,
    • tripwire events -> line highlight w/ hit position.
  • Maintain in-memory line templates and per-stream line instances.
  • Adapt repaint and analysis throttling based on number of visible streams.

Threading:

  • Backend events may arrive from worker threads. on_backend_event re-dispatches to the GUI thread when needed using Qt queued invocation.
  • All other slots are expected to be called from the GUI thread.

Definition at line 59 of file controller.hpp.

Constructor & Destructor Documentation

◆ controller()

controller::controller ( yodau::backend::stream_manager * mgr,
settings_panel * panel,
board * zone,
QObject * parent = nullptr )
explicit

Construct a controller.

The controller does not take ownership of passed pointers; they must stay alive for the lifetime of this object.

On construction it:

  • initializes state from backend,
  • installs backend hooks (frame processor, batch event sink, etc.),
  • configures initial UI candidates,
  • sets up settings/grid signal connections.
Parameters
mgrBackend stream manager (may be null; controller becomes inert).
panelSettings panel for stream/line/forms (may be null).
zoneMain board widget (may be null).
parentQObject parent.

Definition at line 25 of file controller.cpp.

29 : QObject(parent)
30 , stream_mgr(mgr)
31 , settings(panel)
32 , main_zone(zone)
33 , grid(zone ? zone->grid_mode() : nullptr) {
34
36
37 if (stream_mgr) {
38 stream_mgr->set_analysis_interval_ms(66);
39#ifdef YODAU_OPENCV
40 stream_mgr->set_frame_processor(
41 yodau::backend::opencv_motion_processor
42 );
43#else
44 stream_mgr->set_frame_processor([](const yodau::backend::stream& s,
45 const yodau::backend::frame& f) {
46 Q_UNUSED(s);
47 Q_UNUSED(f);
48 return std::vector<yodau::backend::event> {};
49 });
50#endif
51 stream_mgr->set_event_batch_sink(
52 [this](const std::vector<yodau::backend::event>& evs) {
54 }
55 );
56 }
57
58 if (settings && grid) {
59 settings->set_active_candidates(grid->stream_names());
60 settings->set_active_current(QString());
61 }
62
65}
grid_view * grid_mode() const
Access the grid view (thumbnail mode).
Definition board.cpp:30
void on_backend_events(const std::vector< yodau::backend::event > &evs)
Handle a batch of backend events.
yodau::backend::stream_manager * stream_mgr
Backend stream manager (non-owning).
void setup_grid_connections()
Connect grid_view signals to controller handlers.
grid_view * grid
Grid view extracted from board (non-owning).
void setup_settings_connections()
Connect settings_panel signals to controller slots.
settings_panel * settings
Settings panel (non-owning).
board * main_zone
Main board/zone widget (non-owning).
void init_from_backend()
Populate settings UI from backend at startup.

References grid, board::grid_mode(), init_from_backend(), main_zone, settings, setup_grid_connections(), setup_settings_connections(), and stream_mgr.

Here is the call graph for this function:

Member Function Documentation

◆ active_cell_checked()

stream_cell * controller::active_cell_checked ( const QString & fail_prefix)
private

Get active cell or log a failure.

Parameters
fail_prefixPrefix for log messages when lookup fails.
Returns
Active stream cell, or nullptr.

Definition at line 613 of file controller.cpp.

613 {
614 if (!stream_mgr || !main_zone || active_name.isEmpty()) {
615 if (settings) {
616 settings->append_active_log(
617 QString("%1 failed: no active stream").arg(fail_prefix)
618 );
619 }
620 return nullptr;
621 }
622
623 auto* cell = main_zone->active_cell();
624 if (!cell) {
625 if (settings) {
626 settings->append_active_log(
627 QString("%1 failed: active cell not found").arg(fail_prefix)
628 );
629 }
630 return nullptr;
631 }
632
633 return cell;
634}
QString active_name
Name of currently active stream (empty if none).

References board::active_cell(), main_zone, and settings.

Here is the call graph for this function:

◆ apply_added_line()

void controller::apply_added_line ( stream_cell * cell,
const QString & final_name,
const std::vector< QPointF > & pts,
bool closed )
private

Apply effects of a newly added line to UI and state.

Adds persistent line instance, registers as template, connects to backend, resets draft form, and refreshes template candidates.

Parameters
cellActive cell.
final_nameBackend-resolved line name.
ptsDraft points.
closedClosed flag.

Definition at line 695 of file controller.cpp.

698 {
699 stream_cell::line_instance inst;
700 inst.template_name = final_name;
701 inst.color = draft_line_color;
702 inst.closed = closed;
703 inst.pts_pct = pts;
704
705 per_stream_lines[active_name].push_back(inst);
706 cell->add_persistent_line(inst);
707
708 templates[final_name] = tpl_line { pts, closed };
709
710 stream_mgr->set_line(active_name.toStdString(), final_name.toStdString());
711
712 cell->clear_draft();
713 cell->set_draft_params(QString(), QColor(Qt::red), false);
714
715 draft_line_name.clear();
716 draft_line_color = Qt::red;
717 draft_line_closed = false;
718
719 if (settings) {
720 settings->reset_active_line_form();
721 settings->add_template_candidate(final_name);
722 settings->reset_active_template_form();
723 }
724
726 QString("line added: %1 (%2 points)").arg(final_name).arg(pts.size())
727 );
728
730}
QColor draft_line_color
Draft line preview color.
QMap< QString, std::vector< stream_cell::line_instance > > per_stream_lines
Per-stream persistent line instances keyed by stream name.
void log_active(const QString &msg) const
Append a message to the active log (if settings exists).
QMap< QString, tpl_line > templates
Template registry keyed by template name.
void sync_active_persistent()
Sync persistent line overlays and template candidates for active stream.
QString draft_line_name
Draft line name being edited.
bool draft_line_closed
Draft line closed flag.
void set_draft_params(const QString &name, const QColor &color, bool closed)
Set draft line parameters (name, color, closed flag).
void clear_draft()
Clear all draft data (points, hover point, preview flag).
void add_persistent_line(const line_instance &line)
Append a persistent line to the list.
Stored template geometry (percentage coordinates).
QString template_name
Name of the underlying template/definition in backend.
std::vector< QPointF > pts_pct
Polyline points in percentage coordinates.
bool closed
Whether the polyline should be treated as closed polygon.
QColor color
Line color used for rendering (default: red).

References stream_cell::clear_draft(), draft_line_closed, settings_panel::reset_active_line_form(), settings_panel::reset_active_template_form(), settings, and sync_active_persistent().

Here is the call graph for this function:

◆ apply_template_preview()

void controller::apply_template_preview ( const QString & template_name)
private

Apply a template preview into the active cell draft.

Clears existing draft, loads template points, and applies preview color.

Parameters
template_nameTemplate to preview.

Definition at line 654 of file controller.cpp.

654 {
655 if (!main_zone) {
656 return;
657 }
658 auto* cell = main_zone->active_cell();
659 if (!cell) {
660 return;
661 }
662
663 cell->clear_draft();
664
665 if (template_name.isEmpty() || !templates.contains(template_name)) {
666 return;
667 }
668
669 const auto tpl = templates.value(template_name);
670
671 QColor c = Qt::red;
672 if (settings) {
673 c = settings->active_template_preview_color();
674 }
675
676 cell->set_draft_params(template_name, c, tpl.closed);
677 cell->set_draft_points_pct(tpl.pts_pct);
678}

References board::active_cell(), stream_cell::clear_draft(), main_zone, and settings.

Here is the call graph for this function:

◆ frame_from_image()

yodau::backend::frame controller::frame_from_image ( const QImage & image) const
private

Convert a QImage into backend frame.

Ensures RGB888 format and fills yodau::backend::frame fields.

Parameters
imageGUI image.
Returns
Backend frame copy.

Definition at line 834 of file controller.cpp.

834 {
835 QImage img = image;
836
837 if (img.format() != QImage::Format_RGB888) {
838 img = img.convertToFormat(QImage::Format_RGB888);
839 }
840
841 yodau::backend::frame f;
842 f.width = img.width();
843 f.height = img.height();
844 f.stride = static_cast<int>(img.bytesPerLine());
846 f.ts = std::chrono::steady_clock::now();
847
848 const auto* ptr = img.constBits();
849 const int bytes = static_cast<int>(img.sizeInBytes());
850 if (ptr && bytes > 0) {
851 f.data.assign(ptr, ptr + bytes);
852 }
853
854 return f;
855}
int width
Frame width in pixels.
Definition frame.hpp:48
int stride
Number of bytes per row.
Definition frame.hpp:60
int height
Frame height in pixels.
Definition frame.hpp:53
std::vector< std::uint8_t > data
Raw pixel bytes.
Definition frame.hpp:74
std::chrono::steady_clock::time_point ts
Monotonic timestamp when the frame was captured/produced.
Definition frame.hpp:79
pixel_format format
Pixel format of the buffer.
Definition frame.hpp:67

References yodau::backend::frame::format, yodau::backend::frame::height, yodau::backend::rgb24, yodau::backend::frame::stride, and yodau::backend::frame::width.

◆ handle_add_file

void controller::handle_add_file ( const QString & path,
const QString & name,
bool loop )
slot

Handler for adding a file stream from UI.

Delegates to handle_add_stream_common with type "file".

Parameters
pathLocal filesystem path to media.
nameOptional desired stream name.
loopWhether playback should loop at end-of-file.

Definition at line 106 of file controller.cpp.

108 {
109 handle_add_stream_common(path, name, "file", loop);
110}
void handle_add_stream_common(const QString &source, const QString &name, const QString &type, bool loop)
shared implementation for add-stream commands.

◆ handle_add_local

void controller::handle_add_local ( const QString & source,
const QString & name )
slot

Handler for adding a local capture device from UI.

Delegates to handle_add_stream_common with type "local".

Parameters
sourceDevice path/id (e.g., "/dev/video0").
nameOptional desired stream name.

Definition at line 112 of file controller.cpp.

112 {
113 handle_add_stream_common(source, name, "local", true);
114}

◆ handle_add_stream_common()

void controller::handle_add_stream_common ( const QString & source,
const QString & name,
const QString & type,
bool loop )
private

shared implementation for add-stream commands.

Performs validation (for urls), adds stream to backend, stores its source/loop flags, logs to UI, and registers in settings.

Parameters
sourcePath/URL/device.
nameOptional desired name.
typeType string passed to backend ("file","local","url").
loopLoop flag.

Definition at line 507 of file controller.cpp.

509 {
510 if (!stream_mgr || !settings) {
511 return;
512 }
513
514 const auto ts = now_ts();
515
516 if (type == "url") {
517 const QUrl url(source);
518 const auto scheme = url.scheme().toLower();
519
520 if (!url.isValid() || scheme.isEmpty()) {
521 settings->append_add_log(
522 QString("[%1] error: invalid url '%2'").arg(ts, source)
523 );
524 return;
525 }
526
527 if (scheme != "rtsp" && scheme != "http" && scheme != "https") {
528 settings->append_add_log(
529 QString("[%1] error: unsupported url scheme '%2'")
530 .arg(ts, scheme)
531 );
532 return;
533 }
534 }
535
536 try {
537 const auto& s = stream_mgr->add_stream(
538 source.toStdString(), name.toStdString(), type.toStdString(), loop
539 );
540
541 const auto final_name = QString::fromStdString(s.get_name());
542 const auto source_desc = QString("%1:%2").arg(type, source);
543
544 QUrl url;
545 if (type == "file" || type == "local") {
546 url = QUrl::fromLocalFile(source);
547 } else {
548 url = QUrl(source);
549 }
550 stream_sources[final_name] = url;
551 stream_loops[final_name] = loop;
552
553 settings->append_add_log(
554 QString("[%1] ok: added %2 as %3").arg(ts, source_desc, final_name)
555 );
556
557 register_stream_in_ui(final_name, source_desc);
558 } catch (const std::exception& e) {
559 settings->append_add_log(
560 QString("[%1] error: add %2 failed: %3").arg(ts, type, e.what())
561 );
562 }
563}
QMap< QString, bool > stream_loops
Remembered stream loop flags keyed by stream name.
QMap< QString, QUrl > stream_sources
Remembered stream sources (as QUrl) keyed by stream name.
static QString now_ts()
Current wall-clock timestamp as human-readable string.
void register_stream_in_ui(const QString &final_name, const QString &source_desc)
Add newly created backend stream into UI structures.

References settings, and stream_mgr.

◆ handle_add_url

void controller::handle_add_url ( const QString & url,
const QString & name )
slot

Handler for adding a network URL stream from UI.

Validates scheme and delegates to handle_add_stream_common with type "url".

Parameters
urlStream URL (rtsp/http/https).
nameOptional desired stream name.

Definition at line 116 of file controller.cpp.

116 {
117 handle_add_stream_common(url, name, "url", true);
118}

◆ handle_back_to_grid()

void controller::handle_back_to_grid ( )
private

Return to grid mode (clear active stream).

Definition at line 601 of file controller.cpp.

601 {
602 on_active_stream_selected(QString());
603
604 if (settings) {
605 settings->set_active_current(QString());
606 }
607}
void on_active_stream_selected(const QString &name)
Handler for selecting an active stream in settings.

References settings.

Referenced by handle_enlarge_requested().

Here is the caller graph for this function:

◆ handle_backend_event

void controller::handle_backend_event ( const QString & text)
slot

Append a textual message to the "active log" in settings.

Used for general backend/UI status messages.

Parameters
textMessage to append.

Definition at line 200 of file controller.cpp.

200 {
201 if (settings) {
202 settings->append_active_log(text);
203 }
204}

References settings.

◆ handle_detect_local_sources

void controller::handle_detect_local_sources ( )
slot

Handler for detecting available local sources.

Invokes backend local discovery and updates the UI list of local sources.

Definition at line 120 of file controller.cpp.

120 {
121 if (!stream_mgr || !settings) {
122 return;
123 }
124
125 const auto ts = now_ts();
126 stream_mgr->refresh_local_streams();
127
128 QStringList locals;
129 const auto backend_names = stream_mgr->stream_names();
130 for (const auto& n : backend_names) {
131 const auto qn = QString::fromStdString(n);
132 if (qn.startsWith("video")) {
133 locals << qn;
134 }
135 }
136
137 settings->set_local_sources(locals);
138 settings->append_add_log(
139 QString("[%1] ok: detected %2 local sources").arg(ts).arg(locals.size())
140 );
141
142 const auto cams = QMediaDevices::videoInputs();
143 // for (int i = 0; i < cams.size(); ++i) {
144 // const auto& c = cams[i];
145 // }
146}

References settings, and stream_mgr.

Referenced by main_window::main_window().

Here is the caller graph for this function:

◆ handle_enlarge_requested()

void controller::handle_enlarge_requested ( const QString & name)
private

Handle focus/enlarge requests from grid tiles.

Toggles active view for the given stream.

Definition at line 584 of file controller.cpp.

584 {
585 if (name.isEmpty()) {
586 return;
587 }
588
589 if (!active_name.isEmpty() && active_name == name) {
591 return;
592 }
593
595
596 if (settings) {
597 settings->set_active_current(name);
598 }
599}
void handle_back_to_grid()
Return to grid mode (clear active stream).

References handle_back_to_grid(), and settings.

Here is the call graph for this function:

◆ handle_show_stream_changed

void controller::handle_show_stream_changed ( const QString & name,
bool show )
slot

Handler for stream visibility toggles in UI.

When show is true:

  • adds stream tile to grid,
  • configures its source/loop based on backend stream type,
  • installs persistent line overlays,
  • connects tile frame_ready to on_gui_frame.

When false:

  • removes tile from grid,
  • also clears active view if this stream was active.

Updates repaint + analysis caps after change.

Parameters
nameStream name.
showWhether to show or hide it.

Definition at line 148 of file controller.cpp.

150 {
151 if (!grid) {
152 return;
153 }
154
155 if (show) {
156 grid->add_stream(name);
157 if (auto* tile = grid->peek_stream_cell(name)) {
158 connect(
159 tile, &stream_cell::frame_ready, this,
160 &controller::on_gui_frame, Qt::UniqueConnection
161 );
162 tile->set_persistent_lines(per_stream_lines.value(name));
163
164 const auto s = stream_mgr->find_stream(name.toStdString());
165 if (s) {
166 tile->set_loop(s->is_looping());
167 const auto path = QString::fromStdString(s->get_path());
168 const auto type = s->get_type();
169
171 tile->set_camera_id(path.toUtf8());
172 } else if (type == yodau::backend::stream_type::file) {
173 tile->set_source(QUrl::fromLocalFile(path));
174 } else {
175 tile->set_source(QUrl(path));
176 }
177 }
178 }
179 } else {
180 grid->remove_stream(name);
181 if (!active_name.isEmpty() && active_name == name && main_zone) {
182 if (auto* cell = main_zone->take_active_cell()) {
183 cell->deleteLater();
184 }
185 active_name.clear();
186 if (settings) {
187 settings->set_active_current(QString());
188 }
189 }
190 }
191
192 if (settings) {
193 settings->set_active_candidates(grid->stream_names());
194 }
195
198}
void update_analysis_caps()
Update backend analysis interval based on visible tile count.
void update_repaint_caps()
Update repaint interval caps for all visible tiles.
void on_gui_frame(const QString &stream_name, const QImage &image)
Slot receiving GUI frames from stream tiles.
void frame_ready(const QString &stream_name, const QImage &image)
Emitted whenever a new frame image becomes available.

References grid_view::add_stream(), yodau::backend::file, grid, yodau::backend::local, main_zone, grid_view::peek_stream_cell(), grid_view::remove_stream(), stream_cell::set_loop(), settings, stream_mgr, board::take_active_cell(), update_analysis_caps(), and update_repaint_caps().

Here is the call graph for this function:

◆ handle_thumb_activate()

void controller::handle_thumb_activate ( const QString & name)
private

Convenience alias for activating a thumbnail stream.

Definition at line 609 of file controller.cpp.

609 {
611}
void handle_enlarge_requested(const QString &name)
Handle focus/enlarge requests from grid tiles.

◆ init_from_backend()

void controller::init_from_backend ( )

Populate settings UI from backend at startup.

Reads stream list from backend, adds them to settings panel, and registers them as existing names to prevent duplicates.

Safe to call multiple times; it will re-add current backend streams.

Definition at line 77 of file controller.cpp.

77 {
78 if (!stream_mgr || !settings) {
79 return;
80 }
81
82 QSet<QString> names;
83
84 const auto backend_names = stream_mgr->stream_names();
85 for (auto& n : backend_names) {
86 const auto qname = QString::fromStdString(n);
87 names.insert(qname);
88
89 QString desc = str_label("<unknown>");
90 const auto s = stream_mgr->find_stream(n);
91 if (s) {
92 // const auto t = s->get_type();
93 const auto path = QString::fromStdString(s->get_path());
94 const auto type = QString::fromStdString(
96 );
97 desc = QString("%1:%2").arg(type, path);
98 }
99
100 settings->add_stream_entry(qname, desc);
101 }
102
103 settings->set_existing_names(names);
104}
static std::string type_name(const stream_type type)
Convert a stream type to a canonical textual name.
Definition stream.cpp:73
#define str_label(text)
Create a user-visible localized label.
Definition str_label.hpp:29

References settings, and stream_mgr.

Referenced by controller().

Here is the caller graph for this function:

◆ log_active()

void controller::log_active ( const QString & msg) const
private

Append a message to the active log (if settings exists).

Definition at line 680 of file controller.cpp.

680 {
681 if (settings) {
682 settings->append_active_log(msg);
683 }
684}

References settings.

◆ now_ts()

QString controller::now_ts ( )
staticprivate

Current wall-clock timestamp as human-readable string.

Used for log messages.

Returns
Timestamp like "HH:mm:ss".

Definition at line 580 of file controller.cpp.

580 {
581 return QDateTime::currentDateTime().toString("HH:mm:ss");
582}

◆ on_active_edit_mode_changed

void controller::on_active_edit_mode_changed ( bool drawing_new)
privateslot

Handler for toggling active edit mode.

When drawing_new is true, user draws a new line. Otherwise user previews/templates existing lines.

Parameters
drawing_newNew edit mode flag.

Definition at line 239 of file controller.cpp.

239 {
240 drawing_new_mode = drawing_new;
241
242 if (!main_zone) {
243 return;
244 }
245
246 if (auto* cell = main_zone->active_cell()) {
247 cell->clear_draft();
248 cell->set_drawing_enabled(drawing_new);
249
250 if (drawing_new) {
251 cell->set_draft_params(
253 );
254 } else if (settings) {
255 apply_template_preview(settings->active_template_current());
256 }
257 }
258
259 if (settings) {
260 settings->append_active_log(
261 QString("edit mode: %1")
262 .arg(drawing_new ? "draw new" : "use template")
263 );
264 }
265}
bool drawing_new_mode
True if active edit mode is "draw new line".
void apply_template_preview(const QString &template_name)
Apply a template preview into the active cell draft.

References board::active_cell(), stream_cell::clear_draft(), drawing_new_mode, main_zone, stream_cell::set_drawing_enabled(), and settings.

Referenced by setup_settings_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_active_labels_enabled_changed

void controller::on_active_labels_enabled_changed ( bool on)
privateslot

Handler for toggling persistent label visibility in active view.

Parameters
onTrue to enable labels.

Definition at line 427 of file controller.cpp.

427 {
429
430 if (!main_zone) {
431 return;
432 }
433
434 if (auto* cell = main_zone->active_cell()) {
435 cell->set_labels_enabled(active_labels_enabled);
436 }
437}
bool active_labels_enabled
Whether labels are enabled in active cell.

References board::active_cell(), active_labels_enabled, main_zone, and stream_cell::set_labels_enabled().

Referenced by setup_settings_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_active_line_params_changed

void controller::on_active_line_params_changed ( const QString & name,
const QColor & color,
bool closed )
privateslot

Handler for changes to "new line" draft parameters.

Stores parameters locally and applies them to active cell draft.

Parameters
nameDraft line name.
colorDraft line color.
closedDraft closed flag.

Definition at line 267 of file controller.cpp.

269 {
270 draft_line_name = name;
271 draft_line_color = color;
272 draft_line_closed = closed;
273
274 if (main_zone) {
275 if (auto* cell = main_zone->active_cell()) {
276 cell->set_draft_params(
278 );
279 }
280 }
281
282 if (settings) {
283 settings->append_active_log(
284 QString("active line params: name='%1' color=%2 closed=%3")
285 .arg(draft_line_name)
286 .arg(draft_line_color.name())
287 .arg(draft_line_closed ? "true" : "false")
288 );
289 }
290}

References board::active_cell(), draft_line_closed, main_zone, and settings.

Here is the call graph for this function:

◆ on_active_line_save_requested

void controller::on_active_line_save_requested ( const QString & name,
bool closed )
privateslot

Handler for saving a newly drawn draft line.

Reads draft points from active cell, converts to string, adds line to backend, connects it to the active stream, and updates UI state.

Parameters
nameDesired line name (may be auto-resolved by backend).
closedWhether line is closed.

Definition at line 292 of file controller.cpp.

294 {
295 log_active(QString("save click: name='%1' closed=%2 active='%3'")
296 .arg(name)
297 .arg(closed ? "true" : "false")
298 .arg(active_name));
299
300 auto* cell = active_cell_checked("add line");
301 if (!cell) {
302 return;
303 }
304
305 const auto pts = cell->draft_points_pct();
306 if (pts.size() < 2) {
307 log_active("add line failed: need at least 2 points");
308 return;
309 }
310
311 const auto points_str = points_str_from_pct(pts);
312 log_active(QString("points_str = %1").arg(points_str));
313
314 try {
315 const auto lp = stream_mgr->add_line(
316 points_str.toStdString(), closed, name.toStdString()
317 );
318
319 const auto final_name = QString::fromStdString(lp->name);
320 apply_added_line(cell, final_name, pts, closed);
321 } catch (const std::exception& e) {
322 log_active(QString("add line failed: %1").arg(e.what()));
323 }
324}
static QString points_str_from_pct(const std::vector< QPointF > &pts)
Convert draft points to backend format string.
stream_cell * active_cell_checked(const QString &fail_prefix)
Get active cell or log a failure.
void apply_added_line(stream_cell *cell, const QString &final_name, const std::vector< QPointF > &pts, bool closed)
Apply effects of a newly added line to UI and state.

References stream_mgr.

◆ on_active_line_undo_requested

void controller::on_active_line_undo_requested ( )
privateslot

Handler for undoing last draft point.

Removes last draft vertex from active cell.

Definition at line 408 of file controller.cpp.

408 {
409 if (!main_zone) {
410 return;
411 }
412
413 auto* cell = main_zone->active_cell();
414 if (!cell) {
415 return;
416 }
417
418 auto pts = cell->draft_points_pct();
419 if (pts.empty()) {
420 return;
421 }
422
423 pts.pop_back();
424 cell->set_draft_points_pct(pts);
425}

References board::active_cell(), and main_zone.

Referenced by setup_settings_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_active_stream_selected

void controller::on_active_stream_selected ( const QString & name)
privateslot

Handler for selecting an active stream in settings.

Moves the stream cell into the active container (or clears active view), applies edit mode settings, and refreshes persistent lines/templates.

Parameters
nameStream name to activate, or empty to deactivate.

Definition at line 206 of file controller.cpp.

206 {
207 if (!main_zone) {
208 return;
209 }
210
211 active_name = name;
212
213 if (name.isEmpty()) {
214 main_zone->clear_active();
215 } else {
216 main_zone->set_active_stream(name);
217 }
218
219 if (auto* cell = main_zone->active_cell()) {
220 cell->set_labels_enabled(active_labels_enabled);
221
222 cell->clear_draft();
223 cell->set_drawing_enabled(drawing_new_mode);
224
225 if (drawing_new_mode) {
226 cell->set_draft_params(
228 );
229 } else if (settings) {
230 apply_template_preview(settings->active_template_current());
231 }
232 }
233
237}

References board::active_cell(), active_labels_enabled, board::clear_active(), stream_cell::clear_draft(), drawing_new_mode, main_zone, board::set_active_stream(), stream_cell::set_drawing_enabled(), stream_cell::set_labels_enabled(), settings, sync_active_persistent(), update_analysis_caps(), and update_repaint_caps().

Here is the call graph for this function:

◆ on_active_template_add_requested

void controller::on_active_template_add_requested ( const QString & template_name,
const QColor & color )
privateslot

Handler for adding the selected template to the active stream.

Connects backend line, adds a persistent line instance to UI, and resets template form.

Parameters
template_nameTemplate to add.
colorColor to render this instance in the active stream.

Definition at line 351 of file controller.cpp.

353 {
354 auto* cell = active_cell_checked("add template");
355 if (!cell) {
356 return;
357 }
358
359 if (!templates.contains(template_name)) {
360 if (settings) {
361 settings->append_active_log(
362 QString("add template failed: unknown template '%1'")
363 .arg(template_name)
364 );
365 }
366 return;
367 }
368
369 const auto tpl = templates.value(template_name);
370
371 try {
372 stream_mgr->set_line(
373 active_name.toStdString(), template_name.toStdString()
374 );
375 } catch (const std::exception& e) {
376 if (settings) {
377 settings->append_active_log(
378 QString("add template failed: %1").arg(e.what())
379 );
380 }
381 return;
382 }
383
384 stream_cell::line_instance inst;
385 inst.template_name = template_name;
386 inst.color = color;
387 inst.closed = tpl.closed;
388 inst.pts_pct = tpl.pts_pct;
389
390 per_stream_lines[active_name].push_back(inst);
391 cell->add_persistent_line(inst);
392
393 if (settings) {
394 settings->append_active_log(
395 QString("template added to active: %1").arg(template_name)
396 );
397 }
398
399 cell->clear_draft();
400
401 if (settings) {
402 settings->reset_active_template_form();
403 }
404
406}

References settings_panel::reset_active_template_form(), settings, and sync_active_persistent().

Here is the call graph for this function:

◆ on_active_template_color_changed

void controller::on_active_template_color_changed ( const QColor & color)
privateslot

Handler for changing template preview color.

Reapplies template preview with new color (template mode only).

Parameters
colorNew preview color.

Definition at line 333 of file controller.cpp.

333 {
334 Q_UNUSED(color);
335
336 if (drawing_new_mode) {
337 return;
338 }
339 if (!settings) {
340 return;
341 }
342
343 const auto t = settings->active_template_current();
344 if (t.isEmpty()) {
345 return;
346 }
347
349}

References drawing_new_mode, and settings.

◆ on_active_template_selected

void controller::on_active_template_selected ( const QString & template_name)
privateslot

Handler for selecting a template while in template mode.

Preview is applied to active cell draft.

Parameters
template_nameTemplate name.

Definition at line 326 of file controller.cpp.

326 {
327 if (drawing_new_mode) {
328 return;
329 }
330 apply_template_preview(template_name);
331}

References drawing_new_mode.

◆ on_backend_event()

void controller::on_backend_event ( const yodau::backend::event & e)
private

Handle a single backend event (GUI-thread safe).

Definition at line 866 of file controller.cpp.

866 {
867 if (QThread::currentThread() != thread()) {
868 const auto copy = e;
869 QMetaObject::invokeMethod(
870 this, [this, copy]() { on_backend_event(copy); },
871 Qt::QueuedConnection
872 );
873 return;
874 }
875
876 const auto name = QString::fromStdString(e.stream_name);
877 auto* tile = tile_for_stream_name(name);
878 if (!tile) {
879 return;
880 }
881
882 if (!e.pos_pct.has_value()) {
883 return;
884 }
885
887 if (!e.line_name.empty()) {
888 const auto ln = QString::fromStdString(e.line_name);
889 const auto& p = *e.pos_pct;
890 tile->highlight_line_at(ln, QPointF(p.x, p.y));
891 }
892 }
893
894 const auto& p = *e.pos_pct;
895 tile->add_event(QPointF(p.x, p.y), Qt::gray);
896}
void on_backend_event(const yodau::backend::event &e)
Handle a single backend event (GUI-thread safe).
stream_cell * tile_for_stream_name(const QString &name) const
Resolve a tile widget for a given stream name.
event_kind kind
Type of the event.
Definition event.hpp:50
std::string stream_name
Name/identifier of the stream that produced the event.
Definition event.hpp:57
std::optional< point > pos_pct
Optional position associated with the event in percentage coordinates.
Definition event.hpp:79
std::string line_name
Name of the line / ROI / rule responsible for this event.
Definition event.hpp:86

References yodau::backend::event::kind, yodau::backend::event::line_name, and yodau::backend::tripwire.

◆ on_backend_events()

void controller::on_backend_events ( const std::vector< yodau::backend::event > & evs)
private

Handle a batch of backend events.

Definition at line 794 of file controller.cpp.

796 {
797 for (const auto& e : evs) {
799 }
800}

◆ on_gui_frame

void controller::on_gui_frame ( const QString & stream_name,
const QImage & image )
slot

Slot receiving GUI frames from stream tiles.

Converts a QImage to backend yodau::backend::frame and pushes it to the backend for analysis.

Parameters
stream_nameStream name.
imageLatest frame from GUI.

Definition at line 857 of file controller.cpp.

857 {
858 if (!stream_mgr) {
859 return;
860 }
861
862 auto f = frame_from_image(image);
863 stream_mgr->push_frame(stream_name.toStdString(), std::move(f));
864}
yodau::backend::frame frame_from_image(const QImage &image) const
Convert a QImage into backend frame.

References stream_mgr.

◆ points_str_from_pct()

QString controller::points_str_from_pct ( const std::vector< QPointF > & pts)
staticprivate

Convert draft points to backend format string.

Output is parsable by backend yodau::backend::parse_points.

Parameters
ptsPercentage points.
Returns
String like "(x,y); (x,y); ...".

Definition at line 686 of file controller.cpp.

686 {
687 QStringList parts;
688 parts.reserve(static_cast<int>(pts.size()));
689 for (const auto& p : pts) {
690 parts << QString("(%1,%2)").arg(p.x(), 0, 'f', 3).arg(p.y(), 0, 'f', 3);
691 }
692 return parts.join("; ");
693}

◆ register_stream_in_ui()

void controller::register_stream_in_ui ( const QString & final_name,
const QString & source_desc )
private

Add newly created backend stream into UI structures.

Updates settings entries and refreshes repaint/analysis caps.

Parameters
final_nameActual backend name used for stream.
source_descHuman-readable source description.

Definition at line 565 of file controller.cpp.

567 {
568 if (!settings) {
569 return;
570 }
571
572 settings->add_existing_name(final_name);
573 settings->add_stream_entry(final_name, source_desc);
574 settings->clear_add_inputs();
575
578}

References settings_panel::clear_add_inputs(), settings, update_analysis_caps(), and update_repaint_caps().

Here is the call graph for this function:

◆ repaint_interval_for_count()

int controller::repaint_interval_for_count ( int n)
staticprivate

Choose repaint interval given number of visible streams.

Parameters
nVisible stream count.
Returns
Interval in ms.

Definition at line 802 of file controller.cpp.

802 {
803 if (n <= 2) {
804 return 33;
805 }
806
807 if (n <= 4) {
808 return 66;
809 }
810
811 if (n <= 9) {
812 return 100;
813 }
814
815 return 166;
816}

Referenced by update_analysis_caps(), and update_repaint_caps().

Here is the caller graph for this function:

◆ setup_grid_connections()

void controller::setup_grid_connections ( )
private

Connect grid_view signals to controller handlers.

Definition at line 490 of file controller.cpp.

490 {
491 if (!grid) {
492 return;
493 }
494
495 connect(grid, &grid_view::stream_closed, this, [this](const QString& name) {
496 if (settings) {
497 settings->set_stream_checked(name, false);
498 }
499 });
500
501 connect(
504 );
505}
void stream_closed(const QString &name)
Emitted after a stream cell was closed and removed.
void stream_enlarge(const QString &name)
Emitted when a stream cell requests focus/enlargement.

References grid, grid_view::grid_view(), and grid_view::stream_enlarge().

Referenced by controller().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_settings_connections()

void controller::setup_settings_connections ( )
private

Connect settings_panel signals to controller slots.

Definition at line 439 of file controller.cpp.

439 {
440 if (!settings || !main_zone) {
441 return;
442 }
443
444 connect(
447 );
448
449 connect(
452 );
453
454 connect(
457 );
458
459 connect(
462 );
463
464 connect(
467 );
468
469 connect(
472 );
473
474 connect(
477 );
478
479 connect(
482 );
483
484 connect(
487 );
488}
void on_active_template_selected(const QString &template_name)
Handler for selecting a template while in template mode.
void on_active_line_undo_requested()
Handler for undoing last draft point.
void on_active_template_color_changed(const QColor &color)
Handler for changing template preview color.
void on_active_template_add_requested(const QString &template_name, const QColor &color)
Handler for adding the selected template to the active stream.
void on_active_edit_mode_changed(bool drawing_new)
Handler for toggling active edit mode.
void on_active_line_params_changed(const QString &name, const QColor &color, bool closed)
Handler for changes to "new line" draft parameters.
void on_active_line_save_requested(const QString &name, bool closed)
Handler for saving a newly drawn draft line.
void on_active_labels_enabled_changed(bool on)
Handler for toggling persistent label visibility in active view.
void active_line_undo_requested()
Emitted when user requests undo of the last draft point.
void active_template_selected(const QString &template_name)
Emitted when template selection changes.
void active_stream_selected(const QString &name)
Emitted when the active stream selection changes.
void active_line_save_requested(const QString &name, bool closed)
Emitted when user clicks "add line" in active tab.
void active_edit_mode_changed(bool drawing_new)
Emitted when edit mode changes.
void active_labels_enabled_changed(bool on)
Emitted when label visibility toggle changes.
void active_line_params_changed(const QString &name, const QColor &color, bool closed)
Emitted when any draft-line parameter changes.
void active_template_add_requested(const QString &template_name, const QColor &color)
Emitted when user adds a template instance to active stream.
void active_template_color_changed(const QColor &color)
Emitted when template preview color changes.

References settings_panel::active_edit_mode_changed(), settings_panel::active_labels_enabled_changed(), settings_panel::active_line_undo_requested(), main_zone, on_active_edit_mode_changed(), on_active_labels_enabled_changed(), on_active_line_undo_requested(), per_stream_lines, settings, and settings_panel::settings_panel().

Referenced by controller().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sync_active_cell_lines()

void controller::sync_active_cell_lines ( ) const
private

Push per-stream persistent lines into the active UI cell.

Definition at line 732 of file controller.cpp.

732 {
733 if (!main_zone) {
734 return;
735 }
736
737 if (auto* cell = main_zone->active_cell()) {
738 cell->set_persistent_lines(per_stream_lines.value(active_name));
739 }
740}

References board::active_cell(), and main_zone.

Referenced by sync_active_persistent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sync_active_persistent()

void controller::sync_active_persistent ( )
private

Sync persistent line overlays and template candidates for active stream.

Definition at line 636 of file controller.cpp.

636 {
637 if (!main_zone || active_name.isEmpty()) {
638 if (settings) {
639 settings->set_template_candidates({});
640 }
641 return;
642 }
643
645
646 if (!settings) {
647 return;
648 }
649
651 settings->set_template_candidates(template_candidates_excluding(used));
652}
QSet< QString > used_template_names_for_stream(const QString &stream) const
Collect template names already used by a stream.
QStringList template_candidates_excluding(const QSet< QString > &used) const
List templates not present in a given used set.
void sync_active_cell_lines() const
Push per-stream persistent lines into the active UI cell.

References settings, and sync_active_cell_lines().

Referenced by apply_added_line(), on_active_stream_selected(), and on_active_template_add_requested().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ template_candidates_excluding()

QStringList controller::template_candidates_excluding ( const QSet< QString > & used) const
private

List templates not present in a given used set.

Parameters
usedAlready used names.
Returns
Candidate list.

Definition at line 758 of file controller.cpp.

758 {
759 QStringList candidates;
760 candidates.reserve(templates.size());
761
762 for (auto it = templates.begin(); it != templates.end(); ++it) {
763 const QString name = it.key();
764 if (!used.contains(name)) {
765 candidates << name;
766 }
767 }
768
769 return candidates;
770}

◆ tile_for_stream_name()

stream_cell * controller::tile_for_stream_name ( const QString & name) const
private

Resolve a tile widget for a given stream name.

Prefers active cell if it matches name, otherwise looks in grid.

Parameters
nameStream name.
Returns
Stream cell pointer or nullptr.

Definition at line 818 of file controller.cpp.

818 {
819 if (main_zone && !active_name.isEmpty() && active_name == name) {
820 if (auto* cell = main_zone->active_cell()) {
821 return cell;
822 }
823 }
824
825 if (grid) {
826 if (auto* tile = grid->peek_stream_cell(name)) {
827 return tile;
828 }
829 }
830
831 return nullptr;
832}

References board::active_cell(), grid, main_zone, and grid_view::peek_stream_cell().

Here is the call graph for this function:

◆ update_analysis_caps()

void controller::update_analysis_caps ( )
private

Update backend analysis interval based on visible tile count.

Definition at line 67 of file controller.cpp.

67 {
68 if (!stream_mgr || !grid) {
69 return;
70 }
71
72 const int n = static_cast<int>(grid->stream_names().size());
73 const int interval = repaint_interval_for_count(n);
74 stream_mgr->set_analysis_interval_ms(interval);
75}
static int repaint_interval_for_count(int n)
Choose repaint interval given number of visible streams.

References grid, repaint_interval_for_count(), and stream_mgr.

Referenced by handle_show_stream_changed(), on_active_stream_selected(), and register_stream_in_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_repaint_caps()

void controller::update_repaint_caps ( )
private

Update repaint interval caps for all visible tiles.

Definition at line 772 of file controller.cpp.

772 {
773 if (!grid) {
774 return;
775 }
776
777 const auto names = grid->stream_names();
778 const int n = static_cast<int>(names.size());
779 const int interval = repaint_interval_for_count(n);
780
781 for (const auto& name : names) {
782 if (auto* tile = grid->peek_stream_cell(name)) {
783 tile->set_repaint_interval_ms(interval);
784 }
785 }
786
787 if (!active_name.isEmpty()) {
788 if (auto* cell = grid->peek_stream_cell(active_name)) {
789 cell->set_repaint_interval_ms(active_interval_ms);
790 }
791 }
792}
int active_interval_ms
Repaint interval for active (focused) stream in ms.

References active_interval_ms, grid, and repaint_interval_for_count().

Referenced by handle_show_stream_changed(), on_active_stream_selected(), and register_stream_in_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ used_template_names_for_stream()

QSet< QString > controller::used_template_names_for_stream ( const QString & stream) const
private

Collect template names already used by a stream.

Parameters
streamStream name.
Returns
Set of used template names.

Definition at line 743 of file controller.cpp.

743 {
744 QSet<QString> used;
745
746 const auto current_lines = per_stream_lines.value(stream);
747 for (const auto& inst : current_lines) {
748 const auto tn = inst.template_name.trimmed();
749 if (!tn.isEmpty()) {
750 used.insert(tn);
751 }
752 }
753
754 return used;
755}

Member Data Documentation

◆ active_interval_ms

int controller::active_interval_ms { 33 }
private

Repaint interval for active (focused) stream in ms.

Definition at line 523 of file controller.hpp.

523{ 33 };

Referenced by update_repaint_caps().

◆ active_labels_enabled

bool controller::active_labels_enabled { true }
private

Whether labels are enabled in active cell.

Definition at line 482 of file controller.hpp.

482{ true };

Referenced by on_active_labels_enabled_changed(), and on_active_stream_selected().

◆ active_name

QString controller::active_name
private

Name of currently active stream (empty if none).

Definition at line 476 of file controller.hpp.

◆ draft_line_closed

bool controller::draft_line_closed { false }
private

Draft line closed flag.

Definition at line 491 of file controller.hpp.

491{ false };

Referenced by apply_added_line(), and on_active_line_params_changed().

◆ draft_line_color

QColor controller::draft_line_color { Qt::red }
private

Draft line preview color.

Definition at line 488 of file controller.hpp.

488{ Qt::red };

◆ draft_line_name

QString controller::draft_line_name
private

Draft line name being edited.

Definition at line 485 of file controller.hpp.

◆ drawing_new_mode

bool controller::drawing_new_mode { true }
private

True if active edit mode is "draw new line".

Definition at line 479 of file controller.hpp.

479{ true };

Referenced by on_active_edit_mode_changed(), on_active_stream_selected(), on_active_template_color_changed(), and on_active_template_selected().

◆ grid

grid_view* controller::grid { nullptr }
private

Grid view extracted from board (non-owning).

Definition at line 471 of file controller.hpp.

471{ nullptr };

Referenced by controller(), handle_show_stream_changed(), setup_grid_connections(), tile_for_stream_name(), update_analysis_caps(), and update_repaint_caps().

◆ idle_interval_ms

int controller::idle_interval_ms { 66 }
private

Repaint interval for idle grid streams in ms.

Definition at line 526 of file controller.hpp.

526{ 66 };

◆ main_zone

◆ per_stream_lines

QMap<QString, std::vector<stream_cell::line_instance> > controller::per_stream_lines
private

Per-stream persistent line instances keyed by stream name.

Each instance carries its own color and closed flag for rendering.

Definition at line 514 of file controller.hpp.

Referenced by main_window::main_window(), and setup_settings_connections().

◆ settings

◆ stream_loops

QMap<QString, bool> controller::stream_loops
private

Remembered stream loop flags keyed by stream name.

Definition at line 520 of file controller.hpp.

◆ stream_mgr

yodau::backend::stream_manager* controller::stream_mgr { nullptr }
private

◆ stream_sources

QMap<QString, QUrl> controller::stream_sources
private

Remembered stream sources (as QUrl) keyed by stream name.

Definition at line 517 of file controller.hpp.

◆ templates

QMap<QString, tpl_line> controller::templates
private

Template registry keyed by template name.

Definition at line 507 of file controller.hpp.


The documentation for this class was generated from the following files: