diff options
author | Chris Robinson <[email protected]> | 2016-03-02 15:31:14 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-03-02 15:31:14 -0800 |
commit | 773e2846e735c55c123cecb2ff57a50f64e90aa7 (patch) | |
tree | 992d07d3edfc22a0cadc28bbba5a05a6dc226be0 /utils/alsoft-config/mainwindow.cpp | |
parent | 71d927333f15c2c43ec0f1974c819cd277386dfa (diff) |
Add a Wave Writer backend config page
Diffstat (limited to 'utils/alsoft-config/mainwindow.cpp')
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 1a7c7fef..dca1816c 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -325,6 +325,10 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->solarisDefaultDeviceLine, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(ui->solarisPlaybackPushButton, SIGNAL(pressed()), this, SLOT(selectSolarisPlayback())); + connect(ui->waveOutputLine, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); + connect(ui->waveOutputButton, SIGNAL(pressed()), this, SLOT(selectWaveOutput())); + connect(ui->waveBFormatCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + ui->backendListWidget->setCurrentRow(0); ui->tabWidget->setCurrentIndex(0); @@ -707,6 +711,9 @@ void MainWindow::loadConfig(const QString &fname) ui->solarisDefaultDeviceLine->setText(settings.value("solaris/device", QString()).toString()); + ui->waveOutputLine->setText(settings.value("wave/file", QString()).toString()); + ui->waveBFormatCheckBox->setChecked(settings.value("wave/bformat", false).toBool()); + ui->applyButton->setEnabled(false); ui->closeCancelButton->setText(tr("Close")); mNeedsSave = false; @@ -924,6 +931,11 @@ void MainWindow::saveConfig(const QString &fname) const settings.setValue("solaris/device", ui->solarisDefaultDeviceLine->text()); + settings.setValue("wave/file", ui->waveOutputLine->text()); + settings.setValue("wave/bformat", + ui->waveBFormatCheckBox->isChecked() ? QString("true") : QString(/*"false"*/) + ); + /* Remove empty keys * FIXME: Should only remove keys whose value matches the globally-specified value. */ @@ -1127,3 +1139,15 @@ void MainWindow::selectSolarisPlayback() enableApplyButton(); } } + +void MainWindow::selectWaveOutput() +{ + QString fname = QFileDialog::getSaveFileName(this, tr("Select Wave File Output"), + ui->waveOutputLine->text(), tr("Wave Files (*.wav *.amb);;All Files (*.*)") + ); + if(!fname.isEmpty()) + { + ui->waveOutputLine->setText(fname); + enableApplyButton(); + } +} |