BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleCoreShellItem.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Sample/ParticleCoreShellItem.h
6 //! @brief Defines class ParticleCoreShellItem
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_PARTICLECORESHELLITEM_H
16 #define BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECORESHELLITEM_H
17 
19 #include <memory>
20 
21 class ParticleCoreShell;
22 class ParticleItem;
23 class MaterialItems;
24 
26 public:
27  ParticleCoreShellItem(const MaterialItems* materials);
28  void serialize(Streamer& s) override;
29 
30  std::unique_ptr<ParticleCoreShell> createParticleCoreShell() const;
31 
32  ParticleItem* core() const;
33  void clearCore();
34  ParticleItem* createCore(const MaterialItems* materials);
35 
36  ParticleItem* shell() const;
37  void clearShell();
38  ParticleItem* createShell(const MaterialItems* materials);
39 
40  QVector<ItemWithParticles*> containedItemsWithParticles() const override;
41 
42 private:
43  std::unique_ptr<ParticleItem> m_core;
44  std::unique_ptr<ParticleItem> m_shell;
46 };
47 
48 #endif // BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECORESHELLITEM_H
Defines abstract item with a material property.
ParticleItem * shell() const
ParticleItem * core() const
std::unique_ptr< ParticleItem > m_core
std::unique_ptr< ParticleItem > m_shell
ParticleCoreShellItem(const MaterialItems *materials)
void serialize(Streamer &s) override
ParticleItem * createShell(const MaterialItems *materials)
const MaterialItems * m_materials
QVector< ItemWithParticles * > containedItemsWithParticles() const override
Return full hierarchical contained items with particles.
std::unique_ptr< ParticleCoreShell > createParticleCoreShell() const
ParticleItem * createCore(const MaterialItems *materials)
Supports serialization to or deserialization from QXmlStream.
Definition: Streamer.h:36