Add a Wave Writer backend config page
This commit is contained in:
parent
71d927333f
commit
773e2846e7
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,8 @@ private slots:
|
||||
|
||||
void selectSolarisPlayback();
|
||||
|
||||
void selectWaveOutput();
|
||||
|
||||
private:
|
||||
Ui::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><html><head/><body><p align="center"><span style=" font-style:italic;">Warning: The specified output file will be OVERWRITTEN WITHOUT</span></p><p align="center"><span style=" font-style:italic;">QUESTION when the Wave Writer device is opened.</span></p></body></html></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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user