BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
instrumentmodel.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/model/instrumentmodel.cpp
6 //! @brief Implements class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
18 
19 using namespace ModelView;
20 
21 namespace {
22 
23 std::unique_ptr<ItemCatalogue> CreateItemCatalogue()
24 {
25  auto result = std::make_unique<ModelView::ItemCatalogue>();
26  result->registerItem<gui2::SpecularInstrumentItem>();
27  result->registerItem<gui2::SpecularBeamItem>();
28  result->registerItem<gui2::SpecularScanGroupItem>();
30  result->registerItem<gui2::ExperimentalScanItem>();
31  return result;
32 }
33 
34 } // namespace
35 
36 namespace gui2 {
37 
38 InstrumentModel::InstrumentModel(std::shared_ptr<ItemPool> pool)
39  : ModelView::SessionModel("InstrumentModel", pool)
40 {
41  setItemCatalogue(CreateItemCatalogue());
42  insertItem<SpecularInstrumentItem>();
43 }
44 
45 } // namespace gui2
InstrumentModel(QObject *parent=nullptr)
void registerItem(const std::string &text, bool make_selected=false)
Definition: groupitem.h:52
Main class to hold hierarchy of SessionItem objects.
Definition: sessionmodel.h:37
Represents scan according to imported experimental data.
Represents Q-space specular scan with fixed bin size.
Represents specular beam, contains settings of scan parameters.
Represents specular instrument.
Represent selection of possible specular scans.
Defines class CLASS?
Defines class CLASS?
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20