Resolve "Create `AutoSave` class and mechanism"
Compare changes
This PR adds an autosave feature for the trc and pet files.
The pet file is saved each 60 seconds (up for discussions)
The trc file is saved each 10 manual changes on trajectories (up for discussion)
The autosave is saved in a file named .projectName_autosave.trc/pet
. When a new project is selected, PeTrack checks if an autosave file exists and if one exists, it asks the user, if they want to load it. This also means we need to delete the old autosave when we close a project. This happens in two cases:
Petrack::closeEvent
setProFileName
When we have an object model akin to what is described in the comments in #88 (closed), one might take the destruction of an Project
-Object as an indicator for closing it. (Need special care for Ctrl-C though, as it should leave an autosave but destructs normally)
Closes #224 (closed)