BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
BackgroundItems.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Device/BackgroundItems.h
6 //! @brief Defines BackgroundItem classes
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_DEVICE_BACKGROUNDITEMS_H
16 #define BORNAGAIN_GUI_MODEL_DEVICE_BACKGROUNDITEMS_H
17 
19 #include <memory>
20 
21 class IBackground;
22 class Streamer;
23 
25 public:
26  virtual ~BackgroundItem() = default;
27 
28  virtual std::unique_ptr<IBackground> createBackground() const = 0;
29  virtual void serialize(Streamer&) {}
30 };
31 
33 public:
34  std::unique_ptr<IBackground> createBackground() const override;
35 };
36 
38 public:
40  std::unique_ptr<IBackground> createBackground() const override;
41  void serialize(Streamer& s) override;
42 
43  DOUBLE_PROPERTY(backgroundValue, BackgroundValue);
44 };
45 
47 public:
48  std::unique_ptr<IBackground> createBackground() const override;
49 };
50 
51 #endif // BORNAGAIN_GUI_MODEL_DEVICE_BACKGROUNDITEMS_H
Defines class DoubleProperty.
virtual void serialize(Streamer &)
virtual ~BackgroundItem()=default
virtual std::unique_ptr< IBackground > createBackground() const =0
void serialize(Streamer &s) override
DOUBLE_PROPERTY(backgroundValue, BackgroundValue)
std::unique_ptr< IBackground > createBackground() const override
std::unique_ptr< IBackground > createBackground() const override
std::unique_ptr< IBackground > createBackground() const override
Supports serialization to or deserialization from QXmlStream.
Definition: Streamer.h:36