BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
welcomeview.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/welcomeview/welcomeview.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_WELCOMEVIEW_H
16 #define BORNAGAIN_GUI2_WELCOMEVIEW_WELCOMEVIEW_H
17 
18 #include "darefl_export.h"
19 #include <QWidget>
20 #include <memory>
21 
22 namespace gui2 {
23 
24 class ApplicationModels;
25 class ProjectHandler;
26 class RecentProjectWidget;
27 class OpenProjectWidget;
28 class RecentProjectSettings;
29 
30 //! Welcome view. Main widget on first tab of MainWindow.
31 
32 class DAREFLCORE_EXPORT WelcomeView : public QWidget {
33  Q_OBJECT
34 
35 public:
36  WelcomeView(ApplicationModels* models, QWidget* parent = nullptr);
38 
39  bool canCloseProject() const;
40 
41  void updateNames();
42 
43 signals:
44  void recentProjectsListModified(const QStringList& projects);
45 
46 public slots:
47  void onCreateNewProject();
48  void onOpenExistingProject(const QString& dirname = {});
49  void onSaveCurrentProject();
50  void onSaveProjectAs();
51  void onClearRecentProjectsList();
52 
53 private:
54  void setup_connections();
57 
58  ApplicationModels* m_models{nullptr};
59  ProjectHandler* m_projectHandler{nullptr};
60  RecentProjectWidget* m_recentProjectWidget{nullptr};
61  OpenProjectWidget* m_openProjectWidget{nullptr};
62 };
63 
64 } // namespace gui2
65 
66 #endif // BORNAGAIN_GUI2_WELCOMEVIEW_WELCOMEVIEW_H
Main class to holds all models of GUI session.
Widget with logo, name of the program and buttons to create new project or open existing one.
Main class to coordinate all activity on user's request to create new project, open existing one,...
Widget with the name of current project and collection of recent projects.
Welcome view. Main widget on first tab of MainWindow.
Definition: welcomeview.h:32
void update_current_project_name()
void update_recent_project_names()
void recentProjectsListModified(const QStringList &projects)
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20