mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
ATV Demod: cosmetic reformatting
This commit is contained in:
parent
864df4d232
commit
a5df0a1ee4
@ -28,19 +28,19 @@
|
||||
#include <QDebug>
|
||||
|
||||
ATVScreen::ATVScreen(QWidget* parent) :
|
||||
QGLWidget(parent),
|
||||
m_objMutex(QMutex::NonRecursive)
|
||||
QGLWidget(parent), m_objMutex(QMutex::NonRecursive)
|
||||
{
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
//connect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
//m_objTimer.start(50);
|
||||
|
||||
m_chrLastData=NULL;
|
||||
m_blnDataChanged=false;
|
||||
m_blnGLContextInitialized=false;
|
||||
m_chrLastData = NULL;
|
||||
m_blnConfigChanged = false;
|
||||
m_blnDataChanged = false;
|
||||
m_blnGLContextInitialized = false;
|
||||
|
||||
m_intAskedCols=0;
|
||||
m_intAskedRows=0;
|
||||
m_intAskedCols = 0;
|
||||
m_intAskedRows = 0;
|
||||
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ ATVScreen::~ATVScreen()
|
||||
|
||||
QRgb* ATVScreen::getRowBuffer(int intRow)
|
||||
{
|
||||
if(m_blnGLContextInitialized==false)
|
||||
if (m_blnGLContextInitialized == false)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@ -61,7 +61,7 @@ QRgb* ATVScreen::getRowBuffer(int intRow)
|
||||
|
||||
void ATVScreen::renderImage(unsigned char * objData)
|
||||
{
|
||||
m_chrLastData=objData;
|
||||
m_chrLastData = objData;
|
||||
update();
|
||||
}
|
||||
|
||||
@ -72,8 +72,8 @@ void ATVScreen::resetImage()
|
||||
|
||||
void ATVScreen::resizeATVScreen(int intCols, int intRows)
|
||||
{
|
||||
m_intAskedCols=intCols;
|
||||
m_intAskedRows=intRows;
|
||||
m_intAskedCols = intCols;
|
||||
m_intAskedRows = intRows;
|
||||
}
|
||||
|
||||
void ATVScreen::initializeGL()
|
||||
@ -113,22 +113,26 @@ void ATVScreen::initializeGL()
|
||||
{
|
||||
if (objSurface->surfaceType() != QSurface::OpenGLSurface)
|
||||
{
|
||||
qCritical() << "ATVScreen::initializeGL: surface is not an OpenGLSurface: " << objSurface->surfaceType() << " cannot use an OpenGL context";
|
||||
qCritical() << "ATVScreen::initializeGL: surface is not an OpenGLSurface: "
|
||||
<< objSurface->surfaceType()
|
||||
<< " cannot use an OpenGL context";
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "ATVScreen::initializeGL: OpenGL surface:" << " class: " << (objSurface->surfaceClass() == QSurface::Window ? "Window" : "Offscreen");
|
||||
qDebug() << "ATVScreen::initializeGL: OpenGL surface:"
|
||||
<< " class: " << (objSurface->surfaceClass() == QSurface::Window ? "Window" : "Offscreen");
|
||||
}
|
||||
}
|
||||
|
||||
connect(objGlCurrentContext, &QOpenGLContext::aboutToBeDestroyed, this, &ATVScreen::cleanup); // TODO: when migrating to QOpenGLWidget
|
||||
connect(objGlCurrentContext, &QOpenGLContext::aboutToBeDestroyed, this,
|
||||
&ATVScreen::cleanup); // TODO: when migrating to QOpenGLWidget
|
||||
|
||||
//Par défaut
|
||||
m_intAskedCols = ATV_COLS;
|
||||
m_intAskedRows = ATV_ROWS;
|
||||
|
||||
m_blnGLContextInitialized=true;
|
||||
m_blnGLContextInitialized = true;
|
||||
|
||||
m_objMutex.unlock();
|
||||
}
|
||||
@ -144,13 +148,13 @@ void ATVScreen::paintGL()
|
||||
{
|
||||
m_objMutex.lock();
|
||||
|
||||
if(m_blnGLContextInitialized)
|
||||
if (m_blnGLContextInitialized)
|
||||
{
|
||||
if((m_intAskedCols!=0) && (m_intAskedRows!=0))
|
||||
if ((m_intAskedCols != 0) && (m_intAskedRows != 0))
|
||||
{
|
||||
m_objGLShaderArray.InitializeGL(m_intAskedCols, m_intAskedRows);
|
||||
m_intAskedCols=0;
|
||||
m_intAskedRows=0;
|
||||
m_intAskedCols = 0;
|
||||
m_intAskedRows = 0;
|
||||
}
|
||||
|
||||
m_objGLShaderArray.RenderPixels(m_chrLastData);
|
||||
@ -163,12 +167,10 @@ void ATVScreen::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ATVScreen::tick()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ATVScreen::connectTimer(const QTimer& objTimer)
|
||||
{
|
||||
/*
|
||||
@ -181,25 +183,25 @@ void ATVScreen::connectTimer(const QTimer& objTimer)
|
||||
|
||||
void ATVScreen::cleanup()
|
||||
{
|
||||
if(m_blnGLContextInitialized)
|
||||
if (m_blnGLContextInitialized)
|
||||
{
|
||||
m_objGLShaderArray.Cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ATVScreen::selectRow(int intLine)
|
||||
{
|
||||
if(m_blnGLContextInitialized)
|
||||
if (m_blnGLContextInitialized)
|
||||
{
|
||||
return m_objGLShaderArray.SelectRow(intLine);
|
||||
}
|
||||
}
|
||||
|
||||
bool ATVScreen::setDataColor(int intCol,int intRed, int intGreen, int intBlue)
|
||||
bool ATVScreen::setDataColor(int intCol, int intRed, int intGreen, int intBlue)
|
||||
{
|
||||
if(m_blnGLContextInitialized)
|
||||
if (m_blnGLContextInitialized)
|
||||
{
|
||||
return m_objGLShaderArray.SetDataColor(intCol, qRgb(intRed, intGreen, intBlue));
|
||||
return m_objGLShaderArray.SetDataColor(intCol,
|
||||
qRgb(intRed, intGreen, intBlue));
|
||||
}
|
||||
}
|
||||
|
@ -28,15 +28,12 @@
|
||||
#include <QFont>
|
||||
#include <QMatrix4x4>
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "gui/scaleengine.h"
|
||||
#include "glshaderarray.h"
|
||||
#include "gui/glshadertextured.h"
|
||||
#include "util/export.h"
|
||||
#include "util/bitfieldindex.h"
|
||||
|
||||
|
||||
class ScopeVis;
|
||||
class QPainter;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user