Skip to content

Resolve "Make Parameter a Template"

d.kilic requested to merge 359-make-parameter-a-template into master

Transformed Parameter into a template. Initialize everything with 0 on numerical/arithmetical type, such that the behaviour does not change.

The minimum and maximum members are for UI only. I would propose to remove them in a later MR. For now they are filled with a default initialized instance for a non-primitive type.

Since the Parameter does not make sense without a Filter and there is never an instance where the filter is changed, I made the filter mandatory by using it in the constructor and deleted the setter/getter.

(NOTE: Moved below Filter in header since now implementation is in header and the implementation needs a fully defined Filter)

(NOTE: Unit-Test may be a bit repetetive...)

Closes #359 (closed)

Reviewer Checklist

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()
Edited by d.kilic

Merge request reports

Loading