MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / displayFrameParserView

Method displayFrameParserView

app/src/DataModel/ProjectEditor.cpp:1287–1301  ·  view source on GitHub ↗

* @brief Selects the Frame Parser tree item for the given source, deferred. */

Source from the content-addressed store, hash-verified

1285 * @brief Selects the Frame Parser tree item for the given source, deferred.
1286 */
1287void DataModel::ProjectEditor::displayFrameParserView(int sourceId)
1288{
1289 QTimer::singleShot(100, this, [this, sourceId] {
1290 if (!m_selectionModel)
1291 return;
1292
1293 for (auto it = m_sourceParserItems.begin(); it != m_sourceParserItems.end(); ++it) {
1294 if (it.value().sourceId != sourceId)
1295 continue;
1296
1297 m_selectionModel->setCurrentIndex(it.key()->index(), QItemSelectionModel::ClearAndSelect);
1298 break;
1299 }
1300 });
1301}
1302
1303//--------------------------------------------------------------------------------------------------
1304// Model builders

Callers

nothing calls this directly

Calls 4

beginMethod · 0.80
setCurrentIndexMethod · 0.80
keyMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected