BornAgain  1.19.79
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/View/Fit/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_VIEW_FIT_FITWORKERLAUNCHER_H
16 #define BORNAGAIN_GUI_VIEW_FIT_FITWORKERLAUNCHER_H
17 
18 #include <QDateTime>
19 #include <QObject>
20 #include <atomic>
21 #include <memory>
22 
24 
25 class FitWorkerLauncher : public QObject {
26  Q_OBJECT
27 
28 public:
29  FitWorkerLauncher(QObject* parent);
30 
31  void runFitting(std::shared_ptr<FitObjectiveBuilder> suite);
32 
33  const QDateTime& fitStart() const;
34  const QDateTime& fitEnd() const;
35 
36 public slots:
37  void interruptFitting();
38 
39 signals:
42  void fittingError(const QString& message);
43 
44  void intern_interruptFittingWorker(QPrivateSignal);
45 
46 private slots:
47  void intern_workerFinished();
48 
49  void intern_workerStarted();
50 
51  void intern_error(const QString& mesg);
52 
53 private:
54  std::atomic<bool> m_is_fit_running;
55  QDateTime m_fit_start;
56  QDateTime m_fit_end;
57 };
58 
59 #endif // BORNAGAIN_GUI_VIEW_FIT_FITWORKERLAUNCHER_H
const QDateTime & fitEnd() const
void runFitting(std::shared_ptr< FitObjectiveBuilder > suite)
void intern_interruptFittingWorker(QPrivateSignal)
FitWorkerLauncher(QObject *parent)
std::atomic< bool > m_is_fit_running
void fittingError(const QString &message)
const QDateTime & fitStart() const
void intern_error(const QString &mesg)