BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
MinimizerSettingsWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Fit/MinimizerSettingsWidget.h
6 //! @brief Defines class MinimizerSettingsWidget
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_MINIMIZERSETTINGSWIDGET_H
16 #define BORNAGAIN_GUI_VIEW_FIT_MINIMIZERSETTINGSWIDGET_H
17 
19 #include <QList>
20 #include <QWidget>
21 #include <functional>
22 
23 class JobItem;
25 class DoubleDescriptor;
26 class UIntDescriptor;
27 class QFormLayout;
28 
29 using std::function;
30 
31 //! The MinimizerSettingsWidget contains editor for all minimizer settings and related fit
32 //! options. Part of FitSuiteWidget.
33 
34 class MinimizerSettingsWidget : public QWidget {
35  Q_OBJECT
36 
37 public:
38  MinimizerSettingsWidget(QWidget* parent = nullptr);
39 
40 public slots:
41  void setItem(JobItem* jobItem);
42  void setItem(MinimizerContainerItem* minimizerItem);
43 
44 private:
47  QWidget* createSpinbox(UIntDescriptor d);
48  void createMimimizerEdits();
49 
50  void updateUIValues();
51 
52 
53 private:
55  QFormLayout* m_mainLayout;
56  QFormLayout* m_minimizerLayout;
57  QList<function<void()>> m_updaters;
58 };
59 
60 #endif // BORNAGAIN_GUI_VIEW_FIT_MINIMIZERSETTINGSWIDGET_H
Defines class SelectionDescriptor.
Describes properties of a double value which are necessary to allow GUI representation,...
The MinimizerContainerItem class holds collection of minimizers.
Definition: MinimizerItem.h:44
The MinimizerSettingsWidget contains editor for all minimizer settings and related fit options....
MinimizerSettingsWidget(QWidget *parent=nullptr)
QWidget * createSpinbox(UIntDescriptor d)
QWidget * createDoubleSpinbox(DoubleDescriptor d)
QList< function< void()> > m_updaters
QWidget * createComboBox(SelectionDescriptor< QString > d)
MinimizerContainerItem * m_currentItem
void setItem(JobItem *jobItem)
Describes a selection (various possibilities and the current one).
Describes properties of a uint value which are necessary to allow GUI representation,...