diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index 1d67f50..604f891 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -128,7 +128,8 @@ void SettingsWindow::onSave() } else { system((std::string("/usr/local/bin/autoapp_helper setflip 0")).c_str()); } - + system((std::string("/usr/local/bin/autoapp_helper setoutput ") + std::string("'") + std::string(ui_->comboBoxPulseOutput->currentText().toStdString()) + std::string("'") ).c_str()); + system((std::string("/usr/local/bin/autoapp_helper setinput ") + std::string("'") + std::string(ui_->comboBoxPulseInput->currentText().toStdString()) + std::string("'") ).c_str()); this->close(); } @@ -423,6 +424,47 @@ void SettingsWindow::loadSystemValues() ui_->spinBoxDay->setValue(daynight[0].toInt()); ui_->spinBoxNight->setValue(daynight[1].toInt()); } + + system("/usr/local/bin/autoapp_helper getoutputs"); + if (rFile.exists()) { + QFile returnFile(QString("/tmp/return_value")); + returnFile.open(QIODevice::ReadOnly); + QTextStream data_return(&returnFile); + QStringList outputs = data_return.readAll().split("\n"); + returnFile.close(); + int cleaner = ui_->comboBoxPulseOutput->count(); + while (cleaner > 0) { + ui_->comboBoxPulseOutput->removeItem(cleaner); + cleaner--; + } + int indexout = outputs.count(); + int countout = 0; + while (countout < indexout-1) { + ui_->comboBoxPulseOutput->addItem(outputs[countout]); + countout++; + } + } + + system("/usr/local/bin/autoapp_helper getinputs"); + if (rFile.exists()) { + QFile returnFile(QString("/tmp/return_value")); + returnFile.open(QIODevice::ReadOnly); + QTextStream data_return(&returnFile); + QStringList inputs = data_return.readAll().split("\n"); + returnFile.close(); + int cleaner = ui_->comboBoxPulseInput->count(); + while (cleaner > 0) { + ui_->comboBoxPulseInput->removeItem(cleaner); + cleaner--; + } + int indexin = inputs.count(); + int countin = 0; + while (countin < indexin-1) { + ui_->comboBoxPulseInput->addItem(inputs[countin]); + countin++; + } + } + } void SettingsWindow::onShowBindings() diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui index 11ce8fe..b4075b9 100644 --- a/src/autoapp/UI/settingswindow.ui +++ b/src/autoapp/UI/settingswindow.ui @@ -581,6 +581,124 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} + + + + 0 + 220 + 616 + 151 + + + + Pulse Input / Output Device + + + + + 90 + 30 + 400 + 30 + + + + false + + + default + + + + default + + + + + + + 10 + 30 + 80 + 30 + + + + Output + + + + + + 90 + 70 + 400 + 30 + + + + false + + + default + + + + default + + + + + + + 10 + 70 + 80 + 30 + + + + Input + + + + + + 0 + 120 + 616 + 23 + + + + + true + + + + To activate changed audio device you have to reboot! + + + Qt::AlignCenter + + + true + + + + + + 90 + 114 + 31 + 31 + + + + <html><head/><body><p align="justify"><img src=":/ico_warning.png"/></p></body></html> + + +