BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
PythonScriptWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Script/PythonScriptWidget.h
6 //! @brief Defines class PythonScriptWidget
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_VIEW_SCRIPT_PYTHONSCRIPTWIDGET_H
16 #define BORNAGAIN_GUI_VIEW_SCRIPT_PYTHONSCRIPTWIDGET_H
17 
18 #include <QDialog>
19 
20 class QTextEdit;
21 class CautionSign;
22 class MultiLayerItem;
23 class InstrumentItem;
25 
26 //! The PythonScriptWidget displays a python script which represents full simulation.
27 //! Part of SimulationSetupWidget
28 
29 class PythonScriptWidget : public QDialog {
30  Q_OBJECT
31 
32 public:
33  PythonScriptWidget(QWidget* parent = nullptr);
34  ~PythonScriptWidget() override;
35 
36  void generatePythonScript(const MultiLayerItem* sampleItem,
37  const InstrumentItem* instrumentItem,
38  const SimulationOptionsItem& optionItem,
39  const QString& outputDir = "");
40 
41 private slots:
42  void onExportToFileButton();
43 
44 private:
45  QTextEdit* m_textEdit;
47  QString m_outputDir;
48 };
49 
50 #endif // BORNAGAIN_GUI_VIEW_SCRIPT_PYTHONSCRIPTWIDGET_H
The CautionSign controls appearance of CautionSignWidget on top of parent widget.
Definition: CautionSign.h:25
Abstract base class for instrument-specific item classes.
The PythonScriptWidget displays a python script which represents full simulation. Part of SimulationS...
PythonScriptWidget(QWidget *parent=nullptr)
CautionSign * m_cautionSign
void generatePythonScript(const MultiLayerItem *sampleItem, const InstrumentItem *instrumentItem, const SimulationOptionsItem &optionItem, const QString &outputDir="")
The SimulationOptionsItem class holds simulation status (run policy, number of threads,...