|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Collection of settings for RecentProjectWidget. More...
Public Member Functions | |
| RecentProjectSettings () | |
| ~RecentProjectSettings () | |
| void | addToRecentProjects (const QString &dirname) |
| Adds directory to the list of recent projects. More... | |
| void | clearRecentProjectsList () |
| QString | currentWorkdir () const |
| Returns current workdir. More... | |
| QStringList | recentProjects () |
| Returns list of recent projects, validates if projects still exists on disk. More... | |
| void | updateWorkdirFromSelection (const QString &dirname) |
| Updates current workdir value from user selection. More... | |
Private Member Functions | |
| void | readSettings () |
| Reads all settings from file. More... | |
| void | writeSettings () |
| Write all settings to file. More... | |
Private Attributes | |
| QString | m_currentWorkdir |
| QStringList | m_recentProjects |
Collection of settings for RecentProjectWidget.
Used to save last directory selected by the user, and list of recent projects. Relies on QSettings machinery.
Definition at line 26 of file recentprojectsettings.h.
| gui2::RecentProjectSettings::RecentProjectSettings | ( | ) |
Definition at line 41 of file recentprojectsettings.cpp.
References readSettings().
| gui2::RecentProjectSettings::~RecentProjectSettings | ( | ) |
Definition at line 46 of file recentprojectsettings.cpp.
References writeSettings().
| void gui2::RecentProjectSettings::addToRecentProjects | ( | const QString & | dirname | ) |
Adds directory to the list of recent projects.
Definition at line 80 of file recentprojectsettings.cpp.
References m_recentProjects.
| void gui2::RecentProjectSettings::clearRecentProjectsList | ( | ) |
Definition at line 88 of file recentprojectsettings.cpp.
References m_recentProjects.
| QString gui2::RecentProjectSettings::currentWorkdir | ( | ) | const |
Returns current workdir.
Definition at line 52 of file recentprojectsettings.cpp.
References m_currentWorkdir.
Referenced by gui2::UserInteractor::selectDir().
|
private |
Reads all settings from file.
Definition at line 102 of file recentprojectsettings.cpp.
References m_currentWorkdir, and m_recentProjects.
Referenced by RecentProjectSettings().
| QStringList gui2::RecentProjectSettings::recentProjects | ( | ) |
Returns list of recent projects, validates if projects still exists on disk.
Definition at line 68 of file recentprojectsettings.cpp.
References ModelView::Utils::exists(), and m_recentProjects.
| void gui2::RecentProjectSettings::updateWorkdirFromSelection | ( | const QString & | dirname | ) |
Updates current workdir value from user selection.
Workdir will be set as parent director of selected dirname.
Definition at line 59 of file recentprojectsettings.cpp.
References m_currentWorkdir, and ModelView::Utils::parent_path().
Referenced by gui2::UserInteractor::selectDir().
|
private |
Write all settings to file.
Definition at line 94 of file recentprojectsettings.cpp.
References m_currentWorkdir, and m_recentProjects.
Referenced by ~RecentProjectSettings().
|
private |
Definition at line 45 of file recentprojectsettings.h.
Referenced by currentWorkdir(), readSettings(), updateWorkdirFromSelection(), and writeSettings().
|
private |
Definition at line 46 of file recentprojectsettings.h.
Referenced by addToRecentProjects(), clearRecentProjectsList(), readSettings(), recentProjects(), and writeSettings().