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

Method initIntern

source/Gui/AutosaveWindow.cpp:32–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30{}
31
32void AutosaveWindow::initIntern(SimulationFacade simulationFacade, PersisterFacade persisterFacade)
33{
34 _simulationFacade = simulationFacade;
35 _persisterFacade = persisterFacade;
36 _settingsOpen = GlobalSettings::get().getValue("windows.autosave.settings.open", _settingsOpen);
37 _settingsHeight = GlobalSettings::get().getValue("windows.autosave.settings.height", _settingsHeight);
38 _autosaveEnabled = GlobalSettings::get().getValue("windows.autosave.enabled", _autosaveEnabled);
39 _origAutosaveInterval = GlobalSettings::get().getValue("windows.autosave.interval", _origAutosaveInterval);
40 _autosaveInterval = _origAutosaveInterval;
41
42 _origSaveMode = GlobalSettings::get().getValue("windows.autosave.mode", _origSaveMode);
43 _saveMode = _origSaveMode;
44
45 _origNumberOfFiles = GlobalSettings::get().getValue("windows.autosave.number of files", _origNumberOfFiles);
46 _numberOfFiles = _origNumberOfFiles;
47
48 _origDirectory = GlobalSettings::get().getValue("windows.autosave.directory", (std::filesystem::current_path() / Const::ResourcePath).string());
49 _directory = _origDirectory;
50
51 _origCatchPeaks = GlobalSettings::get().getValue("windows.autosave.catch peaks", _origCatchPeaks);
52 _catchPeaks = _origCatchPeaks;
53
54 _lastAutosaveTimepoint = std::chrono::steady_clock::now();
55 _lastPeakTimepoint = std::chrono::steady_clock::now();
56
57 _peakProcessor = _TaskProcessor::createTaskProcessor(_persisterFacade);
58 _peakDeserializedSimulation = std::make_shared<_SharedDeserializedSimulation>();
59 updateSavepointTableFromFile();
60}
61
62void AutosaveWindow::shutdownIntern()
63{

Callers

nothing calls this directly

Calls 1

getValueMethod · 0.80

Tested by

no test coverage detected