BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Serves as observer for FitObjective and saves fit iteration data for later display in GUI widgets.
Definition at line 30 of file GUIFitObserver.h.
Public Slots | |
void | setInterval (int val) |
Signals | |
void | updateReady () |
Public Member Functions | |
GUIFitObserver (QObject *parent=nullptr) | |
~GUIFitObserver () override | |
void | finishedPlotting () |
Informs observer that FitSuiteWidget has finished plotting and is ready for next plot. More... | |
FitProgressInfo | progressInfo () |
void | update (const FitObjective *subject) |
Private Member Functions | |
bool | is_obligatory_iteration (const FitObjective *fitSuite) const |
Returns true if given iteration should be obligary plotted. More... | |
bool | is_suitable_iteration (const FitObjective *fitSuite) const |
Returns true if data could be plotted, when there are resources for it. More... | |
Private Attributes | |
bool | m_block_update_plots |
FitProgressInfo | m_iteration_info |
std::condition_variable | m_on_finish_notifier |
int | m_update_interval |
std::mutex | m_update_plot_mutex |
GUIFitObserver::GUIFitObserver | ( | QObject * | parent = nullptr | ) |
Definition at line 22 of file GUIFitObserver.cpp.
|
overridedefault |
void GUIFitObserver::finishedPlotting | ( | ) |
Informs observer that FitSuiteWidget has finished plotting and is ready for next plot.
Definition at line 83 of file GUIFitObserver.cpp.
References m_block_update_plots, m_on_finish_notifier, and m_update_plot_mutex.
|
private |
Returns true if given iteration should be obligary plotted.
Definition at line 71 of file GUIFitObserver.cpp.
Referenced by update().
|
private |
Returns true if data could be plotted, when there are resources for it.
Definition at line 59 of file GUIFitObserver.cpp.
References m_update_interval.
Referenced by update().
FitProgressInfo GUIFitObserver::progressInfo | ( | ) |
Definition at line 91 of file GUIFitObserver.cpp.
References m_block_update_plots, m_iteration_info, and m_update_plot_mutex.
|
slot |
Definition at line 76 of file GUIFitObserver.cpp.
References m_update_interval.
void GUIFitObserver::update | ( | const FitObjective * | subject | ) |
Definition at line 31 of file GUIFitObserver.cpp.
References is_obligatory_iteration(), is_suitable_iteration(), m_block_update_plots, FitProgressInfo::m_chi2, FitProgressInfo::m_iteration_count, m_iteration_info, FitProgressInfo::m_log_info, m_on_finish_notifier, FitProgressInfo::m_sim_values, m_update_plot_mutex, FitProgressInfo::m_values, and updateReady().
|
signal |
Referenced by FitSessionController::FitSessionController(), and update().
|
private |
Definition at line 53 of file GUIFitObserver.h.
Referenced by finishedPlotting(), progressInfo(), and update().
|
private |
Definition at line 57 of file GUIFitObserver.h.
Referenced by progressInfo(), and update().
|
private |
Definition at line 55 of file GUIFitObserver.h.
Referenced by finishedPlotting(), and update().
|
private |
Definition at line 56 of file GUIFitObserver.h.
Referenced by is_suitable_iteration(), and setInterval().
|
private |
Definition at line 54 of file GUIFitObserver.h.
Referenced by finishedPlotting(), progressInfo(), and update().