1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 23:45:00 -04:00

Channel Analyzer: set GUI sample rate at construction time. Fixes #649

This commit is contained in:
f4exb
2020-10-07 21:28:32 +02:00
parent de3299098f
commit 40bd300baf
6 changed files with 47 additions and 8 deletions
+13
View File
@@ -46,6 +46,7 @@ GLScope::GLScope(QWidget *parent) : QGLWidget(parent),
m_bufferIndex(0),
m_displayMode(DisplayX),
m_displayPolGrid(false),
m_masterTimer(nullptr),
m_dataChanged(0),
m_configChanged(false),
m_sampleRate(0),
@@ -2022,6 +2023,18 @@ void GLScope::connectTimer(const QTimer &timer)
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
connect(&timer, SIGNAL(timeout()), this, SLOT(tick()));
m_timer.stop();
m_masterTimer = &timer;
}
void GLScope::disconnectTimer()
{
qDebug() << "GLScope::disconnectTimer";
if (m_masterTimer) {
disconnect(m_masterTimer, SIGNAL(timeout()), this, SLOT(tick()));
}
m_masterTimer = nullptr;
}
void GLScope::cleanup()