(io) add non-linear sliders to SParameters
Description
Add non-linear slider to SParameters
e.g. instead of having a slider with values from [25, 26 ..., 150]
Have a slider with predefined values [25, 50, 90, 120, 150]
Functional specifications
Add non-linear slider to SParameters
Have a look at: https://forum.qt.io/topic/90157/give-a-set-of-values-to-a-qslider/11
Technical specifications
A new widget, NonLinearSlider, will be created (in libs/ui/qt/widget). It inherits from QWidget and internally uses a QSlider for display and interaction with the user. That slider is a regular slider, with values ranging from 0 to the size of the predefined values, in other words, it actually stores indices. Whenever that slider sends a signal, it is intercepted by NonLinearSlider that will replace it with the actual value from the list of predefined values.
The reason why NonLinearSlider doesn't inherit directly from QSlider or QAbstractSlider is that, while it looks like a slider, its behavior is closer to an enumeration (eg. a combobox...): It has a list of discrete values, rather than a range of continuous values. Which also means that a lot of inherited values wouldn't be applicable (QSlider::tickInterval, QAbstractSlider::setRange, etc...).
In SParameters, a new option will be available: type=enum
parameters can choose between two widget
(like with int/double and spin/slider): combobox
(the default) and slider
(which uses the new NonLinearSlider; for int only). Meanwhile, in order to interoperate with both services which await enumeration and integer values, this widget will emit both integer signals (intChanged) and enum signals (enumChanged and enumIndexChanged).
Test plan
Manual testing; NonLinearSlider will be used in the ExSParameters example.