mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-17 13:52:47 -04:00
Use main window master timer for SSB demod spectrum and Channel Analyzer spectrum and scope
This commit is contained in:
parent
e6caa94593
commit
07f16bb176
@ -71,6 +71,7 @@ public:
|
|||||||
void setSampleRate(int sampleRate);
|
void setSampleRate(int sampleRate);
|
||||||
int getSampleRate() const { return m_sampleRate; }
|
int getSampleRate() const { return m_sampleRate; }
|
||||||
Mode getDataMode() const { return m_mode; }
|
Mode getDataMode() const { return m_mode; }
|
||||||
|
void connectTimer(const QTimer& timer);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void traceSizeChanged(int);
|
void traceSizeChanged(int);
|
||||||
|
@ -47,6 +47,9 @@ public:
|
|||||||
// Sample Source stuff
|
// Sample Source stuff
|
||||||
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
||||||
|
|
||||||
|
// R/O access to main window
|
||||||
|
const MainWindow* getMainWindow() const { return m_mainWindow; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PluginManager* m_pluginManager;
|
PluginManager* m_pluginManager;
|
||||||
MainWindow* m_mainWindow;
|
MainWindow* m_mainWindow;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "gui/basicchannelsettingswidget.h"
|
#include "gui/basicchannelsettingswidget.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "chanalyzer.h"
|
#include "chanalyzer.h"
|
||||||
@ -277,6 +278,9 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, QWidget* parent) :
|
|||||||
ui->glSpectrum->setDisplayWaterfall(true);
|
ui->glSpectrum->setDisplayWaterfall(true);
|
||||||
ui->glSpectrum->setDisplayMaxHold(true);
|
ui->glSpectrum->setDisplayMaxHold(true);
|
||||||
ui->glSpectrum->setSsbSpectrum(true);
|
ui->glSpectrum->setSsbSpectrum(true);
|
||||||
|
ui->glSpectrum->connectTimer(m_pluginAPI->getMainWindow()->getMasterTimer());
|
||||||
|
|
||||||
|
ui->glScope->connectTimer(m_pluginAPI->getMainWindow()->getMasterTimer());
|
||||||
|
|
||||||
m_channelMarker = new ChannelMarker(this);
|
m_channelMarker = new ChannelMarker(this);
|
||||||
m_channelMarker->setColor(Qt::gray);
|
m_channelMarker->setColor(Qt::gray);
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "gui/basicchannelsettingswidget.h"
|
#include "gui/basicchannelsettingswidget.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -238,6 +239,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, QWidget* parent) :
|
|||||||
ui->glSpectrum->setDisplayWaterfall(true);
|
ui->glSpectrum->setDisplayWaterfall(true);
|
||||||
ui->glSpectrum->setDisplayMaxHold(true);
|
ui->glSpectrum->setDisplayMaxHold(true);
|
||||||
ui->glSpectrum->setSsbSpectrum(true);
|
ui->glSpectrum->setSsbSpectrum(true);
|
||||||
|
ui->glSpectrum->connectTimer(m_pluginAPI->getMainWindow()->getMasterTimer());
|
||||||
|
|
||||||
m_channelMarker = new ChannelMarker(this);
|
m_channelMarker = new ChannelMarker(this);
|
||||||
m_channelMarker->setColor(Qt::green);
|
m_channelMarker->setColor(Qt::green);
|
||||||
|
@ -1435,3 +1435,11 @@ void GLScope::setTriggerPre(Real triggerPre)
|
|||||||
{
|
{
|
||||||
m_triggerPre = triggerPre;
|
m_triggerPre = triggerPre;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GLScope::connectTimer(const QTimer& timer)
|
||||||
|
{
|
||||||
|
std::cerr << "GLScope::connectTimer" << std::endl;
|
||||||
|
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
connect(&timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
m_timer.stop();
|
||||||
|
}
|
||||||
|
@ -1546,6 +1546,8 @@ void GLSpectrum::setWaterfallShare(Real waterfallShare)
|
|||||||
|
|
||||||
void GLSpectrum::connectTimer(const QTimer& timer)
|
void GLSpectrum::connectTimer(const QTimer& timer)
|
||||||
{
|
{
|
||||||
|
std::cerr << "GLSpectrum::connectTimer" << std::endl;
|
||||||
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
connect(&timer, SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
m_timer.stop();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user