2014-05-18 15:52:39 +00:00
|
|
|
#include <QDockWidget>
|
|
|
|
#include "plugin/pluginapi.h"
|
|
|
|
#include "plugin/pluginmanager.h"
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
MessageQueue* PluginAPI::getMainWindowMessageQueue()
|
|
|
|
{
|
2015-08-18 00:47:14 +00:00
|
|
|
return m_mainWindow->getInputMessageQueue();
|
2014-05-18 15:52:39 +00:00
|
|
|
}
|
|
|
|
|
2016-10-13 20:23:43 +00:00
|
|
|
void PluginAPI::registerRxChannel(const QString& channelName, PluginInterface* plugin)
|
2014-05-18 15:52:39 +00:00
|
|
|
{
|
2016-10-13 20:23:43 +00:00
|
|
|
m_pluginManager->registerRxChannel(channelName, plugin);
|
2014-05-18 15:52:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
|
|
|
|
{
|
|
|
|
m_pluginManager->registerSampleSource(sourceName, plugin);
|
|
|
|
}
|
|
|
|
|
2016-10-13 20:23:43 +00:00
|
|
|
PluginAPI::ChannelRegistrations *PluginAPI::getRxChannelRegistrations()
|
2016-05-16 16:53:01 +00:00
|
|
|
{
|
2016-10-13 20:23:43 +00:00
|
|
|
return m_pluginManager->getRxChannelRegistrations();
|
2016-05-16 16:53:01 +00:00
|
|
|
}
|
|
|
|
|
2016-10-19 16:07:27 +00:00
|
|
|
void PluginAPI::registerTxChannel(const QString& channelName, PluginInterface* plugin)
|
|
|
|
{
|
|
|
|
m_pluginManager->registerTxChannel(channelName, plugin);
|
|
|
|
}
|
|
|
|
|
|
|
|
void PluginAPI::registerSampleSink(const QString& sinkName, PluginInterface* plugin)
|
|
|
|
{
|
2016-10-19 20:48:24 +00:00
|
|
|
m_pluginManager->registerSampleSink(sinkName, plugin);
|
2016-10-19 16:07:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PluginAPI::ChannelRegistrations *PluginAPI::getTxChannelRegistrations()
|
|
|
|
{
|
|
|
|
return m_pluginManager->getTxChannelRegistrations();
|
|
|
|
}
|
|
|
|
|
2016-05-16 16:53:01 +00:00
|
|
|
|
2016-05-11 14:03:03 +00:00
|
|
|
PluginAPI::PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow) :
|
2014-05-18 15:52:39 +00:00
|
|
|
QObject(mainWindow),
|
|
|
|
m_pluginManager(pluginManager),
|
2016-05-11 14:03:03 +00:00
|
|
|
m_mainWindow(mainWindow)
|
2014-05-18 15:52:39 +00:00
|
|
|
{
|
|
|
|
}
|
2016-05-13 09:42:03 +00:00
|
|
|
|
|
|
|
PluginAPI::~PluginAPI()
|
|
|
|
{
|
|
|
|
}
|