22 const int update_every = 20000;
26 : QObject(parent), m_document(0), m_timer(new
UpdateTimer(update_every, this))
79 dir.removeRecursively();
134 connect(
m_document, &ProjectDocument::destroyed,
this,
139 disconnect(
m_document, &ProjectDocument::destroyed,
this,
Defines class AutosaveController.
Defines ProjectUtils namespace.
Defines class UpdateTimer.
void setAutosaveTime(int timerInterval)
Sets autosave time (in msec)
void setDocumentConnected(bool set_connected)
void setDocument(ProjectDocument *document)
void onDocumentModified()
void onDocumentDestroyed(QObject *object)
void removeAutosaveDir()
remove auto save directory for given project and all its content
ProjectDocument * m_document
AutosaveController(QObject *parent=0)
QString autosaveName() const
bool assureAutoSaveDirExists() const
Tries to make sure that the directory for auto saving exists.
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, jobModel,...
QString projectFileName() const
bool hasValidNameAndPath()
QString projectDir() const
The UpdateTimer class accumulates update requests during certain period of time, and at the end of th...
void setWallclockTimer(int timerInterval)
QString autosaveName(const QString &projectFileName)
Returns name of project for autoSave from given project file name.
QString projectDir(const QString &projectFileName)
Returns project directory deduced from project file name.
QString autosaveDir(const QString &projectFileName)
Returns name of autosave directory for project with given project file name.
QString autosaveSubdir()
Returns fixed name for autosave sub-directory.
Defines class ProjectDocument.