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

Method closeFile

app/src/CSV/Player.cpp:226–249  ·  view source on GitHub ↗

* @brief Closes the current CSV file and resets playback state. */

Source from the content-addressed store, hash-verified

224 * @brief Closes the current CSV file and resets playback state.
225 */
226void CSV::Player::closeFile()
227{
228 if (!isOpen())
229 return;
230
231 m_playing = false;
232 m_framePos = 0;
233 m_csvFile.close();
234 m_csvData.clear();
235 m_csvData.squeeze();
236 m_timestamp = "--.--";
237 m_timestampCache.clear();
238 m_useHighPrecisionTimestamps = false;
239 m_startTimestampSeconds = 0.0;
240 m_multiSource = false;
241 m_sourceColumnsByIndex.clear();
242
243 DataModel::FrameBuilder::instance().registerQuickPlotHeaders(QStringList());
244 DataModel::FrameBuilder::instance().setReplayColumnMap({});
245
246 Q_EMIT openChanged();
247 Q_EMIT timestampChanged();
248 Q_EMIT playerStateChanged();
249}
250
251/**
252 * @brief Advances to the next CSV row, capped at the last row.

Callers

nothing calls this directly

Calls 4

setReplayColumnMapMethod · 0.80
closeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected