BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FitSessionManager.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/FitSessionManager.h
6 //! @brief Defines class FitSessionManager
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_FITSESSIONMANAGER_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_FITWIDGETS_FITSESSIONMANAGER_H
17 
18 #include <QMap>
19 #include <QObject>
20 
21 class JobModel;
22 class SessionItem;
23 class JobItem;
25 class JobMessagePanel;
26 
27 //! Handles all activity related to the simultaneous running of fitting jobs.
28 
29 class FitSessionManager : public QObject {
30  Q_OBJECT
31 public:
32  FitSessionManager(QObject* parent = nullptr);
33 
34  void setMessagePanel(JobMessagePanel* messagePanel);
35 
37 
38  void disableLogging();
39 
40 private:
42  void removeController(SessionItem* jobItem);
43 
44  //!< Fit controller which is currently attached to jobMessagePanel
47  QMap<SessionItem*, FitSessionController*> m_item_to_controller;
48 };
49 
50 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_FITWIDGETS_FITSESSIONMANAGER_H
Controls all activity related to the single fitting task for JobItem.
Handles all activity related to the simultaneous running of fitting jobs.
FitSessionManager(QObject *parent=nullptr)
JobMessagePanel * m_jobMessagePanel
FitSessionController * m_activeController
void removeController(SessionItem *jobItem)
Fit controller which is currently attached to jobMessagePanel.
FitSessionController * createController(JobItem *jobItem)
QMap< SessionItem *, FitSessionController * > m_item_to_controller
FitSessionController * sessionController(JobItem *item)
void setMessagePanel(JobMessagePanel *messagePanel)
The JobMessagePanel class shows log messages from FitActivityPanel at the bottom part of JobView.