mirror of https://github.com/f4exb/sdrangel.git
Multi device support: add channels and channel markers to the tab associated to the device plugin
This commit is contained in:
parent
8d480c899d
commit
a26174eb8b
|
@ -244,28 +244,22 @@ void MainWindow::removeLastDevice()
|
||||||
m_deviceUIs.pop_back();
|
m_deviceUIs.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::addChannelRollup(QWidget* widget)
|
void MainWindow::addChannelRollup(int deviceTabIndex, QWidget* widget)
|
||||||
{
|
{
|
||||||
m_deviceUIs.back()->m_channelWindow->addRollupWidget(widget);
|
if (deviceTabIndex < ui->tabInputsView->count())
|
||||||
|
{
|
||||||
|
DeviceUISet *deviceUI = m_deviceUIs[deviceTabIndex];
|
||||||
|
deviceUI->m_channelWindow->addRollupWidget(widget);
|
||||||
ui->channelDock->show();
|
ui->channelDock->show();
|
||||||
ui->channelDock->raise();
|
ui->channelDock->raise();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::addViewAction(QAction* action)
|
void MainWindow::addViewAction(QAction* action)
|
||||||
{
|
{
|
||||||
ui->menu_Window->addAction(action);
|
ui->menu_Window->addAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::addChannelMarker(ChannelMarker* channelMarker)
|
|
||||||
{
|
|
||||||
m_deviceUIs.back()->m_spectrum->addChannelMarker(channelMarker);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::removeChannelMarker(ChannelMarker* channelMarker)
|
|
||||||
{
|
|
||||||
m_deviceUIs.back()->m_spectrum->removeChannelMarker(channelMarker);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::setInputGUI(int deviceTabIndex, QWidget* gui, const QString& sourceDisplayName)
|
void MainWindow::setInputGUI(int deviceTabIndex, QWidget* gui, const QString& sourceDisplayName)
|
||||||
{
|
{
|
||||||
char tabNameCStr[16];
|
char tabNameCStr[16];
|
||||||
|
|
|
@ -71,13 +71,11 @@ public:
|
||||||
|
|
||||||
MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||||
|
|
||||||
void addChannelRollup(QWidget* widget);
|
|
||||||
void addViewAction(QAction* action);
|
void addViewAction(QAction* action);
|
||||||
|
|
||||||
void addChannelMarker(ChannelMarker* channelMarker); // TODO: review this
|
void addChannelRollup(int deviceTabIndex, QWidget* widget);
|
||||||
void removeChannelMarker(ChannelMarker* channelMarker); // TODO: review this
|
|
||||||
|
|
||||||
void setInputGUI(int deviceTabIndex, QWidget* gui, const QString& sourceDisplayName);
|
void setInputGUI(int deviceTabIndex, QWidget* gui, const QString& sourceDisplayName);
|
||||||
|
|
||||||
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -46,12 +46,12 @@ void PluginAPI::removeChannelInstance(PluginGUI* pluginGUI)
|
||||||
|
|
||||||
void PluginAPI::addChannelMarker(ChannelMarker* channelMarker)
|
void PluginAPI::addChannelMarker(ChannelMarker* channelMarker)
|
||||||
{
|
{
|
||||||
m_mainWindow->addChannelMarker(channelMarker); // TODO: suspect verify. No ref to main window expected.
|
m_pluginManager->addChannelMarker(channelMarker);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginAPI::removeChannelMarker(ChannelMarker* channelMarker)
|
void PluginAPI::removeChannelMarker(ChannelMarker* channelMarker)
|
||||||
{
|
{
|
||||||
m_mainWindow->removeChannelMarker(channelMarker); // TODO: suspect verify. No ref to main window expected.
|
m_pluginManager->removeChannelMarker(channelMarker);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
|
void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "dsp/dspdeviceengine.h"
|
#include "dsp/dspdeviceengine.h"
|
||||||
#include "dsp/samplesource.h"
|
#include "dsp/samplesource.h"
|
||||||
|
#include "gui/glspectrum.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
@ -64,11 +65,6 @@ void PluginManager::registerChannelInstance(const QString& channelName, PluginGU
|
||||||
renameChannelInstances();
|
renameChannelInstances();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginManager::addChannelRollup(QWidget* pluginGUI)
|
|
||||||
{
|
|
||||||
m_mainWindow->addChannelRollup(pluginGUI);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PluginManager::removeChannelInstance(PluginGUI* pluginGUI)
|
void PluginManager::removeChannelInstance(PluginGUI* pluginGUI)
|
||||||
{
|
{
|
||||||
for(ChannelInstanceRegistrations::iterator it = m_channelInstanceRegistrations.begin(); it != m_channelInstanceRegistrations.end(); ++it) {
|
for(ChannelInstanceRegistrations::iterator it = m_channelInstanceRegistrations.begin(); it != m_channelInstanceRegistrations.end(); ++it) {
|
||||||
|
@ -89,6 +85,21 @@ void PluginManager::registerSampleSource(const QString& sourceName, PluginInterf
|
||||||
m_sampleSourceRegistrations.append(SampleSourceRegistration(sourceName, plugin));
|
m_sampleSourceRegistrations.append(SampleSourceRegistration(sourceName, plugin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PluginManager::addChannelRollup(QWidget* widget)
|
||||||
|
{
|
||||||
|
m_mainWindow->addChannelRollup(m_deviceTabIndex, widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PluginManager::addChannelMarker(ChannelMarker* channelMarker)
|
||||||
|
{
|
||||||
|
m_spectrum->addChannelMarker(channelMarker);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PluginManager::removeChannelMarker(ChannelMarker* channelMarker)
|
||||||
|
{
|
||||||
|
m_spectrum->removeChannelMarker(channelMarker);
|
||||||
|
}
|
||||||
|
|
||||||
void PluginManager::setInputGUI(QWidget* gui, const QString& sourceDisplayName)
|
void PluginManager::setInputGUI(QWidget* gui, const QString& sourceDisplayName)
|
||||||
{
|
{
|
||||||
//m_mainWindow->setInputGUI(gui);
|
//m_mainWindow->setInputGUI(gui);
|
||||||
|
|
|
@ -19,6 +19,7 @@ class DSPDeviceEngine;
|
||||||
class GLSpectrum;
|
class GLSpectrum;
|
||||||
class SampleSink;
|
class SampleSink;
|
||||||
class ThreadedSampleSink;
|
class ThreadedSampleSink;
|
||||||
|
class ChannelMarker;
|
||||||
|
|
||||||
class SDRANGEL_API PluginManager : public QObject {
|
class SDRANGEL_API PluginManager : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -48,10 +49,13 @@ public:
|
||||||
// Callbacks from the plugins
|
// Callbacks from the plugins
|
||||||
void registerChannel(const QString& channelName, PluginInterface* plugin);
|
void registerChannel(const QString& channelName, PluginInterface* plugin);
|
||||||
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
||||||
void addChannelRollup(QWidget* pluginGUI);
|
|
||||||
void removeChannelInstance(PluginGUI* pluginGUI);
|
void removeChannelInstance(PluginGUI* pluginGUI);
|
||||||
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
||||||
|
|
||||||
|
void addChannelRollup(QWidget* widget);
|
||||||
|
void addChannelMarker(ChannelMarker* channelMarker);
|
||||||
|
void removeChannelMarker(ChannelMarker* channelMarker);
|
||||||
|
|
||||||
void setInputGUI(QWidget* gui, const QString& sourceDisplayName);
|
void setInputGUI(QWidget* gui, const QString& sourceDisplayName);
|
||||||
|
|
||||||
void addSink(SampleSink* sink);
|
void addSink(SampleSink* sink);
|
||||||
|
|
Loading…
Reference in New Issue