Add m_conversionFactor to the AutomatableModelView. This factor will be applied to the model->value when displaying
it in the contextmenu of the control for the reset and copy actions. The factor will be applied when copying the value to
the clipboard. When pasting from the clipboard, the value will be divided by the factor.
Remove the model->displayValue() calls when updating the reset/copy/paste action text labels as this gives e.g. in the
Equalizer the wrong action text for the Frequency knobs.
In the Fader class, remove the m_displayConversion variable but rather use the new m_conversionFactor variable.
Rewire the setDisplayConversion() function to set the m_conversionFactor to 1.0 or 100.0.
Faders in FxMixer show now the correct context menu. Copying and pasting values between faders or even volume knobs
in tracks shows consistent behavior. Other faders (like in Eq) show the old behavior.
Moving empty destructors out of the .cpp files and into headers
allows them to be devirtualized in certain cases.
(When the compiler can't "see" a function in a header, it must largely
assume it's some black box that the linker will resolve.)
While we're at it, use C++11's `= default` to define empty virtual
desturctors for us.
For some classes (e.g., Piano), nothing is derived from it, so we can
mark the class as final and remove any explicit virtual dtor.
There are many other places where this can be done, but this is a large
enough patch as-is.
* Render the mixer levels in a dB FS scale
Adds the option to render the mixer levels in dB FS. By default this
option is disabled so that classes which inherit from Fader are not
affected by this change. However, in the code of the FxMixerView this
feature is enabled so that the mixer shows the levels in dB FS.
The ability to render in dB FS is exported as a property so that it can
also be set in a style sheet (not used as of now). The new property is
called "levelsDisplayedInDBFS".
There are now setters and getters for the min and max level.
Showing the levels in dB FS (which is a logarithmic scale) gives a less
"fidgety" impression when the levels are moving.
* Introduction of an init method in Fader
An init method was added to unify the initialization of the two Fader
constructors.
This commit addresses a lot of issues, namely:
1. When the "Move left/right" action was selected on a mixer channel
menu sometimes it would segfault due to the fxline object being
deleted before it returned to a method inside itself
2. The Fader was declaring a new variable for the model whereas it
should used the inherited model from FloatModelView < AutomatableModelView
3. Some methods were doing more things than they should be and
performing unnecessary actions. A little cleanup/refactor was made
Please notice that a bug of the same class as the one referred at point 1
still exists: clicking on "Remove channel". This commit does not
addresses this issue.
Fixes#1584