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

Method clearPlotData

app/src/UI/Dashboard.cpp:1035–1083  ·  view source on GitHub ↗

* @brief Clears only the time-series plot data without rebuilding the dashboard. */

Source from the content-addressed store, hash-verified

1033 * @brief Clears only the time-series plot data without rebuilding the dashboard.
1034 */
1035void UI::Dashboard::clearPlotData()
1036{
1037 for (auto& fft : m_fftValues)
1038 fft.clear();
1039
1040#ifdef BUILD_COMMERCIAL
1041 for (auto& wf : m_waterfallValues)
1042 wf.clear();
1043#endif
1044
1045 for (auto it = m_yAxisData.begin(); it != m_yAxisData.end(); ++it)
1046 it.value().clear();
1047
1048 for (auto it = m_xAxisData.begin(); it != m_xAxisData.end(); ++it)
1049 it.value().clear();
1050
1051 for (auto it = m_plotTimeRings.begin(); it != m_plotTimeRings.end(); ++it)
1052 it.value().clear();
1053
1054 for (auto it = m_multiplotTimeRings.begin(); it != m_multiplotTimeRings.end(); ++it)
1055 for (auto& ring : it.value())
1056 ring.clear();
1057
1058 for (auto it = m_plotSweep.begin(); it != m_plotSweep.end(); ++it)
1059 it.value().resetState();
1060
1061 for (auto it = m_multiplotSweep.begin(); it != m_multiplotSweep.end(); ++it)
1062 it.value().resetState();
1063
1064 m_plotClocks.clear();
1065
1066 for (auto& multiSeries : m_multipltValues)
1067 for (auto& yAxis : multiSeries.y)
1068 yAxis.clear();
1069
1070 for (auto& gps : m_gpsValues) {
1071 gps.latitudes.clear();
1072 gps.longitudes.clear();
1073 gps.altitudes.clear();
1074 }
1075
1076#ifdef BUILD_COMMERCIAL
1077 for (auto& ring : m_plot3DRings)
1078 ring.clear();
1079
1080 for (auto& plot3d : m_plotData3D)
1081 plot3d.clear();
1082#endif
1083}
1084
1085/**
1086 * @brief Enables/disables the action panel.

Callers 10

nextFrameMethod · 0.80
previousFrameMethod · 0.80
setProgressMethod · 0.80
setProgressMethod · 0.80
nextFrameMethod · 0.80
previousFrameMethod · 0.80
nextFrameMethod · 0.80
previousFrameMethod · 0.80
setProgressMethod · 0.80
coreClearPlotsFunction · 0.80

Calls 4

beginMethod · 0.80
clearMethod · 0.45
valueMethod · 0.45
resetStateMethod · 0.45

Tested by

no test coverage detected