Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
PresetController.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
13
14#include <string>
15#include <vector>
16
17class AppWindow;
18
19namespace correlation::app {
20
21class AppController;
22
28public:
35 PresetController(::AppWindow &window, ProgramOptions &options, AppController &controller);
36
37 ~PresetController() = default;
42
47 void handleLoadPreset(int index);
48
53 void handleSavePreset(const std::string &name);
54
59 void handleDeletePreset(int index);
60
64 void refreshPresetList();
65
70 void handleMaterialTypeChanged(int type);
71
75 void initDomainPresets();
76
81 void handleApplyDomainPreset(int preset_id);
82
83private:
84 ::AppWindow &window_;
87
88 std::vector<Preset> presets_;
89};
90
91} // namespace correlation::app
Configuration structures and defaults for application analysis.
Manages saving and loading analysis parameter presets to and from JSON files.
Controller class for the application orchestrating services and UI.
Definition AppController.hpp:44
AppController & controller_
Definition PresetController.hpp:86
PresetController(::AppWindow &window, ProgramOptions &options, AppController &controller)
Constructs the PresetController with injected options.
Definition PresetController.cpp:19
PresetController(const PresetController &)=delete
void handleLoadPreset(int index)
Loads a preset configuration by UI index.
Definition PresetController.cpp:23
void handleMaterialTypeChanged(int type)
Applies default parameters when material type changes.
Definition PresetController.cpp:90
void initDomainPresets()
Initializes the domain presets list in the UI.
Definition PresetController.cpp:127
void handleApplyDomainPreset(int preset_id)
Applies a scientific domain preset by ID.
Definition PresetController.cpp:141
PresetController & operator=(PresetController &&)=delete
PresetController & operator=(const PresetController &)=delete
void handleSavePreset(const std::string &name)
Saves the current UI configuration as a named preset.
Definition PresetController.cpp:47
PresetController(PresetController &&)=delete
void handleDeletePreset(int index)
Deletes a saved preset by UI index.
Definition PresetController.cpp:63
::AppWindow & window_
Definition PresetController.hpp:84
void refreshPresetList()
Refreshes the list of available presets in the UI dropdown model.
Definition PresetController.cpp:75
ProgramOptions & options_
Definition PresetController.hpp:85
std::vector< Preset > presets_
Definition PresetController.hpp:88
Definition AppController.hpp:27
Encapsulates all configurable options for the application.
Definition AppOptions.hpp:122