aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-03-02 15:31:14 -0800
committerChris Robinson <[email protected]>2016-03-02 15:31:14 -0800
commit773e2846e735c55c123cecb2ff57a50f64e90aa7 (patch)
tree992d07d3edfc22a0cadc28bbba5a05a6dc226be0 /utils
parent71d927333f15c2c43ec0f1974c819cd277386dfa (diff)
Add a Wave Writer backend config page
Diffstat (limited to 'utils')
-rw-r--r--utils/alsoft-config/mainwindow.cpp24
-rw-r--r--utils/alsoft-config/mainwindow.h2
-rw-r--r--utils/alsoft-config/mainwindow.ui72
3 files changed, 98 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();
+ }
+}
diff --git a/utils/alsoft-config/mainwindow.h b/utils/alsoft-config/mainwindow.h
index 78285dfa..27f3c252 100644
--- a/utils/alsoft-config/mainwindow.h
+++ b/utils/alsoft-config/mainwindow.h
@@ -46,6 +46,8 @@ private slots:
void selectSolarisPlayback();
+ void selectWaveOutput();
+
private:
Ui::MainWindow *ui;
diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui
index 5adfc89c..28540a73 100644
--- a/utils/alsoft-config/mainwindow.ui
+++ b/utils/alsoft-config/mainwindow.ui
@@ -797,6 +797,11 @@ application or system to determine if it should be used.</string>
<string>Solaris</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>Wave Writer</string>
+ </property>
+ </item>
</widget>
<widget class="QStackedWidget" name="backendStackedWidget">
<property name="geometry">
@@ -1175,6 +1180,73 @@ during updates.</string>
</property>
</widget>
</widget>
+ <widget class="QWidget" name="page_6">
+ <widget class="QLabel" name="label_23">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>71</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Output File:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="waveOutputLine">
+ <property name="geometry">
+ <rect>
+ <x>90</x>
+ <y>30</y>
+ <width>221</width>
+ <height>21</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_24">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>90</y>
+ <width>421</width>
+ <height>71</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Warning: The specified output file will be OVERWRITTEN WITHOUT&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;QUESTION when the Wave Writer device is opened.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="waveOutputButton">
+ <property name="geometry">
+ <rect>
+ <x>320</x>
+ <y>30</y>
+ <width>91</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Browse...</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="waveBFormatCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>120</x>
+ <y>60</y>
+ <width>191</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Create .amb (B-Format) files</string>
+ </property>
+ </widget>
+ </widget>
</widget>
</widget>
<widget class="QWidget" name="tab_2">