62 [[nodiscard]]
static std::expected<void, std::string>
63 savePlot(
const std::string &filepath,
const std::string &plot_name,
65 std::span<const PinnedRun> pinned_runs,
66 const std::map<std::string, real_t> &ashcroft_weights = {});
79 void exportPlotAsync(
const std::string &default_base_path,
const std::string &plot_name,
82 std::map<std::string, real_t> ashcroft_weights,
StatusCallback on_status);
Manager for distribution function calculations (RDF, PAD, S(Q), etc.).
Manages curve visibility, custom colors, pinned runs, and toggle models for plots.
Common types, configuration structures, and palette/formatting utilities for SVG plotting.
void exportPlotAsync(const std::string &default_base_path, const std::string &plot_name, const correlation::analysis::Histogram *hist, correlation::plotters::PlotConfig config, std::vector< PinnedRun > pinned_runs, std::map< std::string, real_t > ashcroft_weights, StatusCallback on_status)
Launches the native OS save dialog on a background worker and executes the save on completion.
Definition PlotExportManager.cpp:65
PlotExportManager()
Default constructor.
PlotExportManager(PlotExportManager &&)=delete
bool isDialogActive() const noexcept
Checks if a native save file dialog is currently active.
Definition PlotExportManager.cpp:32
static std::expected< void, std::string > savePlot(const std::string &filepath, const std::string &plot_name, const correlation::analysis::Histogram *hist, correlation::plotters::PlotConfig config, std::span< const PinnedRun > pinned_runs, const std::map< std::string, real_t > &ashcroft_weights={})
Saves a plot synchronously to a destination filepath.
Definition PlotExportManager.cpp:34
PlotExportManager(const PlotExportManager &)=delete
std::function< void(const std::string &)> StatusCallback
Callback type for reporting export results or user cancellations.
Definition PlotExportManager.hpp:35
std::atomic< bool > dialog_active_
Definition PlotExportManager.hpp:92
PlotExportManager & operator=(PlotExportManager &&)=delete
~PlotExportManager()
Destructor. Joins active dialog thread if running.
Definition PlotExportManager.cpp:26
std::jthread dialog_thread_
Definition PlotExportManager.hpp:91
PlotExportManager & operator=(const PlotExportManager &)=delete
Definition AppController.hpp:27
Container for a single calculated distribution function.
Definition DistributionFunctions.hpp:226
Theme and layout configuration for the plot.
Definition PlotTypes.hpp:42