BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SampleValidator.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Sample/SampleValidator.h
6 //! @brief Defines class SampleValidator
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_MODEL_SAMPLE_SAMPLEVALIDATOR_H
16 #define BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEVALIDATOR_H
17 
18 #include <QString>
19 
20 class MultiLayerItem;
21 class LayerItem;
22 class ItemWithParticles;
23 
24 //! Validates whether MultiLayerItem is suitable for simulation
26 public:
27  bool isValidMultiLayer(const MultiLayerItem* sample);
28 
29  QString getValidationMessage() const { return m_messages; }
30 
31 private:
32  void validateItem(const ItemWithParticles* item);
33 
34  void validateInterferences(const LayerItem* item);
35 
36  //! Adds this message to the report.
37  void addMessage(const QString& m);
38 
39  QString m_messages;
40 };
41 
42 #endif // BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEVALIDATOR_H
Validates whether MultiLayerItem is suitable for simulation.
void validateInterferences(const LayerItem *item)
void addMessage(const QString &m)
Adds this message to the report.
bool isValidMultiLayer(const MultiLayerItem *sample)
QString getValidationMessage() const
void validateItem(const ItemWithParticles *item)