15 #ifndef BORNAGAIN_GUI_COREGUI_MAINWINDOW_PYIMPORTASSISTANT_H
16 #define BORNAGAIN_GUI_COREGUI_MAINWINDOW_PYIMPORTASSISTANT_H
18 #ifdef BORNAGAIN_PYTHON
38 QString
readFile(
const QString& fileName);
41 std::unique_ptr<MultiLayer>
createMultiLayer(
const QString& snippet,
const QString& funcName);
Our sample model: a stack of layers one below the other.
Assists in importing Python object to GUI models.
QString fileNameToOpen()
Lets user to select Python file on disk.
QString readFile(const QString &fileName)
Read content of text file and returns it as a multi-line string.
QString getPySampleFunctionName(const QString &snippet)
Returns the name of function which might generate a MultiLayer in Python code snippet.
void populateModels(const MultiLayer &multilayer, const QString &sampleName)
Populates GUI models with domain multilayer.
MainWindow * m_mainWindow
PyImportAssistant(MainWindow *mainwin)
void saveImportDir(const QString &fileName)
Saves file location as a future import dir.
std::unique_ptr< MultiLayer > createMultiLayer(const QString &snippet, const QString &funcName)
Creates a multi-layer by executing a funcName in embedded Python.
QString selectPySampleFunction(const QStringList &funcNames)
Lets user select a function name which generates a MultiLayer.