From 35138b0e9392c88cb15e9135c5255410cefdcaea Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 11 Mar 2018 19:43:40 +0100 Subject: [PATCH] Unify TV screen (5) --- plugins/channelrx/demodatv/atvdemodgui.cpp | 1 + plugins/channelrx/demoddatv/datvdemodgui.cpp | 1 + sdrgui/gui/glshadertvarray.h | 1 + sdrgui/gui/tvscreen.cpp | 5 +++++ sdrgui/gui/tvscreen.h | 1 + 5 files changed, 9 insertions(+) diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index c96727ec7..f4a31e7d2 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -278,6 +278,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base m_inputSampleRate(48000) { ui->setupUi(this); + ui->screenTV->setColor(false); setAttribute(Qt::WA_DeleteOnClose, true); connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); diff --git a/plugins/channelrx/demoddatv/datvdemodgui.cpp b/plugins/channelrx/demoddatv/datvdemodgui.cpp index 0e124fd1a..21c22892e 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.cpp +++ b/plugins/channelrx/demoddatv/datvdemodgui.cpp @@ -260,6 +260,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba m_blnDoApplySettings(true) { ui->setupUi(this); + ui->screenTV->setColor(true); setAttribute(Qt::WA_DeleteOnClose, true); connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); diff --git a/sdrgui/gui/glshadertvarray.h b/sdrgui/gui/glshadertvarray.h index b9804c547..d7b881140 100644 --- a/sdrgui/gui/glshadertvarray.h +++ b/sdrgui/gui/glshadertvarray.h @@ -42,6 +42,7 @@ public: GLShaderTVArray(bool blnColor); ~GLShaderTVArray(); + void setColor(bool blnColor) { m_blnColor = blnColor; } void InitializeGL(int intCols, int intRows); void ResizeContainer(int intCols, int intRows); void Cleanup(); diff --git a/sdrgui/gui/tvscreen.cpp b/sdrgui/gui/tvscreen.cpp index c3c816e43..729d1bacf 100644 --- a/sdrgui/gui/tvscreen.cpp +++ b/sdrgui/gui/tvscreen.cpp @@ -50,6 +50,11 @@ TVScreen::~TVScreen() cleanup(); } +void TVScreen::setColor(bool blnColor) +{ + m_objGLShaderArray.setColor(blnColor); +} + QRgb* TVScreen::getRowBuffer(int intRow) { if (!m_blnGLContextInitialized) diff --git a/sdrgui/gui/tvscreen.h b/sdrgui/gui/tvscreen.h index 93cfdd156..5676f23bc 100644 --- a/sdrgui/gui/tvscreen.h +++ b/sdrgui/gui/tvscreen.h @@ -44,6 +44,7 @@ public: TVScreen(bool blnColor, QWidget* parent = 0); ~TVScreen(); + void setColor(bool blnColor); void resizeTVScreen(int intCols, int intRows); void renderImage(unsigned char * objData); QRgb* getRowBuffer(int intRow);