diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.ui b/plugins/channelrx/chanalyzer/chanalyzergui.ui index 1d0a9a050..eebd82b5b 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.ui +++ b/plugins/channelrx/chanalyzer/chanalyzergui.ui @@ -684,7 +684,7 @@ 3 - + 200 @@ -742,7 +742,7 @@
gui/buttonswitch.h
- GLScopeNG + GLScope QWidget
gui/glscopeng.h
1 diff --git a/plugins/channelrx/demodatv/atvdemodgui.ui b/plugins/channelrx/demodatv/atvdemodgui.ui index f8e933caa..e0d48cf3b 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.ui +++ b/plugins/channelrx/demodatv/atvdemodgui.ui @@ -1088,7 +1088,7 @@ 0
- + 0 @@ -1123,7 +1123,7 @@
gui/buttonswitch.h
- GLScopeNG + GLScope QWidget
gui/glscopeng.h
1 diff --git a/sdrgui/dsp/scopevisng.cpp b/sdrgui/dsp/scopevisng.cpp index 92cacf781..ec3af3073 100644 --- a/sdrgui/dsp/scopevisng.cpp +++ b/sdrgui/dsp/scopevisng.cpp @@ -39,7 +39,7 @@ MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGMemoryTrace, Message) const uint ScopeVisNG::m_traceChunkSize = 4800; -ScopeVisNG::ScopeVisNG(GLScopeNG* glScope) : +ScopeVisNG::ScopeVisNG(GLScope* glScope) : m_glScope(glScope), m_preTriggerDelay(0), m_currentTriggerIndex(0), diff --git a/sdrgui/dsp/scopevisng.h b/sdrgui/dsp/scopevisng.h index 2560fb3b0..f8a16d1e8 100644 --- a/sdrgui/dsp/scopevisng.h +++ b/sdrgui/dsp/scopevisng.h @@ -37,7 +37,7 @@ #undef M_PI #define M_PI 3.14159265358979323846 -class GLScopeNG; +class GLScope; class SDRGUI_API ScopeVisNG : public BasebandSampleSink { @@ -147,7 +147,7 @@ public: static const uint32_t m_maxNbTraces = 10; static const uint32_t m_nbTraceMemories = 50; - ScopeVisNG(GLScopeNG* glScope = 0); + ScopeVisNG(GLScope* glScope = 0); virtual ~ScopeVisNG(); void setSampleRate(int sampleRate); @@ -941,7 +941,7 @@ private: bool m_reset; }; - GLScopeNG* m_glScope; + GLScope* m_glScope; uint32_t m_preTriggerDelay; //!< Pre-trigger delay in number of samples std::vector m_triggerConditions; //!< Chain of triggers uint32_t m_currentTriggerIndex; //!< Index of current index in the chain diff --git a/sdrgui/gui/glscopegui.cpp b/sdrgui/gui/glscopegui.cpp index a052b9dd2..d553702a4 100644 --- a/sdrgui/gui/glscopegui.cpp +++ b/sdrgui/gui/glscopegui.cpp @@ -62,7 +62,7 @@ GLScopeGUI::~GLScopeGUI() delete ui; } -void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScopeNG* glScope) +void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScope* glScope) { qDebug("GLScopeGUI::setBuddies"); @@ -80,7 +80,7 @@ void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GL ui->horizontalXY->setEnabled(false); ui->verticalXY->setEnabled(false); ui->polar->setEnabled(false); - m_glScope->setDisplayMode(GLScopeNG::DisplayX); + m_glScope->setDisplayMode(GLScope::DisplayX); // initialize trigger combo ui->trigPos->setChecked(true); @@ -231,8 +231,8 @@ bool GLScopeGUI::deserialize(const QByteArray& data) ui->polar->setEnabled(false); ui->traceMode->setCurrentIndex(0); - d.readS32(1, &intValue, (int) GLScopeNG::DisplayX); - m_glScope->setDisplayMode((GLScopeNG::DisplayMode) intValue); + d.readS32(1, &intValue, (int) GLScope::DisplayX); + m_glScope->setDisplayMode((GLScope::DisplayMode) intValue); ui->onlyX->setChecked(false); ui->onlyY->setChecked(false); @@ -242,19 +242,19 @@ bool GLScopeGUI::deserialize(const QByteArray& data) switch (m_glScope->getDisplayMode()) { - case GLScopeNG::DisplayY: + case GLScope::DisplayY: ui->onlyY->setChecked(true); break; - case GLScopeNG::DisplayXYH: + case GLScope::DisplayXYH: ui->horizontalXY->setChecked(true); break; - case GLScopeNG::DisplayXYV: + case GLScope::DisplayXYV: ui->verticalXY->setChecked(true); break; - case GLScopeNG::DisplayPol: + case GLScope::DisplayPol: ui->polar->setChecked(true); break; - case GLScopeNG::DisplayX: + case GLScope::DisplayX: default: ui->onlyX->setChecked(true); break; @@ -430,7 +430,7 @@ void GLScopeGUI::on_onlyX_toggled(bool checked) ui->horizontalXY->setChecked(false); ui->verticalXY->setChecked(false); ui->polar->setChecked(false); - m_glScope->setDisplayMode(GLScopeNG::DisplayX); + m_glScope->setDisplayMode(GLScope::DisplayX); } else { @@ -448,7 +448,7 @@ void GLScopeGUI::on_onlyY_toggled(bool checked) ui->horizontalXY->setChecked(false); ui->verticalXY->setChecked(false); ui->polar->setChecked(false); - m_glScope->setDisplayMode(GLScopeNG::DisplayY); + m_glScope->setDisplayMode(GLScope::DisplayY); } else { @@ -466,7 +466,7 @@ void GLScopeGUI::on_horizontalXY_toggled(bool checked) ui->onlyY->setChecked(false); ui->verticalXY->setChecked(false); ui->polar->setChecked(false); - m_glScope->setDisplayMode(GLScopeNG::DisplayXYH); + m_glScope->setDisplayMode(GLScope::DisplayXYH); } else { @@ -484,7 +484,7 @@ void GLScopeGUI::on_verticalXY_toggled(bool checked) ui->onlyY->setChecked(false); ui->horizontalXY->setChecked(false); ui->polar->setChecked(false); - m_glScope->setDisplayMode(GLScopeNG::DisplayXYV); + m_glScope->setDisplayMode(GLScope::DisplayXYV); } else { @@ -502,7 +502,7 @@ void GLScopeGUI::on_polar_toggled(bool checked) ui->onlyY->setChecked(false); ui->horizontalXY->setChecked(false); ui->verticalXY->setChecked(false); - m_glScope->setDisplayMode(GLScopeNG::DisplayPol); + m_glScope->setDisplayMode(GLScope::DisplayPol); } else { @@ -613,7 +613,7 @@ void GLScopeGUI::on_traceDel_clicked(bool checked __attribute__((unused))) ui->horizontalXY->setEnabled(false); ui->verticalXY->setEnabled(false); ui->polar->setEnabled(false); - m_glScope->setDisplayMode(GLScopeNG::DisplayX); + m_glScope->setDisplayMode(GLScope::DisplayX); } m_scopeVis->removeTrace(ui->trace->value()); diff --git a/sdrgui/gui/glscopegui.h b/sdrgui/gui/glscopegui.h index 440e15d75..96fea8ef5 100644 --- a/sdrgui/gui/glscopegui.h +++ b/sdrgui/gui/glscopegui.h @@ -32,7 +32,7 @@ namespace Ui { } class MessageQueue; -class GLScopeNG; +class GLScope; class SDRGUI_API GLScopeGUI : public QWidget, public Serializable { Q_OBJECT @@ -49,7 +49,7 @@ public: explicit GLScopeGUI(QWidget* parent = 0); ~GLScopeGUI(); - void setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScopeNG* glScope); + void setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScope* glScope); void setSampleRate(int sampleRate); void resetToDefaults(); @@ -144,7 +144,7 @@ private: MessageQueue* m_messageQueue; ScopeVisNG* m_scopeVis; - GLScopeNG* m_glScope; + GLScope* m_glScope; int m_sampleRate; int m_timeBase; diff --git a/sdrgui/gui/glscopeng.cpp b/sdrgui/gui/glscopeng.cpp index d8d7b9ba3..99633b431 100644 --- a/sdrgui/gui/glscopeng.cpp +++ b/sdrgui/gui/glscopeng.cpp @@ -26,7 +26,7 @@ #include "glscopeng.h" -GLScopeNG::GLScopeNG(QWidget* parent) : +GLScope::GLScope(QWidget* parent) : QGLWidget(parent), m_tracesData(0), m_traces(0), @@ -65,12 +65,12 @@ GLScopeNG::GLScopeNG(QWidget* parent) : //m_traceCounter = 0; } -GLScopeNG::~GLScopeNG() +GLScope::~GLScope() { cleanup(); } -void GLScopeNG::setDisplayGridIntensity(int intensity) +void GLScope::setDisplayGridIntensity(int intensity) { m_displayGridIntensity = intensity; if (m_displayGridIntensity > 100) { @@ -81,7 +81,7 @@ void GLScopeNG::setDisplayGridIntensity(int intensity) update(); } -void GLScopeNG::setDisplayTraceIntensity(int intensity) +void GLScope::setDisplayTraceIntensity(int intensity) { m_displayTraceIntensity = intensity; if (m_displayTraceIntensity > 100) { @@ -92,13 +92,13 @@ void GLScopeNG::setDisplayTraceIntensity(int intensity) update(); } -void GLScopeNG::setTraces(std::vector* tracesData, std::vector* traces) +void GLScope::setTraces(std::vector* tracesData, std::vector* traces) { m_tracesData = tracesData; m_traces = traces; } -void GLScopeNG::newTraces(std::vector* traces) +void GLScope::newTraces(std::vector* traces) { if (traces->size() > 0) { @@ -112,22 +112,22 @@ void GLScopeNG::newTraces(std::vector* traces) } } -void GLScopeNG::initializeGL() +void GLScope::initializeGL() { QOpenGLContext *glCurrentContext = QOpenGLContext::currentContext(); if (glCurrentContext) { if (QOpenGLContext::currentContext()->isValid()) { - qDebug() << "GLScopeNG::initializeGL: context:" + qDebug() << "GLScope::initializeGL: context:" << " major: " << (QOpenGLContext::currentContext()->format()).majorVersion() << " minor: " << (QOpenGLContext::currentContext()->format()).minorVersion() << " ES: " << (QOpenGLContext::currentContext()->isOpenGLES() ? "yes" : "no"); } else { - qDebug() << "GLScopeNG::initializeGL: current context is invalid"; + qDebug() << "GLScope::initializeGL: current context is invalid"; } } else { - qCritical() << "GLScopeNG::initializeGL: no current context"; + qCritical() << "GLScope::initializeGL: no current context"; return; } @@ -135,25 +135,25 @@ void GLScopeNG::initializeGL() if (surface == 0) { - qCritical() << "GLScopeNG::initializeGL: no surface attached"; + qCritical() << "GLScope::initializeGL: no surface attached"; return; } else { if (surface->surfaceType() != QSurface::OpenGLSurface) { - qCritical() << "GLScopeNG::initializeGL: surface is not an OpenGLSurface: " << surface->surfaceType() + qCritical() << "GLScope::initializeGL: surface is not an OpenGLSurface: " << surface->surfaceType() << " cannot use an OpenGL context"; return; } else { - qDebug() << "GLScopeNG::initializeGL: OpenGL surface:" + qDebug() << "GLScope::initializeGL: OpenGL surface:" << " class: " << (surface->surfaceClass() == QSurface::Window ? "Window" : "Offscreen"); } } - connect(glCurrentContext, &QOpenGLContext::aboutToBeDestroyed, this, &GLScopeNG::cleanup); // TODO: when migrating to QOpenGLWidget + connect(glCurrentContext, &QOpenGLContext::aboutToBeDestroyed, this, &GLScope::cleanup); // TODO: when migrating to QOpenGLWidget QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions(); glFunctions->initializeOpenGLFunctions(); @@ -167,14 +167,14 @@ void GLScopeNG::initializeGL() m_glShaderPowerOverlay.initializeGL(); } -void GLScopeNG::resizeGL(int width, int height) +void GLScope::resizeGL(int width, int height) { QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions(); glFunctions->glViewport(0, 0, width, height); m_configChanged = true; } -void GLScopeNG::paintGL() +void GLScope::paintGL() { if(!m_mutex.tryLock(2)) return; @@ -182,7 +182,7 @@ void GLScopeNG::paintGL() if(m_configChanged) applyConfig(); -// qDebug("GLScopeNG::paintGL: m_traceCounter: %d", m_traceCounter); +// qDebug("GLScope::paintGL: m_traceCounter: %d", m_traceCounter); // m_traceCounter = 0; m_dataChanged = false; @@ -923,7 +923,7 @@ void GLScopeNG::paintGL() m_mutex.unlock(); } -void GLScopeNG::setSampleRate(int sampleRate) +void GLScope::setSampleRate(int sampleRate) { m_sampleRate = sampleRate; m_configChanged = true; @@ -931,55 +931,55 @@ void GLScopeNG::setSampleRate(int sampleRate) emit sampleRateChanged(m_sampleRate); } -void GLScopeNG::setTimeBase(int timeBase) +void GLScope::setTimeBase(int timeBase) { m_timeBase = timeBase; m_configChanged = true; update(); } -void GLScopeNG::setTriggerPre(uint32_t triggerPre) +void GLScope::setTriggerPre(uint32_t triggerPre) { m_triggerPre = triggerPre; m_configChanged = true; update(); } -void GLScopeNG::setTimeOfsProMill(int timeOfsProMill) +void GLScope::setTimeOfsProMill(int timeOfsProMill) { m_timeOfsProMill = timeOfsProMill; m_configChanged = true; update(); } -void GLScopeNG::setFocusedTraceIndex(uint32_t traceIndex) +void GLScope::setFocusedTraceIndex(uint32_t traceIndex) { m_focusedTraceIndex = traceIndex; m_configChanged = true; update(); } -void GLScopeNG::setDisplayMode(DisplayMode displayMode) +void GLScope::setDisplayMode(DisplayMode displayMode) { m_displayMode = displayMode; m_configChanged = true; update(); } -void GLScopeNG::setTraceSize(int traceSize) +void GLScope::setTraceSize(int traceSize) { m_traceSize = traceSize; m_configChanged = true; update(); } -void GLScopeNG::updateDisplay() +void GLScope::updateDisplay() { m_configChanged = true; update(); } -void GLScopeNG::applyConfig() +void GLScope::applyConfig() { m_configChanged = false; @@ -1048,7 +1048,7 @@ void GLScopeNG::applyConfig() m_q3Polar.allocate(2*(end - start)); } -void GLScopeNG::setUniqueDisplays() +void GLScope::setUniqueDisplays() { QFontMetrics fm(font()); int M = fm.width("-"); @@ -1250,7 +1250,7 @@ void GLScopeNG::setUniqueDisplays() } // Y vertical scale } -void GLScopeNG::setVerticalDisplays() +void GLScope::setVerticalDisplays() { QFontMetrics fm(font()); int M = fm.width("-"); @@ -1451,7 +1451,7 @@ void GLScopeNG::setVerticalDisplays() } // Y vertical scale (Y2) } -void GLScopeNG::setHorizontalDisplays() +void GLScope::setHorizontalDisplays() { QFontMetrics fm(font()); int M = fm.width("-"); @@ -1651,7 +1651,7 @@ void GLScopeNG::setHorizontalDisplays() } // Y vertical scale (Y2) } -void GLScopeNG::setPolarDisplays() +void GLScope::setPolarDisplays() { QFontMetrics fm(font()); int M = fm.width("-"); @@ -1863,7 +1863,7 @@ void GLScopeNG::setPolarDisplays() } // Polar XY vertical scale (Y2) } -void GLScopeNG::setYScale(ScaleEngine& scale, uint32_t highlightedTraceIndex) +void GLScope::setYScale(ScaleEngine& scale, uint32_t highlightedTraceIndex) { ScopeVisNG::TraceData& traceData = (*m_tracesData)[highlightedTraceIndex]; double amp_range = 2.0 / traceData.m_amp; @@ -1908,7 +1908,7 @@ void GLScopeNG::setYScale(ScaleEngine& scale, uint32_t highlightedTraceIndex) } } -void GLScopeNG::drawChannelOverlay( +void GLScope::drawChannelOverlay( const QString& text, const QColor& color, QPixmap& channelOverlayPixmap, @@ -1964,22 +1964,22 @@ void GLScopeNG::drawChannelOverlay( } } -void GLScopeNG::tick() +void GLScope::tick() { if(m_dataChanged) { update(); } } -void GLScopeNG::connectTimer(const QTimer& timer) +void GLScope::connectTimer(const QTimer& timer) { - qDebug() << "GLScopeNG::connectTimer"; + qDebug() << "GLScope::connectTimer"; disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick())); connect(&timer, SIGNAL(timeout()), this, SLOT(tick())); m_timer.stop(); } -void GLScopeNG::cleanup() +void GLScope::cleanup() { //makeCurrent(); m_glShaderSimple.cleanup(); diff --git a/sdrgui/gui/glscopeng.h b/sdrgui/gui/glscopeng.h index 12f1cca99..722fc1965 100644 --- a/sdrgui/gui/glscopeng.h +++ b/sdrgui/gui/glscopeng.h @@ -35,7 +35,7 @@ class QPainter; -class SDRGUI_API GLScopeNG: public QGLWidget { +class SDRGUI_API GLScope: public QGLWidget { Q_OBJECT public: @@ -47,8 +47,8 @@ public: DisplayPol }; - GLScopeNG(QWidget* parent = 0); - virtual ~GLScopeNG(); + GLScope(QWidget* parent = 0); + virtual ~GLScope(); void connectTimer(const QTimer& timer);