23 const int update_every = 20000;
47 connect(
m_document, &ProjectDocument::destroyed,
this,
86 dir.removeRecursively();
Defines class AutosaveController.
Defines class ProjectDocument.
Defines namespace GUI::Project::Utils.
Defines class UpdateTimer.
void setAutosaveTime(int timerInterval)
Sets autosave time (in msec)
void setDocument(ProjectDocument *document)
void onDocumentModified()
void onDocumentDestroyed(QObject *object)
AutosaveController(QObject *parent=nullptr)
ProjectDocument * m_document
QString autosaveName() const
bool assureAutoSaveDirExists() const
Tries to make sure that the directory for auto saving exists. Tries to create it if not existing so f...
void removeAutosaveDir() const
remove auto save directory for given project and all its content
QString autosaveDir() const
The complete path to the autosave dir (e.g. '/projects/Untitled2/autosave').
Project document class handles all data related to the opened project (sample, job,...
QString projectFileName() const
bool hasValidNameAndPath()
QString projectDir() const
void modified()
Emitted for any modifications in the document.
The UpdateTimer class accumulates update requests during certain period of time, and at the end of th...
void setWallclockTimer(int timerInterval)
QString autosaveSubdir()
Returns fixed name for autosave sub-directory.
QString autosaveDir(const QString &projectFileName)
Returns name of autosave directory for project with given project file name. E.g. from '/projects/Unt...
QString projectDir(const QString &projectFileName)
Returns project directory deduced from project file name.
QString autosaveName(const QString &projectFileName)
Returns name of project for autoSave from given project file name. E.g. from '/projects/Untitled2/Unt...