From 61796515afe1e5f3d925308d258710853a657890 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 5 Dec 2022 15:34:39 -0500 Subject: [PATCH] More cleanup in devsetup. --- q65w/devsetup.cpp | 76 ------------------------------------------ q65w/devsetup.ui | 85 +---------------------------------------------- 2 files changed, 1 insertion(+), 160 deletions(-) diff --git a/q65w/devsetup.cpp b/q65w/devsetup.cpp index 857c0ab02..675ab1583 100644 --- a/q65w/devsetup.cpp +++ b/q65w/devsetup.cpp @@ -20,63 +20,6 @@ DevSetup::~DevSetup() void DevSetup::initDlg() { - int k,id; - int valid_devices=0; - int minChan[MAXDEVICES]; - int maxChan[MAXDEVICES]; - int minSpeed[MAXDEVICES]; - int maxSpeed[MAXDEVICES]; - char hostAPI_DeviceName[MAXDEVICES][50]; - char s[256]; - int numDevices=Pa_GetDeviceCount(); - getDev(&numDevices,hostAPI_DeviceName,minChan,maxChan,minSpeed,maxSpeed); - k=0; - for(id=0; id= minSpeed[id] && 96000 <= maxSpeed[id]) { - m_inDevList[k]=id; - k++; - sprintf(s,"%2d %d %-49s",id,maxChan[id],hostAPI_DeviceName[id]); - QString t(s); - ui.comboBoxSndIn->addItem(t); - valid_devices++; - } - } - - const PaDeviceInfo *pdi; - int nchout; - char *p,*p1; - char p2[256]; - char pa_device_name[128]; - char pa_device_hostapi[128]; - - k=0; - for(id=0; idmaxOutputChannels; - if(nchout>=2) { - m_outDevList[k]=id; - k++; - sprintf((char*)(pa_device_name),"%s",pdi->name); - sprintf((char*)(pa_device_hostapi),"%s", - Pa_GetHostApiInfo(pdi->hostApi)->name); - - p1=(char*)""; - p=strstr(pa_device_hostapi,"MME"); - if(p!=NULL) p1=(char*)"MME"; - p=strstr(pa_device_hostapi,"Direct"); - if(p!=NULL) p1=(char*)"DirectX"; - p=strstr(pa_device_hostapi,"WASAPI"); - if(p!=NULL) p1=(char*)"WASAPI"; - p=strstr(pa_device_hostapi,"ASIO"); - if(p!=NULL) p1=(char*)"ASIO"; - p=strstr(pa_device_hostapi,"WDM-KS"); - if(p!=NULL) p1=(char*)"WDM-KS"; - - sprintf(p2,"%2d %-8s %-39s",id,p1,pa_device_name); - QString t(p2); - } - } - ui.myCallEntry->setText(m_myCall); ui.myGridEntry->setText(m_myGrid); ui.astroFont->setValue(m_astroFont); @@ -84,17 +27,9 @@ void DevSetup::initDlg() ui.azelDirEntry->setText(m_azelDir); ui.fCalSpinBox->setValue(m_fCal); ui.faddEntry->setText(QString::number(m_fAdd,'f',3)); - ui.networkRadioButton->setChecked(m_network); - ui.soundCardRadioButton->setChecked(!m_network); - ui.comboBoxSndIn->setEnabled(!m_network); - ui.comboBoxSndIn->setCurrentIndex(m_nDevIn); ui.sbPort->setValue(m_udpPort); ui.cbIQswap->setChecked(m_IQswap); ui.sb_dB->setValue(m_dB); - - m_paInDevice=m_inDevList[m_nDevIn]; - m_paOutDevice=m_outDevList[m_nDevOut]; - } //------------------------------------------------------- accept() @@ -104,11 +39,6 @@ void DevSetup::accept() // Check to see whether SoundInThread must be restarted, // and save user parameters. - if(m_network!=ui.networkRadioButton->isChecked() or - m_nDevIn!=ui.comboBoxSndIn->currentIndex() or - m_paInDevice!=m_inDevList[m_nDevIn] or - m_udpPort!=ui.sbPort->value()) m_restartSoundIn=true; - m_myCall=ui.myCallEntry->text(); m_myGrid=ui.myGridEntry->text(); m_astroFont=ui.astroFont->value(); @@ -116,10 +46,6 @@ void DevSetup::accept() m_azelDir=ui.azelDirEntry->text(); m_fCal=ui.fCalSpinBox->value(); m_fAdd=ui.faddEntry->text().toDouble(); - m_network=ui.networkRadioButton->isChecked(); - m_nDevIn=ui.comboBoxSndIn->currentIndex(); - m_paInDevice=m_inDevList[m_nDevIn]; - m_paOutDevice=m_outDevList[m_nDevOut]; m_udpPort=ui.sbPort->value(); m_IQswap=ui.cbIQswap->isChecked(); m_dB=ui.sb_dB->value(); @@ -128,8 +54,6 @@ void DevSetup::accept() void DevSetup::on_soundCardRadioButton_toggled(bool checked) { - ui.comboBoxSndIn->setEnabled(ui.soundCardRadioButton->isChecked()); - ui.label_InputDev->setEnabled(checked); ui.label_Port->setEnabled(!checked); ui.sbPort->setEnabled(!checked); ui.cbIQswap->setEnabled(checked); diff --git a/q65w/devsetup.ui b/q65w/devsetup.ui index 05cabbccc..6d6f798ec 100644 --- a/q65w/devsetup.ui +++ b/q65w/devsetup.ui @@ -284,7 +284,7 @@ - Input Source (Rx, Baseband) + Input from Linrad @@ -296,46 +296,6 @@ - - - - - - true - - - SoundCard - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Network - - - true - - - - - @@ -435,49 +395,6 @@ - - - - false - - - - 0 - 0 - - - - Dev Ch API Name - - - - - - - - - false - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 50 - 13 - - - - - -