BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ScriptPanel.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/SampleDesigner/ScriptPanel.cpp
6 //! @brief Implements class ScriptPanel
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 
18 #include <QResizeEvent>
19 #include <QStackedWidget>
20 
21 ScriptPanel::ScriptPanel(QWidget* parent)
22  : InfoPanel(parent), m_pySampleWidget(new PySampleWidget(this))
23 {
24  setWindowTitle("Python Script");
25  setObjectName("ScriptPanel");
26 
28 
29  setContentVisible(false);
30  m_toolBar->hide();
31 }
32 
34 {
35  m_pySampleWidget->setSampleModel(sampleModel);
36 }
37 
39 {
40  m_pySampleWidget->setInstrumentModel(instrumentModel);
41 }
Defines class InfoPanelToolBar.
Defines class PySampleWidget.
Defines class SampleDesigner.
Frame for widgets with tool bar on top and collapse/expand button functionality.
Definition: InfoPanel.h:29
QStackedWidget * m_stackedWidget
Definition: InfoPanel.h:49
void setContentVisible(bool editor_status, bool dock_notify=false)
Definition: InfoPanel.cpp:71
InfoPanelToolBar * m_toolBar
Definition: InfoPanel.h:48
Displays Python script representing a MultiLayer at the bottom of SampleView.
void setInstrumentModel(InstrumentModel *instrumentModel)
void setSampleModel(SampleModel *sampleModel)
Main model to hold sample items.
Definition: SampleModel.h:24
void setInstrumentModel(InstrumentModel *instrumentModel)
Definition: ScriptPanel.cpp:38
PySampleWidget * m_pySampleWidget
Definition: ScriptPanel.h:36
ScriptPanel(QWidget *parent=nullptr)
Definition: ScriptPanel.cpp:21
void setSampleModel(SampleModel *sampleModel)
Definition: ScriptPanel.cpp:33