BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
recentprojectsettings.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/welcomeview/recentprojectsettings.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_RECENTPROJECTSETTINGS_H
16 #define BORNAGAIN_GUI2_WELCOMEVIEW_RECENTPROJECTSETTINGS_H
17 
18 #include "darefl_export.h"
19 #include <QStringList>
20 
21 namespace gui2 {
22 
23 //! Collection of settings for RecentProjectWidget. Used to save last directory selected
24 //! by the user, and list of recent projects. Relies on QSettings machinery.
25 
26 class DAREFLCORE_EXPORT RecentProjectSettings {
27 public:
30 
31  QString currentWorkdir() const;
32 
33  void updateWorkdirFromSelection(const QString& dirname);
34 
35  QStringList recentProjects();
36 
37  void addToRecentProjects(const QString& dirname);
38 
39  void clearRecentProjectsList();
40 
41 private:
42  void writeSettings();
43  void readSettings();
44 
46  QStringList m_recentProjects;
47 };
48 
49 } // namespace gui2
50 
51 #endif // BORNAGAIN_GUI2_WELCOMEVIEW_RECENTPROJECTSETTINGS_H
Collection of settings for RecentProjectWidget.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20