BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
simulationview.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/mainwindow/simulationview.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 
22 #include <QSplitter>
23 #include <QVBoxLayout>
24 
25 using namespace ModelView;
26 
27 namespace gui2 {
28 
30  : QMainWindow(parent)
31  , m_editorList(new CollapsibleListWidget)
32  , m_simEditor(new QuickSimEditor)
33  , m_models(models)
34 {
35  auto splitter = new QSplitter;
36 
38 
39  splitter->addWidget(m_editorList);
40  splitter->addWidget(m_simEditor);
41 
42  setCentralWidget(splitter);
43 }
44 
46 {
47  m_editorList->layout()->setContentsMargins(4, 4, 4, 4);
48  auto material_editor = new MaterialEditor(this);
49  auto layer_editor = new LayerEditor(this);
50  auto sld_editor = new SLDEditor(this);
51  auto instrument_editor = new InstrumentPropertyEditor(this);
52 
53  m_editorList->addWidget(material_editor, "Material editor");
54  m_editorList->addWidget(layer_editor, "Layer editor", /*set_collapsed*/ true);
55  m_editorList->addWidget(instrument_editor, "Instrument editor", /*set_collapsed*/ true);
56  m_editorList->addWidget(sld_editor, "SLD editor", /*set_collapsed*/ true);
57 
58  material_editor->setModels(m_models);
59  layer_editor->setModels(m_models);
60  sld_editor->setModels(m_models);
62  instrument_editor->setModels(m_models);
63 }
64 
65 } // namespace gui2
Vertical widget with column of panels displayed one under another.
void addWidget(QWidget *widget, const QString &title, bool collapsed=false)
SimulationView(MainWindow *mainWindow)
Main class to holds all models of GUI session.
Widget with InstrumentItem properties.
Layer editor.
Definition: layereditor.h:34
Material editor.
Quick reflectivity simulations.
void setModels(ApplicationModels *models)
Set the mododel for the different items.
The SLD editor QWidget.
Definition: sldeditor.h:28
ApplicationModels * m_models
QuickSimEditor * m_simEditor
ModelView::CollapsibleListWidget * m_editorList
Defines class CLASS?
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
Defines class CLASS?
Defines class CLASS?
Defines class CLASS?