mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 03:02:29 -04:00
Renamed GLScopeNG to GLScope
This commit is contained in:
parent
7769f4b215
commit
0fcc694ca1
@ -684,7 +684,7 @@
|
|||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="GLScopeNG" name="glScope" native="true">
|
<widget class="GLScope" name="glScope" native="true">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>200</width>
|
<width>200</width>
|
||||||
@ -742,7 +742,7 @@
|
|||||||
<header>gui/buttonswitch.h</header>
|
<header>gui/buttonswitch.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>GLScopeNG</class>
|
<class>GLScope</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>gui/glscopeng.h</header>
|
<header>gui/glscopeng.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
|
@ -1088,7 +1088,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="GLScopeNG" name="glScope" native="true">
|
<widget class="GLScope" name="glScope" native="true">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
@ -1123,7 +1123,7 @@
|
|||||||
<header>gui/buttonswitch.h</header>
|
<header>gui/buttonswitch.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>GLScopeNG</class>
|
<class>GLScope</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>gui/glscopeng.h</header>
|
<header>gui/glscopeng.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
|
@ -39,7 +39,7 @@ MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGMemoryTrace, Message)
|
|||||||
const uint ScopeVisNG::m_traceChunkSize = 4800;
|
const uint ScopeVisNG::m_traceChunkSize = 4800;
|
||||||
|
|
||||||
|
|
||||||
ScopeVisNG::ScopeVisNG(GLScopeNG* glScope) :
|
ScopeVisNG::ScopeVisNG(GLScope* glScope) :
|
||||||
m_glScope(glScope),
|
m_glScope(glScope),
|
||||||
m_preTriggerDelay(0),
|
m_preTriggerDelay(0),
|
||||||
m_currentTriggerIndex(0),
|
m_currentTriggerIndex(0),
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#undef M_PI
|
#undef M_PI
|
||||||
#define M_PI 3.14159265358979323846
|
#define M_PI 3.14159265358979323846
|
||||||
|
|
||||||
class GLScopeNG;
|
class GLScope;
|
||||||
|
|
||||||
class SDRGUI_API ScopeVisNG : public BasebandSampleSink {
|
class SDRGUI_API ScopeVisNG : public BasebandSampleSink {
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ public:
|
|||||||
static const uint32_t m_maxNbTraces = 10;
|
static const uint32_t m_maxNbTraces = 10;
|
||||||
static const uint32_t m_nbTraceMemories = 50;
|
static const uint32_t m_nbTraceMemories = 50;
|
||||||
|
|
||||||
ScopeVisNG(GLScopeNG* glScope = 0);
|
ScopeVisNG(GLScope* glScope = 0);
|
||||||
virtual ~ScopeVisNG();
|
virtual ~ScopeVisNG();
|
||||||
|
|
||||||
void setSampleRate(int sampleRate);
|
void setSampleRate(int sampleRate);
|
||||||
@ -941,7 +941,7 @@ private:
|
|||||||
bool m_reset;
|
bool m_reset;
|
||||||
};
|
};
|
||||||
|
|
||||||
GLScopeNG* m_glScope;
|
GLScope* m_glScope;
|
||||||
uint32_t m_preTriggerDelay; //!< Pre-trigger delay in number of samples
|
uint32_t m_preTriggerDelay; //!< Pre-trigger delay in number of samples
|
||||||
std::vector<TriggerCondition*> m_triggerConditions; //!< Chain of triggers
|
std::vector<TriggerCondition*> m_triggerConditions; //!< Chain of triggers
|
||||||
uint32_t m_currentTriggerIndex; //!< Index of current index in the chain
|
uint32_t m_currentTriggerIndex; //!< Index of current index in the chain
|
||||||
|
@ -62,7 +62,7 @@ GLScopeGUI::~GLScopeGUI()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScopeNG* glScope)
|
void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScope* glScope)
|
||||||
{
|
{
|
||||||
qDebug("GLScopeGUI::setBuddies");
|
qDebug("GLScopeGUI::setBuddies");
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GL
|
|||||||
ui->horizontalXY->setEnabled(false);
|
ui->horizontalXY->setEnabled(false);
|
||||||
ui->verticalXY->setEnabled(false);
|
ui->verticalXY->setEnabled(false);
|
||||||
ui->polar->setEnabled(false);
|
ui->polar->setEnabled(false);
|
||||||
m_glScope->setDisplayMode(GLScopeNG::DisplayX);
|
m_glScope->setDisplayMode(GLScope::DisplayX);
|
||||||
|
|
||||||
// initialize trigger combo
|
// initialize trigger combo
|
||||||
ui->trigPos->setChecked(true);
|
ui->trigPos->setChecked(true);
|
||||||
@ -231,8 +231,8 @@ bool GLScopeGUI::deserialize(const QByteArray& data)
|
|||||||
ui->polar->setEnabled(false);
|
ui->polar->setEnabled(false);
|
||||||
|
|
||||||
ui->traceMode->setCurrentIndex(0);
|
ui->traceMode->setCurrentIndex(0);
|
||||||
d.readS32(1, &intValue, (int) GLScopeNG::DisplayX);
|
d.readS32(1, &intValue, (int) GLScope::DisplayX);
|
||||||
m_glScope->setDisplayMode((GLScopeNG::DisplayMode) intValue);
|
m_glScope->setDisplayMode((GLScope::DisplayMode) intValue);
|
||||||
|
|
||||||
ui->onlyX->setChecked(false);
|
ui->onlyX->setChecked(false);
|
||||||
ui->onlyY->setChecked(false);
|
ui->onlyY->setChecked(false);
|
||||||
@ -242,19 +242,19 @@ bool GLScopeGUI::deserialize(const QByteArray& data)
|
|||||||
|
|
||||||
switch (m_glScope->getDisplayMode())
|
switch (m_glScope->getDisplayMode())
|
||||||
{
|
{
|
||||||
case GLScopeNG::DisplayY:
|
case GLScope::DisplayY:
|
||||||
ui->onlyY->setChecked(true);
|
ui->onlyY->setChecked(true);
|
||||||
break;
|
break;
|
||||||
case GLScopeNG::DisplayXYH:
|
case GLScope::DisplayXYH:
|
||||||
ui->horizontalXY->setChecked(true);
|
ui->horizontalXY->setChecked(true);
|
||||||
break;
|
break;
|
||||||
case GLScopeNG::DisplayXYV:
|
case GLScope::DisplayXYV:
|
||||||
ui->verticalXY->setChecked(true);
|
ui->verticalXY->setChecked(true);
|
||||||
break;
|
break;
|
||||||
case GLScopeNG::DisplayPol:
|
case GLScope::DisplayPol:
|
||||||
ui->polar->setChecked(true);
|
ui->polar->setChecked(true);
|
||||||
break;
|
break;
|
||||||
case GLScopeNG::DisplayX:
|
case GLScope::DisplayX:
|
||||||
default:
|
default:
|
||||||
ui->onlyX->setChecked(true);
|
ui->onlyX->setChecked(true);
|
||||||
break;
|
break;
|
||||||
@ -430,7 +430,7 @@ void GLScopeGUI::on_onlyX_toggled(bool checked)
|
|||||||
ui->horizontalXY->setChecked(false);
|
ui->horizontalXY->setChecked(false);
|
||||||
ui->verticalXY->setChecked(false);
|
ui->verticalXY->setChecked(false);
|
||||||
ui->polar->setChecked(false);
|
ui->polar->setChecked(false);
|
||||||
m_glScope->setDisplayMode(GLScopeNG::DisplayX);
|
m_glScope->setDisplayMode(GLScope::DisplayX);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -448,7 +448,7 @@ void GLScopeGUI::on_onlyY_toggled(bool checked)
|
|||||||
ui->horizontalXY->setChecked(false);
|
ui->horizontalXY->setChecked(false);
|
||||||
ui->verticalXY->setChecked(false);
|
ui->verticalXY->setChecked(false);
|
||||||
ui->polar->setChecked(false);
|
ui->polar->setChecked(false);
|
||||||
m_glScope->setDisplayMode(GLScopeNG::DisplayY);
|
m_glScope->setDisplayMode(GLScope::DisplayY);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -466,7 +466,7 @@ void GLScopeGUI::on_horizontalXY_toggled(bool checked)
|
|||||||
ui->onlyY->setChecked(false);
|
ui->onlyY->setChecked(false);
|
||||||
ui->verticalXY->setChecked(false);
|
ui->verticalXY->setChecked(false);
|
||||||
ui->polar->setChecked(false);
|
ui->polar->setChecked(false);
|
||||||
m_glScope->setDisplayMode(GLScopeNG::DisplayXYH);
|
m_glScope->setDisplayMode(GLScope::DisplayXYH);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -484,7 +484,7 @@ void GLScopeGUI::on_verticalXY_toggled(bool checked)
|
|||||||
ui->onlyY->setChecked(false);
|
ui->onlyY->setChecked(false);
|
||||||
ui->horizontalXY->setChecked(false);
|
ui->horizontalXY->setChecked(false);
|
||||||
ui->polar->setChecked(false);
|
ui->polar->setChecked(false);
|
||||||
m_glScope->setDisplayMode(GLScopeNG::DisplayXYV);
|
m_glScope->setDisplayMode(GLScope::DisplayXYV);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -502,7 +502,7 @@ void GLScopeGUI::on_polar_toggled(bool checked)
|
|||||||
ui->onlyY->setChecked(false);
|
ui->onlyY->setChecked(false);
|
||||||
ui->horizontalXY->setChecked(false);
|
ui->horizontalXY->setChecked(false);
|
||||||
ui->verticalXY->setChecked(false);
|
ui->verticalXY->setChecked(false);
|
||||||
m_glScope->setDisplayMode(GLScopeNG::DisplayPol);
|
m_glScope->setDisplayMode(GLScope::DisplayPol);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -613,7 +613,7 @@ void GLScopeGUI::on_traceDel_clicked(bool checked __attribute__((unused)))
|
|||||||
ui->horizontalXY->setEnabled(false);
|
ui->horizontalXY->setEnabled(false);
|
||||||
ui->verticalXY->setEnabled(false);
|
ui->verticalXY->setEnabled(false);
|
||||||
ui->polar->setEnabled(false);
|
ui->polar->setEnabled(false);
|
||||||
m_glScope->setDisplayMode(GLScopeNG::DisplayX);
|
m_glScope->setDisplayMode(GLScope::DisplayX);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_scopeVis->removeTrace(ui->trace->value());
|
m_scopeVis->removeTrace(ui->trace->value());
|
||||||
|
@ -32,7 +32,7 @@ namespace Ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MessageQueue;
|
class MessageQueue;
|
||||||
class GLScopeNG;
|
class GLScope;
|
||||||
|
|
||||||
class SDRGUI_API GLScopeGUI : public QWidget, public Serializable {
|
class SDRGUI_API GLScopeGUI : public QWidget, public Serializable {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -49,7 +49,7 @@ public:
|
|||||||
explicit GLScopeGUI(QWidget* parent = 0);
|
explicit GLScopeGUI(QWidget* parent = 0);
|
||||||
~GLScopeGUI();
|
~GLScopeGUI();
|
||||||
|
|
||||||
void setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScopeNG* glScope);
|
void setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScope* glScope);
|
||||||
|
|
||||||
void setSampleRate(int sampleRate);
|
void setSampleRate(int sampleRate);
|
||||||
void resetToDefaults();
|
void resetToDefaults();
|
||||||
@ -144,7 +144,7 @@ private:
|
|||||||
|
|
||||||
MessageQueue* m_messageQueue;
|
MessageQueue* m_messageQueue;
|
||||||
ScopeVisNG* m_scopeVis;
|
ScopeVisNG* m_scopeVis;
|
||||||
GLScopeNG* m_glScope;
|
GLScope* m_glScope;
|
||||||
|
|
||||||
int m_sampleRate;
|
int m_sampleRate;
|
||||||
int m_timeBase;
|
int m_timeBase;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "glscopeng.h"
|
#include "glscopeng.h"
|
||||||
|
|
||||||
GLScopeNG::GLScopeNG(QWidget* parent) :
|
GLScope::GLScope(QWidget* parent) :
|
||||||
QGLWidget(parent),
|
QGLWidget(parent),
|
||||||
m_tracesData(0),
|
m_tracesData(0),
|
||||||
m_traces(0),
|
m_traces(0),
|
||||||
@ -65,12 +65,12 @@ GLScopeNG::GLScopeNG(QWidget* parent) :
|
|||||||
//m_traceCounter = 0;
|
//m_traceCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLScopeNG::~GLScopeNG()
|
GLScope::~GLScope()
|
||||||
{
|
{
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setDisplayGridIntensity(int intensity)
|
void GLScope::setDisplayGridIntensity(int intensity)
|
||||||
{
|
{
|
||||||
m_displayGridIntensity = intensity;
|
m_displayGridIntensity = intensity;
|
||||||
if (m_displayGridIntensity > 100) {
|
if (m_displayGridIntensity > 100) {
|
||||||
@ -81,7 +81,7 @@ void GLScopeNG::setDisplayGridIntensity(int intensity)
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setDisplayTraceIntensity(int intensity)
|
void GLScope::setDisplayTraceIntensity(int intensity)
|
||||||
{
|
{
|
||||||
m_displayTraceIntensity = intensity;
|
m_displayTraceIntensity = intensity;
|
||||||
if (m_displayTraceIntensity > 100) {
|
if (m_displayTraceIntensity > 100) {
|
||||||
@ -92,13 +92,13 @@ void GLScopeNG::setDisplayTraceIntensity(int intensity)
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setTraces(std::vector<ScopeVisNG::TraceData>* tracesData, std::vector<float *>* traces)
|
void GLScope::setTraces(std::vector<ScopeVisNG::TraceData>* tracesData, std::vector<float *>* traces)
|
||||||
{
|
{
|
||||||
m_tracesData = tracesData;
|
m_tracesData = tracesData;
|
||||||
m_traces = traces;
|
m_traces = traces;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::newTraces(std::vector<float *>* traces)
|
void GLScope::newTraces(std::vector<float *>* traces)
|
||||||
{
|
{
|
||||||
if (traces->size() > 0)
|
if (traces->size() > 0)
|
||||||
{
|
{
|
||||||
@ -112,22 +112,22 @@ void GLScopeNG::newTraces(std::vector<float *>* traces)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::initializeGL()
|
void GLScope::initializeGL()
|
||||||
{
|
{
|
||||||
QOpenGLContext *glCurrentContext = QOpenGLContext::currentContext();
|
QOpenGLContext *glCurrentContext = QOpenGLContext::currentContext();
|
||||||
|
|
||||||
if (glCurrentContext) {
|
if (glCurrentContext) {
|
||||||
if (QOpenGLContext::currentContext()->isValid()) {
|
if (QOpenGLContext::currentContext()->isValid()) {
|
||||||
qDebug() << "GLScopeNG::initializeGL: context:"
|
qDebug() << "GLScope::initializeGL: context:"
|
||||||
<< " major: " << (QOpenGLContext::currentContext()->format()).majorVersion()
|
<< " major: " << (QOpenGLContext::currentContext()->format()).majorVersion()
|
||||||
<< " minor: " << (QOpenGLContext::currentContext()->format()).minorVersion()
|
<< " minor: " << (QOpenGLContext::currentContext()->format()).minorVersion()
|
||||||
<< " ES: " << (QOpenGLContext::currentContext()->isOpenGLES() ? "yes" : "no");
|
<< " ES: " << (QOpenGLContext::currentContext()->isOpenGLES() ? "yes" : "no");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "GLScopeNG::initializeGL: current context is invalid";
|
qDebug() << "GLScope::initializeGL: current context is invalid";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qCritical() << "GLScopeNG::initializeGL: no current context";
|
qCritical() << "GLScope::initializeGL: no current context";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,25 +135,25 @@ void GLScopeNG::initializeGL()
|
|||||||
|
|
||||||
if (surface == 0)
|
if (surface == 0)
|
||||||
{
|
{
|
||||||
qCritical() << "GLScopeNG::initializeGL: no surface attached";
|
qCritical() << "GLScope::initializeGL: no surface attached";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (surface->surfaceType() != QSurface::OpenGLSurface)
|
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";
|
<< " cannot use an OpenGL context";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "GLScopeNG::initializeGL: OpenGL surface:"
|
qDebug() << "GLScope::initializeGL: OpenGL surface:"
|
||||||
<< " class: " << (surface->surfaceClass() == QSurface::Window ? "Window" : "Offscreen");
|
<< " 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();
|
QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions();
|
||||||
glFunctions->initializeOpenGLFunctions();
|
glFunctions->initializeOpenGLFunctions();
|
||||||
@ -167,14 +167,14 @@ void GLScopeNG::initializeGL()
|
|||||||
m_glShaderPowerOverlay.initializeGL();
|
m_glShaderPowerOverlay.initializeGL();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::resizeGL(int width, int height)
|
void GLScope::resizeGL(int width, int height)
|
||||||
{
|
{
|
||||||
QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions();
|
QOpenGLFunctions *glFunctions = QOpenGLContext::currentContext()->functions();
|
||||||
glFunctions->glViewport(0, 0, width, height);
|
glFunctions->glViewport(0, 0, width, height);
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::paintGL()
|
void GLScope::paintGL()
|
||||||
{
|
{
|
||||||
if(!m_mutex.tryLock(2))
|
if(!m_mutex.tryLock(2))
|
||||||
return;
|
return;
|
||||||
@ -182,7 +182,7 @@ void GLScopeNG::paintGL()
|
|||||||
if(m_configChanged)
|
if(m_configChanged)
|
||||||
applyConfig();
|
applyConfig();
|
||||||
|
|
||||||
// qDebug("GLScopeNG::paintGL: m_traceCounter: %d", m_traceCounter);
|
// qDebug("GLScope::paintGL: m_traceCounter: %d", m_traceCounter);
|
||||||
// m_traceCounter = 0;
|
// m_traceCounter = 0;
|
||||||
|
|
||||||
m_dataChanged = false;
|
m_dataChanged = false;
|
||||||
@ -923,7 +923,7 @@ void GLScopeNG::paintGL()
|
|||||||
m_mutex.unlock();
|
m_mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setSampleRate(int sampleRate)
|
void GLScope::setSampleRate(int sampleRate)
|
||||||
{
|
{
|
||||||
m_sampleRate = sampleRate;
|
m_sampleRate = sampleRate;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
@ -931,55 +931,55 @@ void GLScopeNG::setSampleRate(int sampleRate)
|
|||||||
emit sampleRateChanged(m_sampleRate);
|
emit sampleRateChanged(m_sampleRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setTimeBase(int timeBase)
|
void GLScope::setTimeBase(int timeBase)
|
||||||
{
|
{
|
||||||
m_timeBase = timeBase;
|
m_timeBase = timeBase;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setTriggerPre(uint32_t triggerPre)
|
void GLScope::setTriggerPre(uint32_t triggerPre)
|
||||||
{
|
{
|
||||||
m_triggerPre = triggerPre;
|
m_triggerPre = triggerPre;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setTimeOfsProMill(int timeOfsProMill)
|
void GLScope::setTimeOfsProMill(int timeOfsProMill)
|
||||||
{
|
{
|
||||||
m_timeOfsProMill = timeOfsProMill;
|
m_timeOfsProMill = timeOfsProMill;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setFocusedTraceIndex(uint32_t traceIndex)
|
void GLScope::setFocusedTraceIndex(uint32_t traceIndex)
|
||||||
{
|
{
|
||||||
m_focusedTraceIndex = traceIndex;
|
m_focusedTraceIndex = traceIndex;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setDisplayMode(DisplayMode displayMode)
|
void GLScope::setDisplayMode(DisplayMode displayMode)
|
||||||
{
|
{
|
||||||
m_displayMode = displayMode;
|
m_displayMode = displayMode;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setTraceSize(int traceSize)
|
void GLScope::setTraceSize(int traceSize)
|
||||||
{
|
{
|
||||||
m_traceSize = traceSize;
|
m_traceSize = traceSize;
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::updateDisplay()
|
void GLScope::updateDisplay()
|
||||||
{
|
{
|
||||||
m_configChanged = true;
|
m_configChanged = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::applyConfig()
|
void GLScope::applyConfig()
|
||||||
{
|
{
|
||||||
m_configChanged = false;
|
m_configChanged = false;
|
||||||
|
|
||||||
@ -1048,7 +1048,7 @@ void GLScopeNG::applyConfig()
|
|||||||
m_q3Polar.allocate(2*(end - start));
|
m_q3Polar.allocate(2*(end - start));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setUniqueDisplays()
|
void GLScope::setUniqueDisplays()
|
||||||
{
|
{
|
||||||
QFontMetrics fm(font());
|
QFontMetrics fm(font());
|
||||||
int M = fm.width("-");
|
int M = fm.width("-");
|
||||||
@ -1250,7 +1250,7 @@ void GLScopeNG::setUniqueDisplays()
|
|||||||
} // Y vertical scale
|
} // Y vertical scale
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setVerticalDisplays()
|
void GLScope::setVerticalDisplays()
|
||||||
{
|
{
|
||||||
QFontMetrics fm(font());
|
QFontMetrics fm(font());
|
||||||
int M = fm.width("-");
|
int M = fm.width("-");
|
||||||
@ -1451,7 +1451,7 @@ void GLScopeNG::setVerticalDisplays()
|
|||||||
} // Y vertical scale (Y2)
|
} // Y vertical scale (Y2)
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setHorizontalDisplays()
|
void GLScope::setHorizontalDisplays()
|
||||||
{
|
{
|
||||||
QFontMetrics fm(font());
|
QFontMetrics fm(font());
|
||||||
int M = fm.width("-");
|
int M = fm.width("-");
|
||||||
@ -1651,7 +1651,7 @@ void GLScopeNG::setHorizontalDisplays()
|
|||||||
} // Y vertical scale (Y2)
|
} // Y vertical scale (Y2)
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::setPolarDisplays()
|
void GLScope::setPolarDisplays()
|
||||||
{
|
{
|
||||||
QFontMetrics fm(font());
|
QFontMetrics fm(font());
|
||||||
int M = fm.width("-");
|
int M = fm.width("-");
|
||||||
@ -1863,7 +1863,7 @@ void GLScopeNG::setPolarDisplays()
|
|||||||
} // Polar XY vertical scale (Y2)
|
} // 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];
|
ScopeVisNG::TraceData& traceData = (*m_tracesData)[highlightedTraceIndex];
|
||||||
double amp_range = 2.0 / traceData.m_amp;
|
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 QString& text,
|
||||||
const QColor& color,
|
const QColor& color,
|
||||||
QPixmap& channelOverlayPixmap,
|
QPixmap& channelOverlayPixmap,
|
||||||
@ -1964,22 +1964,22 @@ void GLScopeNG::drawChannelOverlay(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::tick()
|
void GLScope::tick()
|
||||||
{
|
{
|
||||||
if(m_dataChanged) {
|
if(m_dataChanged) {
|
||||||
update();
|
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()));
|
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();
|
m_timer.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNG::cleanup()
|
void GLScope::cleanup()
|
||||||
{
|
{
|
||||||
//makeCurrent();
|
//makeCurrent();
|
||||||
m_glShaderSimple.cleanup();
|
m_glShaderSimple.cleanup();
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
class QPainter;
|
class QPainter;
|
||||||
|
|
||||||
class SDRGUI_API GLScopeNG: public QGLWidget {
|
class SDRGUI_API GLScope: public QGLWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -47,8 +47,8 @@ public:
|
|||||||
DisplayPol
|
DisplayPol
|
||||||
};
|
};
|
||||||
|
|
||||||
GLScopeNG(QWidget* parent = 0);
|
GLScope(QWidget* parent = 0);
|
||||||
virtual ~GLScopeNG();
|
virtual ~GLScope();
|
||||||
|
|
||||||
void connectTimer(const QTimer& timer);
|
void connectTimer(const QTimer& timer);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user