Remove option "Display volume as dBFS"
Remove the option "Display volume as dBFS" from the settings dialog and the check box option "Volume as dBFS" from the "View" menu. Volumes are now always treated as dB, i.e. all evaluations of the property "displaydbfs" have been removed which results in assuming that this option is always true. The upgrade code in `ConfigManager::upgrade_1_1_91` was left as is. However, a note was added which informs the reader that the value of "displaydbfs" is not evaluated anymore.
This commit is contained in:
@@ -72,7 +72,6 @@ protected slots:
|
||||
|
||||
private slots:
|
||||
// General settings widget.
|
||||
void toggleDisplaydBFS(bool enabled);
|
||||
void toggleTooltips(bool enabled);
|
||||
void toggleDisplayWaveform(bool enabled);
|
||||
void toggleNoteLabels(bool enabled);
|
||||
@@ -134,7 +133,6 @@ private:
|
||||
TabBar * m_tabBar;
|
||||
|
||||
// General settings widgets.
|
||||
bool m_displaydBFS;
|
||||
bool m_tooltips;
|
||||
bool m_displayWaveform;
|
||||
bool m_printNoteLabels;
|
||||
|
||||
@@ -126,6 +126,7 @@ void ConfigManager::upgrade_1_1_90()
|
||||
void ConfigManager::upgrade_1_1_91()
|
||||
{
|
||||
// rename displaydbv to displaydbfs
|
||||
// Note: the value of "displaydbfs" is not evaluated anymore!
|
||||
if (!value("app", "displaydbv").isNull())
|
||||
{
|
||||
setValue("app", "displaydbfs", value("app", "displaydbv"));
|
||||
|
||||
@@ -1099,13 +1099,7 @@ void MainWindow::updateViewMenu()
|
||||
// Here we should put all look&feel -stuff from configmanager
|
||||
// that is safe to change on the fly. There is probably some
|
||||
// more elegant way to do this.
|
||||
auto qa = new QAction(tr("Volume as dBFS"), this);
|
||||
qa->setData("displaydbfs");
|
||||
qa->setCheckable( true );
|
||||
qa->setChecked( ConfigManager::inst()->value( "app", "displaydbfs" ).toInt() );
|
||||
m_viewMenu->addAction(qa);
|
||||
|
||||
qa = new QAction(tr( "Smooth scroll" ), this);
|
||||
auto qa = new QAction(tr( "Smooth scroll" ), this);
|
||||
qa->setData("smoothscroll");
|
||||
qa->setCheckable( true );
|
||||
qa->setChecked( ConfigManager::inst()->value( "ui", "smoothscroll" ).toInt() );
|
||||
@@ -1135,12 +1129,7 @@ void MainWindow::updateConfig( QAction * _who )
|
||||
QString tag = _who->data().toString();
|
||||
bool checked = _who->isChecked();
|
||||
|
||||
if( tag == "displaydbfs" )
|
||||
{
|
||||
ConfigManager::inst()->setValue( "app", "displaydbfs",
|
||||
QString::number(checked) );
|
||||
}
|
||||
else if ( tag == "tooltips" )
|
||||
if ( tag == "tooltips" )
|
||||
{
|
||||
ConfigManager::inst()->setValue( "tooltips", "disabled",
|
||||
QString::number(!checked) );
|
||||
|
||||
@@ -91,8 +91,6 @@ inline void labelWidget(QWidget * w, const QString & txt)
|
||||
|
||||
|
||||
SetupDialog::SetupDialog(ConfigTab tab_to_open) :
|
||||
m_displaydBFS(ConfigManager::inst()->value(
|
||||
"app", "displaydbfs").toInt()),
|
||||
m_tooltips(!ConfigManager::inst()->value(
|
||||
"tooltips", "disabled").toInt()),
|
||||
m_displayWaveform(ConfigManager::inst()->value(
|
||||
@@ -231,8 +229,6 @@ SetupDialog::SetupDialog(ConfigTab tab_to_open) :
|
||||
QGroupBox * guiGroupBox = new QGroupBox(tr("Graphical user interface (GUI)"), generalControls);
|
||||
QVBoxLayout * guiGroupLayout = new QVBoxLayout(guiGroupBox);
|
||||
|
||||
addCheckBox(tr("Display volume as dBFS "), guiGroupBox, guiGroupLayout,
|
||||
m_displaydBFS, SLOT(toggleDisplaydBFS(bool)), true);
|
||||
addCheckBox(tr("Enable tooltips"), guiGroupBox, guiGroupLayout,
|
||||
m_tooltips, SLOT(toggleTooltips(bool)), true);
|
||||
addCheckBox(tr("Enable master oscilloscope by default"), guiGroupBox, guiGroupLayout,
|
||||
@@ -913,8 +909,6 @@ void SetupDialog::accept()
|
||||
from taking mouse input, rendering the application unusable. */
|
||||
QDialog::accept();
|
||||
|
||||
ConfigManager::inst()->setValue("app", "displaydbfs",
|
||||
QString::number(m_displaydBFS));
|
||||
ConfigManager::inst()->setValue("tooltips", "disabled",
|
||||
QString::number(!m_tooltips));
|
||||
ConfigManager::inst()->setValue("ui", "displaywaveform",
|
||||
@@ -1003,12 +997,6 @@ void SetupDialog::accept()
|
||||
|
||||
// General settings slots.
|
||||
|
||||
void SetupDialog::toggleDisplaydBFS(bool enabled)
|
||||
{
|
||||
m_displaydBFS = enabled;
|
||||
}
|
||||
|
||||
|
||||
void SetupDialog::toggleTooltips(bool enabled)
|
||||
{
|
||||
m_tooltips = enabled;
|
||||
|
||||
@@ -375,7 +375,7 @@ void Fader::setPeak_R(float fPeak)
|
||||
// update tooltip showing value and adjust position while changing fader value
|
||||
void Fader::updateTextFloat()
|
||||
{
|
||||
if (ConfigManager::inst()->value("app", "displaydbfs").toInt() && m_conversionFactor == 100.0)
|
||||
if (m_conversionFactor == 100.0)
|
||||
{
|
||||
s_textFloat->setText(getModelValueAsDbString());
|
||||
}
|
||||
|
||||
@@ -390,8 +390,7 @@ void FloatModelEditorBase::enterValue()
|
||||
bool ok;
|
||||
float new_val;
|
||||
|
||||
if (isVolumeKnob() &&
|
||||
ConfigManager::inst()->value("app", "displaydbfs").toInt())
|
||||
if (isVolumeKnob())
|
||||
{
|
||||
auto const initalValue = model()->getRoundedValue() / 100.0;
|
||||
auto const initialDbValue = initalValue > 0. ? ampToDbfs(initalValue) : -96;
|
||||
@@ -444,8 +443,7 @@ void FloatModelEditorBase::friendlyUpdate()
|
||||
|
||||
QString FloatModelEditorBase::displayValue() const
|
||||
{
|
||||
if (isVolumeKnob() &&
|
||||
ConfigManager::inst()->value("app", "displaydbfs").toInt())
|
||||
if (isVolumeKnob())
|
||||
{
|
||||
auto const valueToVolumeRatio = model()->getRoundedValue() / volumeRatio();
|
||||
return m_description.trimmed() + (
|
||||
|
||||
Reference in New Issue
Block a user