BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
projectutils.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/projectutils.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_PROJECTUTILS_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_PROJECT_PROJECTUTILS_H
17 
18 #include "mvvm/model_export.h"
19 #include <memory>
20 #include <string>
21 #include <vector>
22 
23 namespace ModelView {
24 
25 class SessionModel;
26 class ProjectInterface;
27 struct ProjectContext;
28 
29 //! Collection of utility functions to handle project saving and loading.
30 
31 namespace ProjectUtils {
32 
33 MVVM_MODEL_EXPORT std::string SuggestFileName(const SessionModel& model);
34 
35 MVVM_MODEL_EXPORT bool IsPossibleProjectDir(const std::string& project_dir);
36 
37 MVVM_MODEL_EXPORT std::unique_ptr<ProjectInterface>
39 
40 MVVM_MODEL_EXPORT std::string ProjectWindowTitle(const ProjectInterface& project);
41 
42 MVVM_MODEL_EXPORT std::string ProjectWindowTitle(const std::string& project_dir, bool is_modified);
43 
44 } // namespace ProjectUtils
45 
46 } // namespace ModelView
47 
48 #endif // BORNAGAIN_MVVM_MODEL_MVVM_PROJECT_PROJECTUTILS_H
Interface to manipulate projects on disk.
Main class to hold hierarchy of SessionItem objects.
Definition: sessionmodel.h:37
MVVM_MODEL_EXPORT std::string SuggestFileName(const SessionModel &model)
Suggests file name which can be used to store json content of given model.
MVVM_MODEL_EXPORT std::unique_ptr< ProjectInterface > CreateUntitledProject(const ProjectContext &context)
Creates new untitled project.
MVVM_MODEL_EXPORT bool IsPossibleProjectDir(const std::string &project_dir)
Returns 'true' if given directory might be a project directory.
MVVM_MODEL_EXPORT std::string ProjectWindowTitle(const ProjectInterface &project)
Returns a MainWindow title for given project.
materialitems.h Collection of materials to populate MaterialModel.
@ project
selective copying for saving/loading the project (tags and data created by item, updated from JSON)
Defines convenience function for project manager and document.
Definition: ProjectUtils.h:22
Provides necessary information for Project construction.
Definition: project_types.h:32