BornAgain  1.19.0
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/coregui/Views/FitWidgets/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_COREGUI_VIEWS_FITWIDGETS_RUNFITCONTROLWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_FITWIDGETS_RUNFITCONTROLWIDGET_H
17 
19 #include <QWidget>
20 
21 class JobItem;
22 class QPushButton;
23 class QSlider;
24 class WarningSign;
25 class QLabel;
26 class FitSuiteItem;
27 class JobMessagePanel;
28 
29 //! The RunFitControlWidget contains elements to start/stop fitting and to provide minimal
30 //! diagnostic. Part of FitSuiteWidget.
31 
33  Q_OBJECT
34 public:
35  RunFitControlWidget(QWidget* parent = 0);
37 
38 signals:
41 
42 public slots:
43  void onFittingError(const QString& what);
44 
45 private slots:
46  void onSliderValueChanged(int value);
47  void onFitSuitePropertyChange(const QString& name);
48 
49 protected:
50  virtual void subscribeToItem();
51  virtual void unsubscribeFromItem();
52 
53 private:
55  int sliderValueToUpdateInterval(int value);
56  void updateControlElements();
57  JobItem* jobItem();
59  bool isValidJobItem();
61 
62  QPushButton* m_startButton;
63  QPushButton* m_stopButton;
64  QSlider* m_intervalSlider;
68 };
69 
70 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_FITWIDGETS_RUNFITCONTROLWIDGET_H
Defines class ItemComboWidget.
The JobMessagePanel class shows log messages from FitActivityPanel at the bottom part of JobView.
The RunFitControlWidget contains elements to start/stop fitting and to provide minimal diagnostic.
void onFittingError(const QString &what)
QPushButton * m_stopButton
virtual void subscribeToItem()
QPushButton * m_startButton
virtual void unsubscribeFromItem()
FitSuiteItem * fitSuiteItem()
void updateControlElements()
Updates button "enabled" status and warning status depending on current job conditions.
int sliderValueToUpdateInterval(int value)
converts slider value (1-15) to update interval to be propagated to FitSuiteWidget
WarningSign * m_warningSign
RunFitControlWidget(QWidget *parent=0)
void onFitSuitePropertyChange(const QString &name)
void onSliderValueChanged(int value)
The SessionItemWidget class is a base for all widgets representing the content of SessionItem.
The WarningSign controls appearance of WarningSignWidget on top of parent widget.
Definition: WarningSign.h:25
QString const & name(EShape k)
Definition: particles.cpp:21