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

Method onSaveParameters

source/Gui/SimulationParametersMainWindow.cpp:467–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467void SimulationParametersMainWindow::onSaveParameters()
468{
469 GenericFileDialog::get().showSaveFileDialog(
470 "Save simulation parameters", "Simulation parameters (*.parameters){.parameters},.*", _fileDialogPath, [&](std::filesystem::path const& path) {
471 auto firstFilename = ifd::FileDialog::Instance().GetResult();
472 auto firstFilenameCopy = firstFilename;
473 _fileDialogPath = firstFilenameCopy.remove_filename().string();
474
475 auto parameters = _simulationFacade->getSimulationParameters();
476 if (!SerializerService::get().serializeSimulationParametersToFile(firstFilename.string(), parameters)) {
477 GenericMessageDialog::get().information("Save simulation parameters", "The selected file could not be saved.");
478 }
479 });
480}
481
482void SimulationParametersMainWindow::onAddZone()
483{

Callers

nothing calls this directly

Calls 4

showSaveFileDialogMethod · 0.80
informationMethod · 0.80

Tested by

no test coverage detected