BornAgain  1.19.0
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/coregui/Views/SimulationWidgets/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_COREGUI_VIEWS_SIMULATIONWIDGETS_PYTHONSCRIPTWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_SIMULATIONWIDGETS_PYTHONSCRIPTWIDGET_H
17 
18 #include <QDialog>
19 
20 class QToolBar;
21 class QTextEdit;
22 class WarningSign;
23 class MultiLayerItem;
24 class InstrumentItem;
26 
27 //! The PythonScriptWidget displays a python script which represents full simulation.
28 //! Part of SimulationSetupWidget
29 
30 class PythonScriptWidget : public QDialog {
31  Q_OBJECT
32 
33 public:
34  PythonScriptWidget(QWidget* parent = 0);
35 
36  void generatePythonScript(const MultiLayerItem* sampleItem,
37  const InstrumentItem* instrumentItem,
38  const SimulationOptionsItem* optionItem = 0,
39  const QString& outputDir = "");
40 
41 private slots:
42  void onExportToFileButton();
43 
44 private:
45  QToolBar* m_toolBar;
46  QTextEdit* m_textEdit;
48  QString m_outputDir;
49 };
50 
51 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_SIMULATIONWIDGETS_PYTHONSCRIPTWIDGET_H
The PythonScriptWidget displays a python script which represents full simulation.
PythonScriptWidget(QWidget *parent=0)
WarningSign * m_warningSign
void generatePythonScript(const MultiLayerItem *sampleItem, const InstrumentItem *instrumentItem, const SimulationOptionsItem *optionItem=0, const QString &outputDir="")
The SimulationOptionsItem class holds simulation status (run policy, number of threads,...
The WarningSign controls appearance of WarningSignWidget on top of parent widget.
Definition: WarningSign.h:25