Skip to content
Snippets Groups Projects

Resolve "Create `AutoSave` class and mechanism"

Merged d.kilic requested to merge 224-create-autosave-class-and-mechanism into master

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:

  1. Closing Petrack as a whole
    Autosaves get deleted in Petrack::closeEvent
  2. Changing the project; closing the old one
    Autosaved get deleted in 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)

  • Autosave for .pet-file is currently every 6 seconds for testing; change to 60 for final version

Closes #224 (closed)

Edited by d.kilic

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • d.kilic
  • d.kilic
  • d.kilic changed the description

    changed the description

  • d.kilic added 1 commit

    added 1 commit

    • 65d75ec2 - License headers and comments

    Compare with previous version

  • d.kilic resolved all threads

    resolved all threads

  • d.kilic added 1 commit

    added 1 commit

    • fcd5b63c - Refactor so less state needs to be managed manually

    Compare with previous version

  • d.kilic changed the description

    changed the description

  • d.kilic added 25 commits

    added 25 commits

    • fcd5b63c...1842d9aa - 16 commits from branch master
    • c4a421dc - Add simple AutoSave capability for TRC files
    • a28f6902 - Naive implementation of autosave for pet-file
    • 978e4615 - Finetune clean up and loading in from autosaves
    • 979a0ef2 - Add autosave.h
    • 33ec1618 - Handle relative Paths
    • c5b79148 - Doxygen comments and small bug fixes
    • 75c8b58b - Formatting
    • 915c2a34 - License headers and comments
    • 9d247bb1 - Refactor so less state needs to be managed manually

    Compare with previous version

  • d.kilic added 1 commit

    added 1 commit

    Compare with previous version

  • d.kilic marked this merge request as ready

    marked this merge request as ready

  • d.kilic added 1 commit

    added 1 commit

    • fe8b4e64 - (Manually) reformat according to clang-format 11?

    Compare with previous version

  • d.kilic added 8 commits

    added 8 commits

    Compare with previous version

  • Schrödter, Tobias
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading