BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SimulationDataSelectorWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/SimulationWidgets/SimulationDataSelectorWidget.h
6 //! @brief Defines class SimulationDataSelectorWidget
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_SIMULATIONWIDGETS_SIMULATIONDATASELECTORWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_SIMULATIONWIDGETS_SIMULATIONDATASELECTORWIDGET_H
17 
18 #include <QWidget>
19 
20 class ApplicationModels;
21 class QComboBox;
22 class MultiLayerItem;
23 class InstrumentItem;
24 class RealDataItem;
25 
26 //! The SimulationDataSelectorWidget class represents widget to select instrument, sample and
27 //! real data. Located at the top of SimulationView.
28 
29 class SimulationDataSelectorWidget : public QWidget {
30  Q_OBJECT
31 
32 public:
33  SimulationDataSelectorWidget(QWidget* parent = 0);
34 
35  void setApplicationModels(ApplicationModels* applicationModels);
36 
39  const RealDataItem* selectedRealDataItem() const;
40 
41  void updateViewElements();
42 
43 private:
44  int selectedInstrumentIndex() const;
45  int selectedSampleIndex() const;
46  int selectedRealDataIndex() const;
47  void updateSelection(QComboBox* comboBox, QStringList itemList, bool allow_none = false);
48 
49  QComboBox* m_instrumentCombo;
50  QComboBox* m_sampleCombo;
51  QComboBox* m_realDataCombo;
53 };
54 
55 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_SIMULATIONWIDGETS_SIMULATIONDATASELECTORWIDGET_H
The RealDataItem class represents intensity data imported from file and intended for fitting.
Definition: RealDataItem.h:35
The SimulationDataSelectorWidget class represents widget to select instrument, sample and real data.
void updateSelection(QComboBox *comboBox, QStringList itemList, bool allow_none=false)
Updates selection combo with string list while preserving previous selection.
const MultiLayerItem * selectedMultiLayerItem() const
Returns selected MultiLayerItem taking into account that there might be several multilayers with same...
const RealDataItem * selectedRealDataItem() const
Returns selected real data item taking into account that there might be several items with same name.
void setApplicationModels(ApplicationModels *applicationModels)
const InstrumentItem * selectedInstrumentItem() const
Returns selected InstrumentItem taking into account that there might be several instruments with same...