aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-03-02 12:08:22 -0800
committerChris Robinson <[email protected]>2016-03-02 12:08:22 -0800
commit71d927333f15c2c43ec0f1974c819cd277386dfa (patch)
tree1262c4db8d60743e2264f1a7b96d3b5e821961b7
parent9fdca9e29f15e05c26d9b80ec4ba97a34b7b5277 (diff)
Add OSS and Solaris config pages
-rw-r--r--utils/alsoft-config/mainwindow.cpp48
-rw-r--r--utils/alsoft-config/mainwindow.h5
-rw-r--r--utils/alsoft-config/mainwindow.ui140
3 files changed, 193 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index 1fd6f81e..1a7c7fef 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -317,6 +317,14 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->alsaResamplerCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(ui->alsaMmapCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
+ connect(ui->ossDefaultDeviceLine, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->ossPlaybackPushButton, SIGNAL(pressed()), this, SLOT(selectOSSPlayback()));
+ connect(ui->ossDefaultCaptureLine, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->ossCapturePushButton, SIGNAL(pressed()), this, SLOT(selectOSSCapture()));
+
+ connect(ui->solarisDefaultDeviceLine, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->solarisPlaybackPushButton, SIGNAL(pressed()), this, SLOT(selectSolarisPlayback()));
+
ui->backendListWidget->setCurrentRow(0);
ui->tabWidget->setCurrentIndex(0);
@@ -694,6 +702,11 @@ void MainWindow::loadConfig(const QString &fname)
ui->alsaResamplerCheckBox->setChecked(settings.value("alsa/allow-resampler", false).toBool());
ui->alsaMmapCheckBox->setChecked(settings.value("alsa/mmap", true).toBool());
+ ui->ossDefaultDeviceLine->setText(settings.value("oss/device", QString()).toString());
+ ui->ossDefaultCaptureLine->setText(settings.value("oss/capture", QString()).toString());
+
+ ui->solarisDefaultDeviceLine->setText(settings.value("solaris/device", QString()).toString());
+
ui->applyButton->setEnabled(false);
ui->closeCancelButton->setText(tr("Close"));
mNeedsSave = false;
@@ -906,6 +919,11 @@ void MainWindow::saveConfig(const QString &fname) const
ui->alsaMmapCheckBox->isChecked() ? QString(/*"true"*/) : QString("false")
);
+ settings.setValue("oss/device", ui->ossDefaultDeviceLine->text());
+ settings.setValue("oss/capture", ui->ossDefaultCaptureLine->text());
+
+ settings.setValue("solaris/device", ui->solarisDefaultDeviceLine->text());
+
/* Remove empty keys
* FIXME: Should only remove keys whose value matches the globally-specified value.
*/
@@ -1079,3 +1097,33 @@ void MainWindow::showDisabledBackendMenu(QPoint pt)
enableApplyButton();
}
}
+
+void MainWindow::selectOSSPlayback()
+{
+ QString fname = QFileDialog::getOpenFileName(this, tr("Select Playback Device"));
+ if(!fname.isEmpty())
+ {
+ ui->ossDefaultDeviceLine->setText(fname);
+ enableApplyButton();
+ }
+}
+
+void MainWindow::selectOSSCapture()
+{
+ QString fname = QFileDialog::getOpenFileName(this, tr("Select Capture Device"));
+ if(!fname.isEmpty())
+ {
+ ui->ossDefaultCaptureLine->setText(fname);
+ enableApplyButton();
+ }
+}
+
+void MainWindow::selectSolarisPlayback()
+{
+ QString fname = QFileDialog::getOpenFileName(this, tr("Select Playback Device"));
+ if(!fname.isEmpty())
+ {
+ ui->solarisDefaultDeviceLine->setText(fname);
+ enableApplyButton();
+ }
+}
diff --git a/utils/alsoft-config/mainwindow.h b/utils/alsoft-config/mainwindow.h
index 69c2fda4..78285dfa 100644
--- a/utils/alsoft-config/mainwindow.h
+++ b/utils/alsoft-config/mainwindow.h
@@ -41,6 +41,11 @@ private slots:
void showEnabledBackendMenu(QPoint pt);
void showDisabledBackendMenu(QPoint pt);
+ void selectOSSPlayback();
+ void selectOSSCapture();
+
+ void selectSolarisPlayback();
+
private:
Ui::MainWindow *ui;
diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui
index 8eb3162c..5adfc89c 100644
--- a/utils/alsoft-config/mainwindow.ui
+++ b/utils/alsoft-config/mainwindow.ui
@@ -787,6 +787,16 @@ application or system to determine if it should be used.</string>
<string>ALSA</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>OSS</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Solaris</string>
+ </property>
+ </item>
</widget>
<widget class="QStackedWidget" name="backendStackedWidget">
<property name="geometry">
@@ -1035,6 +1045,136 @@ during updates.</string>
</property>
</widget>
</widget>
+ <widget class="QWidget" name="page_4">
+ <widget class="QLabel" name="label_20">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Default Playback Device:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="ossDefaultDeviceLine">
+ <property name="geometry">
+ <rect>
+ <x>160</x>
+ <y>30</y>
+ <width>151</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="placeholderText">
+ <string>/dev/dsp</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_21">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Default Capture Device:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="ossDefaultCaptureLine">
+ <property name="geometry">
+ <rect>
+ <x>160</x>
+ <y>60</y>
+ <width>151</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="placeholderText">
+ <string>/dev/dsp</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="ossPlaybackPushButton">
+ <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="QPushButton" name="ossCapturePushButton">
+ <property name="geometry">
+ <rect>
+ <x>320</x>
+ <y>60</y>
+ <width>91</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Browse...</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="page_5">
+ <widget class="QLineEdit" name="solarisDefaultDeviceLine">
+ <property name="geometry">
+ <rect>
+ <x>160</x>
+ <y>30</y>
+ <width>151</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="placeholderText">
+ <string>/dev/audio</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_22">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Default Playback Device:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="solarisPlaybackPushButton">
+ <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>
</widget>
</widget>
<widget class="QWidget" name="tab_2">