* @brief Resets all data in the dashboard, including plot values, widget structures, and actions. */
| 956 | * @brief Resets all data in the dashboard, including plot values, widget structures, and actions. |
| 957 | */ |
| 958 | void UI::Dashboard::resetData(const bool notify) |
| 959 | { |
| 960 | if (AppState::instance().operationMode() != SerialStudio::ProjectFile |
| 961 | && m_points != kDefaultPlotPoints) { |
| 962 | m_points = kDefaultPlotPoints; |
| 963 | Q_EMIT pointsChanged(); |
| 964 | } |
| 965 | |
| 966 | WidgetRegistry::instance().clear(); |
| 967 | |
| 968 | m_fftValues.clear(); |
| 969 | m_pltValues.clear(); |
| 970 | m_multipltValues.clear(); |
| 971 | |
| 972 | m_fftValues.squeeze(); |
| 973 | m_pltValues.squeeze(); |
| 974 | m_multipltValues.squeeze(); |
| 975 | |
| 976 | m_layoutValid = false; |
| 977 | |
| 978 | clearPushTables(); |
| 979 | |
| 980 | #ifdef BUILD_COMMERCIAL |
| 981 | m_plotData3D.clear(); |
| 982 | m_plotData3D.squeeze(); |
| 983 | m_plot3DRings.clear(); |
| 984 | m_plot3DRings.squeeze(); |
| 985 | m_waterfallValues.clear(); |
| 986 | m_waterfallValues.squeeze(); |
| 987 | #endif |
| 988 | |
| 989 | m_gpsValues.clear(); |
| 990 | m_gpsValues.squeeze(); |
| 991 | |
| 992 | m_xAxisData.clear(); |
| 993 | m_yAxisData.clear(); |
| 994 | m_plotTimeRings.clear(); |
| 995 | m_multiplotTimeRings.clear(); |
| 996 | m_plotSweep.clear(); |
| 997 | m_multiplotSweep.clear(); |
| 998 | m_plotClocks.clear(); |
| 999 | |
| 1000 | m_widgetCount = 0; |
| 1001 | m_widgetMap.clear(); |
| 1002 | m_widgetGroups.clear(); |
| 1003 | m_widgetDatasets.clear(); |
| 1004 | m_datasetReferences.clear(); |
| 1005 | |
| 1006 | m_datasets.clear(); |
| 1007 | |
| 1008 | m_activePlots.clear(); |
| 1009 | m_activeFFTPlots.clear(); |
| 1010 | m_activeMultiplots.clear(); |
| 1011 | #ifdef BUILD_COMMERCIAL |
| 1012 | m_activeWaterfalls.clear(); |
| 1013 | #endif |
| 1014 | |
| 1015 | m_lastFrame = DataModel::Frame(); |
no test coverage detected