BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
FitWorker.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Fit/FitWorker.cpp
6 //! @brief Implements class FitWorker
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #include "GUI/View/Fit/FitWorker.h"
17 #include <QDateTime>
18 
20 {
21  emit started();
22  try {
23  m_fit_objective->runFit();
24  } catch (const std::exception& ex) {
25  emit error(QString::fromLatin1(ex.what()));
26  }
27  emit finished();
28 }
29 
31 {
32  if (m_fit_objective)
33  m_fit_objective->interruptFitting();
34 }
Defines class FitObjectiveBuilder.
Implements class FitWorker.
std::shared_ptr< FitObjectiveBuilder > m_fit_objective
Definition: FitWorker.h:44
void interruptFitting()
Definition: FitWorker.cpp:30
void startFit()
Definition: FitWorker.cpp:19
void started()
void finished()
void error(const QString &message)