BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FitWorkerLauncher.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/FitWidgets/FitWorkerLauncher.h
6 //! @brief Implements class FitWorkerLauncher
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 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_FITWIDGETS_FITWORKERLAUNCHER_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_FITWIDGETS_FITWORKERLAUNCHER_H
17 
18 #include <QObject>
19 #include <atomic>
20 #include <memory>
21 
23 
24 class FitWorkerLauncher : public QObject {
25  Q_OBJECT
26 
27 public:
28  FitWorkerLauncher(QObject* parent);
29 
30  void runFitting(std::shared_ptr<FitObjectiveBuilder> suite);
31 
32  int getDuration();
33 
34 public slots:
35  void interruptFitting();
36 
37 signals:
40  void fittingError(const QString& message);
42 
43 private slots:
44  void intern_workerFinished(int duration);
45 
46  void intern_workerStarted();
47 
48  void intern_error(const QString& mesg);
49 
50 private:
51  std::atomic<bool> m_is_fit_running;
53 };
54 
55 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_FITWIDGETS_FITWORKERLAUNCHER_H
void runFitting(std::shared_ptr< FitObjectiveBuilder > suite)
FitWorkerLauncher(QObject *parent)
void intern_interruptFittingWorker()
std::atomic< bool > m_is_fit_running
void fittingError(const QString &message)
void intern_error(const QString &mesg)
void intern_workerFinished(int duration)
int getDuration()
Returns duration of fit in msec.