//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      GUI/View/Loader/PythonScriptWidget.h
//! @brief     Defines class PythonScriptWidget.
//!
//! @homepage  http://www.bornagainproject.org
//! @license   GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
//  ************************************************************************************************

#ifndef BORNAGAIN_GUI_VIEW_LOADER_PYTHONSCRIPTWIDGET_H
#define BORNAGAIN_GUI_VIEW_LOADER_PYTHONSCRIPTWIDGET_H

#include <QDialog>
#include <QTextEdit>

class CautionSign;
class InstrumentItem;
class SampleItem;
class SimulationOptionsItem;

//! The PythonScriptWidget displays a python script which represents full simulation.
//! Part of SimulationSetupWidget

class PythonScriptWidget : public QDialog {
    Q_OBJECT
public:
    PythonScriptWidget(QWidget* parent = nullptr);
    ~PythonScriptWidget() override;

    void generatePythonScript(const SampleItem* sampleItem, const InstrumentItem* instrumentItem,
                              const SimulationOptionsItem& optionItem,
                              const QString& outputDir = "");

private slots:
    void onExportToFileButton();

private:
    QTextEdit* m_text_edit;
    CautionSign* m_caution_sign;
    QString m_output_dir;
};

#endif // BORNAGAIN_GUI_VIEW_LOADER_PYTHONSCRIPTWIDGET_H
