MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / setStreamingSources

Method setStreamingSources

pj_app/src/ui/LeftPanel.cpp:201–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201void LeftPanel::setStreamingSources(const QStringList& names) {
202 const QString previous = ui_->comboStreaming->currentText();
203 {
204 QSignalBlocker block(ui_->comboStreaming);
205 ui_->comboStreaming->clear();
206 ui_->comboStreaming->addItems(names);
207 const int idx = ui_->comboStreaming->findText(previous);
208 if (idx >= 0) {
209 ui_->comboStreaming->setCurrentIndex(idx);
210 }
211 }
212 // QComboBox auto-selects index 0 on the first addItems(), but the blocker
213 // above swallows the corresponding currentTextChanged; emit once so the
214 // visible selection matches what listeners (StreamingSourceManager) hold.
215 const QString current = ui_->comboStreaming->currentText();
216 if (current != previous) {
217 emit streamingSourceChanged(current);
218 }
219}
220
221void LeftPanel::applyPauseButtonState(QString theme) {
222 const bool paused = ui_->buttonStreamingPause->isChecked();

Callers 1

refreshStreamingComboMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected