|
BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Defines convenience function for project manager and document.
Functions | |
| QString | autosaveDir (const QString &projectFileName) |
| Returns name of autosave directory for project with given project file name. E.g. from '/projects/Untitled2/Untitled2.pro' returns '/projects/Untitled2/autosave'. More... | |
| QString | autosaveName (const QString &projectFileName) |
| Returns name of project for autoSave from given project file name. E.g. from '/projects/Untitled2/Untitled2.pro' returns '/projects/Untitled2/autosave/Untitled2.pro'. More... | |
| QString | autosaveSubdir () |
| Returns fixed name for autosave sub-directory. More... | |
| bool | hasAutosavedData (const QString &projectFileName) |
| Returns true if project with given projectFileName contains autosaved data. More... | |
| QString | projectDir (const QString &projectFileName) |
| Returns project directory deduced from project file name. More... | |
| QString | projectName (const QString &projectFileName) |
| Returns project name deduced from project file name. More... | |
Variables | |
| constexpr const char * | projectFileExtension {".pro"} |
| QString GUI::Project::Utils::autosaveDir | ( | const QString & | projectFileName | ) |
Returns name of autosave directory for project with given project file name. E.g. from '/projects/Untitled2/Untitled2.pro' returns '/projects/Untitled2/autosave'.
Definition at line 33 of file ProjectUtils.cpp.
References autosaveSubdir(), and projectDir().
Referenced by AutosaveController::autosaveDir(), and autosaveName().
| QString GUI::Project::Utils::autosaveName | ( | const QString & | projectFileName | ) |
Returns name of project for autoSave from given project file name. E.g. from '/projects/Untitled2/Untitled2.pro' returns '/projects/Untitled2/autosave/Untitled2.pro'.
Definition at line 38 of file ProjectUtils.cpp.
References autosaveDir(), projectFileExtension, and projectName().
Referenced by AutosaveController::autosaveName(), hasAutosavedData(), ProjectManager::loadProject(), and ProjectManager::restoreProjectDialog().
| QString GUI::Project::Utils::autosaveSubdir | ( | ) |
Returns fixed name for autosave sub-directory.
Definition at line 28 of file ProjectUtils.cpp.
Referenced by AutosaveController::assureAutoSaveDirExists(), autosaveDir(), and SaveService::process_queue().
| bool GUI::Project::Utils::hasAutosavedData | ( | const QString & | projectFileName | ) |
Returns true if project with given projectFileName contains autosaved data.
Definition at line 43 of file ProjectUtils.cpp.
References autosaveName().
Referenced by ProjectManager::loadProject().
| QString GUI::Project::Utils::projectDir | ( | const QString & | projectFileName | ) |
Returns project directory deduced from project file name.
Definition at line 23 of file ProjectUtils.cpp.
Referenced by AutosaveController::assureAutoSaveDirExists(), autosaveDir(), NewProjectDialog::checkIfProjectNameIsValid(), DatafieldIOService::cleanOldFiles(), SimulationView::exportPythonScript(), SaveLoadInterface::fileName(), NewProjectDialog::getProjectFileName(), DataItem::loadData(), DatafieldIOService::loadDataFiles(), DatafieldIOService::save(), DataItem::saveData(), ProjectDocument::saveProjectData(), and ProjectDocument::setProjectFileName().
| QString GUI::Project::Utils::projectName | ( | const QString & | projectFileName | ) |
Returns project name deduced from project file name.
Definition at line 18 of file ProjectUtils.cpp.
Referenced by NewProjectDialog::NewProjectDialog(), autosaveName(), NewProjectDialog::checkIfProjectNameIsValid(), ProjectManager::restoreProjectDialog(), and ProjectDocument::setProjectFileName().
|
inlineconstexpr |
Definition at line 24 of file ProjectUtils.h.
Referenced by autosaveName(), NewProjectDialog::getProjectFileName(), and ProjectDocument::projectFileName().