mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-07-26 03:54:30 -04:00
Multi device support: moved DSPDeviceEngine start/stop actions and status from main window to each source plugin GUI
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "plugin/pluginmanager.h"
|
||||
#include "mainwindow.h"
|
||||
#include "dsp/dspengine.h"
|
||||
|
||||
QDockWidget* PluginAPI::createMainWindowDock(Qt::DockWidgetArea dockWidgetArea, const QString& title)
|
||||
{
|
||||
@@ -69,6 +68,31 @@ void PluginAPI::removeThreadedSink(ThreadedSampleSink* sink)
|
||||
m_pluginManager->removeThreadedSink(sink);
|
||||
}
|
||||
|
||||
bool PluginAPI::initAcquisition()
|
||||
{
|
||||
return m_pluginManager->initAcquisition();
|
||||
}
|
||||
|
||||
bool PluginAPI::startAcquisition()
|
||||
{
|
||||
return m_pluginManager->startAcquisition();
|
||||
}
|
||||
|
||||
void PluginAPI::stopAcquistion()
|
||||
{
|
||||
m_pluginManager->stopAcquistion();
|
||||
}
|
||||
|
||||
DSPDeviceEngine::State PluginAPI::state() const
|
||||
{
|
||||
return m_pluginManager->state();
|
||||
}
|
||||
|
||||
QString PluginAPI::errorMessage()
|
||||
{
|
||||
return m_pluginManager->errorMessage();
|
||||
}
|
||||
|
||||
PluginAPI::PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow) :
|
||||
QObject(mainWindow),
|
||||
m_pluginManager(pluginManager),
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include "util/export.h"
|
||||
#include "dsp/dspdeviceengine.h"
|
||||
|
||||
class QDockWidget;
|
||||
class QAction;
|
||||
@@ -43,6 +44,11 @@ public:
|
||||
// Device engine stuff
|
||||
void addThreadedSink(ThreadedSampleSink* sink);
|
||||
void removeThreadedSink(ThreadedSampleSink* sink);
|
||||
bool initAcquisition(); //!< Initialize device engine acquisition sequence
|
||||
bool startAcquisition(); //!< Start device engine acquisition sequence
|
||||
void stopAcquistion(); //!< Stop device engine acquisition sequence
|
||||
DSPDeviceEngine::State state() const; //!< device engine state
|
||||
QString errorMessage(); //!< Return the current device engine error message
|
||||
|
||||
// R/O access to main window
|
||||
const MainWindow* getMainWindow() const { return m_mainWindow; }
|
||||
|
||||
@@ -51,6 +51,11 @@ public:
|
||||
|
||||
void addThreadedSink(ThreadedSampleSink* sink);
|
||||
void removeThreadedSink(ThreadedSampleSink* sink);
|
||||
bool initAcquisition() { return m_dspDeviceEngine->initAcquisition(); } //!< Initialize device engine acquisition sequence
|
||||
bool startAcquisition() { return m_dspDeviceEngine->startAcquisition(); } //!< Start device engine acquisition sequence
|
||||
void stopAcquistion() { m_dspDeviceEngine->stopAcquistion(); } //!< Stop device engine acquisition sequence
|
||||
DSPDeviceEngine::State state() const { return m_dspDeviceEngine->state(); }
|
||||
QString errorMessage() { return m_dspDeviceEngine->errorMessage(); } //!< Return the current device engine error message
|
||||
|
||||
void loadSettings(const Preset* preset);
|
||||
void loadSourceSettings(const Preset* preset);
|
||||
|
||||
Reference in New Issue
Block a user