mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 01:39:05 -05:00
Removed main window reference from device source API
This commit is contained in:
parent
9cfe817e96
commit
7d746755c1
@ -22,12 +22,11 @@
|
||||
#include "plugin/plugininterface.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "gui/channelwindow.h"
|
||||
#include "mainwindow.h"
|
||||
#include "settings/preset.h"
|
||||
#include "dsp/dspengine.h"
|
||||
|
||||
// TODO: extract GUI dependencies in a separate object
|
||||
DeviceSourceAPI::DeviceSourceAPI(MainWindow *mainWindow,
|
||||
int deviceTabIndex,
|
||||
DeviceSourceAPI::DeviceSourceAPI(int deviceTabIndex,
|
||||
DSPDeviceSourceEngine *deviceSourceEngine,
|
||||
GLSpectrum *glSpectrum,
|
||||
ChannelWindow *channelWindow) :
|
||||
@ -40,7 +39,7 @@ DeviceSourceAPI::DeviceSourceAPI(MainWindow *mainWindow,
|
||||
m_sampleSourcePluginInstanceUI(0),
|
||||
m_buddySharedPtr(0),
|
||||
m_isBuddyLeader(false),
|
||||
m_masterTimer(mainWindow->getMasterTimer()) // TODO: get master timer directly not from main window
|
||||
m_masterTimer(DSPEngine::instance()->getMasterTimer()) // TODO: get master timer directly not from main window
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include "util/export.h"
|
||||
|
||||
class MainWindow;
|
||||
class GLSpectrum;
|
||||
class ChannelWindow;
|
||||
class BasebandSampleSink;
|
||||
@ -131,8 +130,7 @@ protected:
|
||||
|
||||
typedef QList<ChannelInstanceRegistration> ChannelInstanceRegistrations;
|
||||
|
||||
DeviceSourceAPI(MainWindow *mainWindow,
|
||||
int deviceTabIndex,
|
||||
DeviceSourceAPI(int deviceTabIndex,
|
||||
DSPDeviceSourceEngine *deviceSourceEngine,
|
||||
GLSpectrum *glSpectrum,
|
||||
ChannelWindow *channelWindow);
|
||||
|
@ -203,7 +203,7 @@ void MainWindow::addSourceDevice()
|
||||
char tabNameCStr[16];
|
||||
sprintf(tabNameCStr, "R%d", deviceTabIndex);
|
||||
|
||||
DeviceSourceAPI *deviceSourceAPI = new DeviceSourceAPI(this, deviceTabIndex, dspDeviceSourceEngine, m_deviceUIs.back()->m_spectrum, m_deviceUIs.back()->m_channelWindow);
|
||||
DeviceSourceAPI *deviceSourceAPI = new DeviceSourceAPI(deviceTabIndex, dspDeviceSourceEngine, m_deviceUIs.back()->m_spectrum, m_deviceUIs.back()->m_channelWindow);
|
||||
|
||||
m_deviceUIs.back()->m_deviceSourceAPI = deviceSourceAPI;
|
||||
m_deviceUIs.back()->m_samplingDeviceControl->setDeviceAPI(deviceSourceAPI);
|
||||
|
Loading…
Reference in New Issue
Block a user