BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
PyImportAssistant.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Project/PyImportAssistant.h
6 //! @brief Implements class PyImportAssistant
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_PROJECT_PYIMPORTASSISTANT_H
16 #define BORNAGAIN_GUI_VIEW_PROJECT_PYIMPORTASSISTANT_H
17 
18 #ifdef BORNAGAIN_PYTHON
19 
20 #include <memory>
21 
22 class MultiLayerItem;
23 class MultiLayer;
24 
25 //! Assists in importing Python object to GUI models.
26 
27 namespace PyImportAssistant {
28 
29 //! Show select-file dialog, try to import via python, return created sample.
30 //!
31 //! If sth. went wrong, a dialog has presented already and nullptr is returned.
32 std::unique_ptr<MultiLayer> importMultiLayer();
33 
34 //! Populates GUI sample with domain sample.
35 MultiLayerItem* itemizeSample(const MultiLayer& sample);
36 
37 } // namespace PyImportAssistant
38 
39 #endif // BORNAGAIN_PYTHON
40 
41 #endif // BORNAGAIN_GUI_VIEW_PROJECT_PYIMPORTASSISTANT_H
Assists in importing Python object to GUI models.
MultiLayerItem * itemizeSample(const MultiLayer &sample)
Populates GUI sample with domain sample.
std::unique_ptr< MultiLayer > importMultiLayer()
Show select-file dialog, try to import via python, return created sample.