mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 14:04:46 -04:00
Removed direct reference to the DeviceSourceAPI in the source GUIs
This commit is contained in:
@@ -28,17 +28,16 @@
|
||||
#include "fcdproconst.h"
|
||||
#include "fcdtraits.h"
|
||||
|
||||
FCDProGui::FCDProGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FCDProGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(NULL),
|
||||
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||
{
|
||||
m_sampleSource = (FCDProInput*) m_deviceAPI->getSampleSource();
|
||||
m_sampleSource = (FCDProInput*) m_deviceUISet->m_deviceSourceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@@ -438,15 +437,15 @@ void FCDProGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_deviceAPI->initAcquisition())
|
||||
if (m_deviceUISet->m_deviceSourceAPI->initAcquisition())
|
||||
{
|
||||
m_deviceAPI->startAcquisition();
|
||||
m_deviceUISet->m_deviceSourceAPI->startAcquisition();
|
||||
DSPEngine::instance()->startAudioOutput();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_deviceAPI->stopAcquisition();
|
||||
m_deviceUISet->m_deviceSourceAPI->stopAcquisition();
|
||||
DSPEngine::instance()->stopAudioOutput();
|
||||
}
|
||||
}
|
||||
@@ -475,7 +474,7 @@ void FCDProGui::on_transverter_clicked()
|
||||
|
||||
void FCDProGui::updateStatus()
|
||||
{
|
||||
int state = m_deviceAPI->state();
|
||||
int state = m_deviceUISet->m_deviceSourceAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@@ -492,7 +491,7 @@ void FCDProGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceSourceEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceSourceAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user