BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SampleModel.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/SampleModel.cpp
6 //! @brief Implements class SampleModel
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 
17 
19 {
20  setObjectName(SessionXML::SampleModelTag);
21 }
22 
24 {
25  SampleModel* result = new SampleModel();
26  result->initFrom(this, parent);
27  return result;
28 }
29 
31 {
32  return topItem<MultiLayerItem>();
33 }
Defines class MultiLayerItem.
Defines class SampleModel.
Main model to hold sample items.
Definition: SampleModel.h:24
SampleModel * createCopy(SessionItem *parent=nullptr)
Definition: SampleModel.cpp:23
MultiLayerItem * multiLayerItem()
Definition: SampleModel.cpp:30
SampleModel(QObject *parent=nullptr)
Definition: SampleModel.cpp:18
virtual QModelIndex parent(const QModelIndex &child) const
virtual void initFrom(SessionModel *model, SessionItem *parent)
const QString SampleModelTag("SampleModel")