MCPcopy Create free account
hub / github.com/chrxh/alien / initIntern

Method initIntern

source/Gui/StatisticsWindow.cpp:35–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void StatisticsWindow::initIntern(SimulationFacade simulationFacade)
36{
37 _simulationFacade = simulationFacade;
38
39 auto path = std::filesystem::current_path();
40 if (path.has_parent_path()) {
41 path = path.parent_path();
42 }
43 _startingPath = GlobalSettings::get().getValue("windows.statistics.starting path", path.string());
44 _settingsOpen = GlobalSettings::get().getValue("windows.statistics.settings.open", _settingsOpen);
45 _settingsHeight = GlobalSettings::get().getValue("windows.statistics.settings.height", scale(SettingsHeight));
46 _plotHeight = GlobalSettings::get().getValue("windows.statistics.plot height", _plotHeight);
47 _plotMode = GlobalSettings::get().getValue("windows.statistics.mode", _plotMode);
48 _timeHorizonForLiveStatistics = GlobalSettings::get().getValue("windows.statistics.live horizon", _timeHorizonForLiveStatistics);
49 _timeHorizonForLongtermStatistics = GlobalSettings::get().getValue("windows.statistics.long term horizon", _timeHorizonForLongtermStatistics);
50 _plotType = GlobalSettings::get().getValue("windows.statistics.plot type", _plotType);
51 _plotScale = GlobalSettings::get().getValue("windows.statistics.plot scale", _plotScale);
52 auto collapsedPlotIndexJoinedString = GlobalSettings::get().getValue("windows.statistics.collapsed plot indices", std::string());
53
54 if (!collapsedPlotIndexJoinedString.empty()) {
55 std::vector<std::string> collapsedPlotIndexStrings;
56 boost::split(collapsedPlotIndexStrings, collapsedPlotIndexJoinedString, boost::is_any_of(" "));
57 for (auto const& s : collapsedPlotIndexStrings) {
58 _collapsedPlotIndices.emplace(std::stoi(s));
59 }
60 }
61}
62
63StatisticsWindow::StatisticsWindow()
64 : AlienWindow("Statistics", "windows.statistics", false)

Callers

nothing calls this directly

Calls 3

scaleFunction · 0.85
splitFunction · 0.85
getValueMethod · 0.80

Tested by

no test coverage detected