diff options
author | Chris Robinson <[email protected]> | 2017-04-26 19:27:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-26 19:27:50 -0700 |
commit | 8f56c9522e65405d591ee2eacdcbf9e29caab9fe (patch) | |
tree | 8a9683a9f43d5d7504db22b1dacc89bd2c3c3d5a /utils/alsoft-config/mainwindow.cpp | |
parent | ca5c732261bfacdb4702fcc253b3ef0dad357a35 (diff) |
Document the output-limiter config option
Expose it in alsoft-config as well.
Diffstat (limited to 'utils/alsoft-config/mainwindow.cpp')
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 26d05f8f..d46bb029 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -328,6 +328,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->stereoEncodingComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton())); connect(ui->ambiFormatComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton())); + connect(ui->outputLimiterCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(ui->decoderHQModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(ui->decoderDistCompCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); @@ -641,6 +642,13 @@ void MainWindow::loadConfig(const QString &fname) updatePeriodCountSlider(); } + if(settings.value("output-limiter").isNull()) + ui->outputLimiterCheckBox->setCheckState(Qt::PartiallyChecked); + else + ui->outputLimiterCheckBox->setCheckState( + settings.value("output-limiter").toBool() ? Qt::Checked : Qt::Unchecked + ); + QString stereopan = settings.value("stereo-encoding").toString(); ui->stereoEncodingComboBox->setCurrentIndex(0); if(stereopan.isEmpty() == false) @@ -896,6 +904,14 @@ void MainWindow::saveConfig(const QString &fname) const settings.setValue("stereo-encoding", getValueFromName(stereoEncList, ui->stereoEncodingComboBox->currentText())); settings.setValue("ambi-format", getValueFromName(ambiFormatList, ui->ambiFormatComboBox->currentText())); + Qt::CheckState limiter = ui->outputLimiterCheckBox->checkState(); + if(limiter == Qt::PartiallyChecked) + settings.setValue("output-limiter", QString()); + else if(limiter == Qt::Checked) + settings.setValue("output-limiter", QString("true")); + else if(limiter == Qt::Unchecked) + settings.setValue("output-limiter", QString("false")); + settings.setValue("decoder/hq-mode", ui->decoderHQModeCheckBox->isChecked() ? QString("true") : QString(/*"false"*/) ); |