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