BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
project.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/model/mvvm/project/project.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_PROJECT_PROJECT_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_PROJECT_PROJECT_H
17 
19 #include <memory>
20 
21 namespace ModelView {
22 
23 struct ProjectContext;
24 
25 //! Project represents content of all application models in a folder on disk.
26 //! Responsible for saving/loading application models to/from disk.
27 
28 class MVVM_MODEL_EXPORT Project : public ModelView::ProjectInterface {
29 public:
30  Project(const ProjectContext& context);
32 
33  std::string projectDir() const override;
34 
35  bool save(const std::string& dirname) const override;
36 
37  bool load(const std::string& dirname) override;
38 
39  bool isModified() const override;
40 
41 private:
42  struct ProjectImpl;
43  std::unique_ptr<ProjectImpl> p_impl;
44 };
45 
46 } // namespace ModelView
47 
48 #endif // BORNAGAIN_MVVM_MODEL_MVVM_PROJECT_PROJECT_H
Interface to manipulate projects on disk.
Project represents content of all application models in a folder on disk.
Definition: project.h:28
std::unique_ptr< ProjectImpl > p_impl
Definition: project.h:42
materialitems.h Collection of materials to populate MaterialModel.
QString projectDir(const QString &projectFileName)
Returns project directory deduced from project file name.
Defines class CLASS?
Provides necessary information for Project construction.
Definition: project_types.h:32