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
18
#include "
GUI/View/Common/SessionItemWidget.h
"
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
31
class
RunFitControlWidget
:
public
SessionItemWidget
{
32
Q_OBJECT
33
public
:
34
RunFitControlWidget
(QWidget* parent =
nullptr
);
35
~RunFitControlWidget
()
override
;
36
37
signals:
38
void
startFittingPushed
();
39
void
stopFittingPushed
();
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
:
53
int
sliderUpdateInterval
();
54
int
sliderValueToUpdateInterval
(
int
value);
55
void
updateControlElements
();
56
JobItem
*
jobItem
();
57
FitSuiteItem
*
fitSuiteItem
();
58
bool
isValidJobItem
();
59
void
unsubscribeFromChildren
();
60
void
updateIterationsCountLabel
();
61
62
QPushButton*
m_startButton
;
63
QPushButton*
m_stopButton
;
64
QSlider*
m_intervalSlider
;
65
QLabel*
m_updateIntervalLabel
;
66
QLabel*
m_iterationsCountLabel
;
67
CautionSign
*
m_cautionSign
;
68
};
69
70
#endif
// BORNAGAIN_GUI_VIEW_FIT_RUNFITCONTROLWIDGET_H
SessionItemWidget.h
Defines class ItemComboWidget.
CautionSign
The CautionSign controls appearance of CautionSignWidget on top of parent widget.
Definition:
CautionSign.h:25
FitSuiteItem
Definition:
FitSuiteItem.h:23
JobItem
Definition:
JobItem.h:43
RunFitControlWidget
The RunFitControlWidget contains elements to start/stop fitting and to provide minimal diagnostic....
Definition:
RunFitControlWidget.h:31
RunFitControlWidget::m_iterationsCountLabel
QLabel * m_iterationsCountLabel
Definition:
RunFitControlWidget.h:66
RunFitControlWidget::onFittingError
void onFittingError(const QString &what)
Definition:
RunFitControlWidget.cpp:97
RunFitControlWidget::m_cautionSign
CautionSign * m_cautionSign
Definition:
RunFitControlWidget.h:67
RunFitControlWidget::jobItem
JobItem * jobItem()
Definition:
RunFitControlWidget.cpp:168
RunFitControlWidget::unsubscribeFromChildren
void unsubscribeFromChildren()
Definition:
RunFitControlWidget.cpp:183
RunFitControlWidget::sliderUpdateInterval
int sliderUpdateInterval()
Definition:
RunFitControlWidget.cpp:139
RunFitControlWidget::unsubscribeFromItem
void unsubscribeFromItem() override
Definition:
RunFitControlWidget.cpp:133
RunFitControlWidget::m_stopButton
QPushButton * m_stopButton
Definition:
RunFitControlWidget.h:63
RunFitControlWidget::isValidJobItem
bool isValidJobItem()
Definition:
RunFitControlWidget.cpp:178
RunFitControlWidget::m_updateIntervalLabel
QLabel * m_updateIntervalLabel
Definition:
RunFitControlWidget.h:65
RunFitControlWidget::m_startButton
QPushButton * m_startButton
Definition:
RunFitControlWidget.h:62
RunFitControlWidget::~RunFitControlWidget
~RunFitControlWidget() override
Definition:
RunFitControlWidget.cpp:92
RunFitControlWidget::m_intervalSlider
QSlider * m_intervalSlider
Definition:
RunFitControlWidget.h:64
RunFitControlWidget::fitSuiteItem
FitSuiteItem * fitSuiteItem()
Definition:
RunFitControlWidget.cpp:173
RunFitControlWidget::RunFitControlWidget
RunFitControlWidget(QWidget *parent=nullptr)
Definition:
RunFitControlWidget.cpp:36
RunFitControlWidget::updateControlElements
void updateControlElements()
Updates button "enabled" status and caution status depending on current job conditions.
Definition:
RunFitControlWidget.cpp:154
RunFitControlWidget::updateIterationsCountLabel
void updateIterationsCountLabel()
Definition:
RunFitControlWidget.cpp:189
RunFitControlWidget::sliderValueToUpdateInterval
int sliderValueToUpdateInterval(int value)
converts slider value (1-15) to update interval to be propagated to FitSuiteWidget
Definition:
RunFitControlWidget.cpp:146
RunFitControlWidget::startFittingPushed
void startFittingPushed()
RunFitControlWidget::stopFittingPushed
void stopFittingPushed()
RunFitControlWidget::onFitSuitePropertyChange
void onFitSuitePropertyChange(const QString &name)
Definition:
RunFitControlWidget.cpp:112
RunFitControlWidget::onSliderValueChanged
void onSliderValueChanged(int value)
Definition:
RunFitControlWidget.cpp:104
RunFitControlWidget::subscribeToItem
void subscribeToItem() override
Definition:
RunFitControlWidget.cpp:118
SessionItemWidget
The SessionItemWidget class is a base for all widgets representing the content of SessionItem....
Definition:
SessionItemWidget.h:30
GUI::RealSpace::Particles::name
QString const & name(EShape k)
Definition:
particles.cpp:20
GUI
View
Fit
RunFitControlWidget.h
Generated by
1.9.1