Skip to content

Replace TrackPerson inheritance with composition

Schrödter, Tobias requested to merge 85-composition-over-inheritance-2 into master

Remove the inheritance from TrackPerson in favor of composition, this allows a better handling of interactions with the TrackPerson as changes now go through defined interfaces.

Main changes:

  • TrackPerson no longer is a QList<TrackPoints>
  • TrackPerson now has a QList<TrackPoints
  • new function deleteFrameRange which will delete a range of frames, but leaving no gaps in the middle
  • lastFrame is now compute and not stored, hence no need to update it
  • firstFrame is set when creating a TrackPerson and will be updated when needed automatically

Reviewer Checklist

Formatting

  • the pre-build checks succeed

General code quality

  • naming conventions are met (see .clang-tidy for detailed information)
  • no static analyzer warnings in new code parts (e.g., use clang-tidy for checking)

General usability

  • old versions of pet-files are still loadable

Only if changes in UI

  • new elements are also saved and loaded from pet-file
  • check if tab order is still correct
  • all new SpinBoxes are promoted
  • new keybindings added to Petrack::keyBindings()

Merge request reports

Loading