BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SimulationSetupAssistant.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/SimulationSetupAssistant.h
6 //! @brief Defines class SimulationSetupAssistant
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_SIMULATIONSETUPASSISTANT_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_SIMULATIONWIDGETS_SIMULATIONSETUPASSISTANT_H
17 
18 #include <QStringList>
19 
20 class MultiLayerItem;
21 class InstrumentItem;
22 class RealDataItem;
23 
24 //! The SimulationSetupAssistant class provides sample, instrument and real data validation before
25 //! submitting the job.
26 
28 public:
30 
31  bool isValidSimulationSetup(const MultiLayerItem* multiLayerItem,
32  const InstrumentItem* instrumentItem,
33  const RealDataItem* realData = 0);
34 
35 private:
36  void clear();
37  void checkMultiLayerItem(const MultiLayerItem* multiLayerItem);
38  void checkInstrumentItem(const InstrumentItem* instrumentItem);
39  void checkFittingSetup(const InstrumentItem* instrumentItem, const RealDataItem* realData);
40  QString composeMessage();
41 
42  bool m_isValid;
43  QStringList m_messages;
44 };
45 
46 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_SIMULATIONWIDGETS_SIMULATIONSETUPASSISTANT_H
The RealDataItem class represents intensity data imported from file and intended for fitting.
Definition: RealDataItem.h:35
The SimulationSetupAssistant class provides sample, instrument and real data validation before submit...
void checkInstrumentItem(const InstrumentItem *instrumentItem)
QString composeMessage()
Composes the error message for message box.
SimulationSetupAssistant()
Returns true if given setup is valid for submitting the job.
void checkFittingSetup(const InstrumentItem *instrumentItem, const RealDataItem *realData)
Check if setup is suitable for fitting.
void checkMultiLayerItem(const MultiLayerItem *multiLayerItem)
bool isValidSimulationSetup(const MultiLayerItem *multiLayerItem, const InstrumentItem *instrumentItem, const RealDataItem *realData=0)