BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
RunFitControlWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Fit/RunFitControlWidget.h
6 //! @brief Defines class RunFitControlWidget
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_RUNFITCONTROLWIDGET_H
16 #define BORNAGAIN_GUI_VIEW_FIT_RUNFITCONTROLWIDGET_H
17 
19 #include <QWidget>
20 
21 class JobItem;
22 class QPushButton;
23 class QSlider;
24 class CautionSign;
25 class QLabel;
26 class FitSuiteItem;
27 
28 //! The RunFitControlWidget contains elements to start/stop fitting and to provide minimal
29 //! diagnostic. Part of FitSuiteWidget.
30 
32  Q_OBJECT
33 public:
34  RunFitControlWidget(QWidget* parent = nullptr);
35  ~RunFitControlWidget() override;
36 
37 signals:
40 
41 public slots:
42  void onFittingError(const QString& what);
43 
44 private slots:
45  void onSliderValueChanged(int value);
46  void onFitSuitePropertyChange(const QString& name);
47 
48 protected:
49  void subscribeToItem() override;
50  void unsubscribeFromItem() override;
51 
52 private:
54  int sliderValueToUpdateInterval(int value);
55  void updateControlElements();
56  JobItem* jobItem();
58  bool isValidJobItem();
61 
62  QPushButton* m_startButton;
63  QPushButton* m_stopButton;
64  QSlider* m_intervalSlider;
68 };
69 
70 #endif // BORNAGAIN_GUI_VIEW_FIT_RUNFITCONTROLWIDGET_H
Defines class ItemComboWidget.
The CautionSign controls appearance of CautionSignWidget on top of parent widget.
Definition: CautionSign.h:25
The RunFitControlWidget contains elements to start/stop fitting and to provide minimal diagnostic....
void onFittingError(const QString &what)
CautionSign * m_cautionSign
void unsubscribeFromItem() override
QPushButton * m_stopButton
QPushButton * m_startButton
FitSuiteItem * fitSuiteItem()
RunFitControlWidget(QWidget *parent=nullptr)
void updateControlElements()
Updates button "enabled" status and caution status depending on current job conditions.
int sliderValueToUpdateInterval(int value)
converts slider value (1-15) to update interval to be propagated to FitSuiteWidget
void onFitSuitePropertyChange(const QString &name)
void onSliderValueChanged(int value)
void subscribeToItem() override
The SessionItemWidget class is a base for all widgets representing the content of SessionItem....
QString const & name(EShape k)
Definition: particles.cpp:20