BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
userinteractor.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/welcomeview/userinteractor.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 Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_WELCOMEVIEW_USERINTERACTOR_H
16 #define BORNAGAIN_GUI2_WELCOMEVIEW_USERINTERACTOR_H
17 
18 #include "darefl_export.h"
19 #include <string>
20 
21 class QWidget;
22 
23 namespace ModelView {
24 enum class SaveChangesAnswer;
25 }
26 
27 namespace gui2 {
28 
29 class RecentProjectSettings;
30 
31 //! Provide save/discard/cancel and similar dialogs on user request.
32 //! Intended to work in pair with ProjectManagerDecorator.
33 
34 class DAREFLCORE_EXPORT UserInteractor {
35 public:
36  UserInteractor(RecentProjectSettings* settings, QWidget* parent);
37 
38  std::string onSelectDirRequest();
39 
40  std::string onCreateDirRequest();
41 
42  ModelView::SaveChangesAnswer onSaveChangesRequest();
43 
44 private:
45  std::string selectDir() const;
46 
47  RecentProjectSettings* m_settings{nullptr};
48  QWidget* m_parent{nullptr};
49 };
50 
51 } // namespace gui2
52 
53 #endif // BORNAGAIN_GUI2_WELCOMEVIEW_USERINTERACTOR_H
Collection of settings for RecentProjectWidget.
Provide save/discard/cancel and similar dialogs on user request.
materialitems.h Collection of materials to populate MaterialModel.
SaveChangesAnswer
Possible user answers on question "Project was modified".
Definition: project_types.h:28
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20