76 std::function<
void(
bool)> on_complete =
nullptr);
85 std::function<
void(
bool)> on_complete =
nullptr);
140 std::shared_ptr<std::atomic<bool>>
alive_{
141 std::make_shared<std::atomic<bool>>(
true)};
Service coordinating correlation analysis execution and file export.
Configuration structures and defaults for application analysis.
Service responsible for loading trajectories and extracting structural metadata.
Dispatches analysis workflows to CorrelationEngine, handles cancellation, and exports data.
Definition AnalysisDispatcher.hpp:32
Controller class for the application orchestrating services and UI.
Definition AppController.hpp:44
std::shared_ptr< std::atomic< bool > > alive_
Lifetime guard for queued UI callbacks.
Definition FileIOHandler.hpp:140
::AppWindow & window_
Definition FileIOHandler.hpp:134
FileIOHandler(::AppWindow &window, TrajectoryLoader &loader, AnalysisDispatcher &dispatcher, ProgramOptions &options, AppController &controller)
Constructs the FileIOHandler with injected services.
Definition FileIOHandler.cpp:26
void refreshAtomCountsUI()
Populates UI AtomCount vector model with species counts, CPK colors, and unknown flags.
Definition FileIOHandler.cpp:369
AppController & controller_
Definition FileIOHandler.hpp:138
AnalysisDispatcher & dispatcher_
Definition FileIOHandler.hpp:136
void handleWriteFiles()
Displays file save dialog asynchronously and exports active structural data.
Definition FileIOHandler.cpp:92
std::vector< std::string > loaded_filepaths_
Active single or multi-file trajectory paths.
Definition FileIOHandler.hpp:144
void updateBoxDiagnosticsForFrame(size_t frame_index)
Updates simulation cell diagnostics on the UI for a specific trajectory frame.
Definition FileIOHandler.cpp:492
std::atomic< bool > dialog_active_
Concurrency guard preventing duplicate dialog launches.
Definition FileIOHandler.hpp:145
void startLoadingTrajectory(const std::string &filepath, std::function< void(bool)> on_complete=nullptr)
Initiates asynchronous trajectory loading on the background worker thread.
Definition FileIOHandler.cpp:238
void onTrajectoryLoadSuccess(const std::string &filepath)
Updates UI components and analysis options after successful trajectory loading.
Definition FileIOHandler.cpp:420
void handleReloadFile()
Reloads the currently loaded structure/trajectory file from disk asynchronously.
Definition FileIOHandler.cpp:469
void handleExportStructure()
Displays file save dialog asynchronously and exports/converts the active structure to POSCAR,...
Definition FileIOHandler.cpp:171
void startLoadingTrajectories(const std::vector< std::string > &filepaths, std::function< void(bool)> on_complete=nullptr)
Initiates asynchronous trajectory loading for multiple files on the background worker thread.
Definition FileIOHandler.cpp:297
void updateStructure3DView()
Updates 3D structure/trajectory view with loaded cell or trajectory.
Definition FileIOHandler.cpp:480
void handleRenameElement(const std::string &old_symbol, const std::string &new_symbol)
Renames an element species across the loaded trajectory and refreshes UI models.
Definition FileIOHandler.cpp:385
ProgramOptions & options_
Definition FileIOHandler.hpp:137
~FileIOHandler()
Destructor. Ensures background threads are joined.
Definition FileIOHandler.cpp:32
std::jthread load_thread_
Background thread for loading files without blocking UI.
Definition FileIOHandler.hpp:143
void executeWriteFiles(const std::string &filepath)
Executes export of active structural datasets based on the selected file path extension.
Definition FileIOHandler.cpp:79
std::jthread dialog_thread_
Background worker thread for native file dialogs.
Definition FileIOHandler.hpp:142
void updateFileMetadata(const std::string &filepath)
Updates loaded file metadata (basename, frame counts, atom counts) on the UI.
Definition FileIOHandler.cpp:531
void updateBoxDiagnostics(const core::Cell *cell)
Updates simulation cell diagnostics (volume, dimensions, density) on the UI.
Definition FileIOHandler.cpp:502
TrajectoryLoader & loader_
Definition FileIOHandler.hpp:135
void handleBrowseFile()
Displays file open dialog asynchronously and triggers background loading of selected structure/trajec...
Definition FileIOHandler.cpp:542
Manages loading of structure/trajectory files and provides atomic/cell metadata.
Definition TrajectoryLoader.hpp:34
Represents the simulation cell (periodic box).
Definition Cell.hpp:30
Definition AppController.hpp:27
Encapsulates all configurable options for the application.
Definition AppOptions.hpp:122