1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

DATV demod: deactivate full screen. Fixed bug

This commit is contained in:
f4exb 2019-03-24 01:37:34 +01:00
parent 200d6beaab
commit 1e1a64cd13
3 changed files with 23 additions and 17 deletions

View File

@ -164,7 +164,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
connect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick())); connect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
m_objTimer.start(); m_objTimer.start();
//ui->fullScreen->setVisible(false); ui->fullScreen->setVisible(false);
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));

View File

@ -204,7 +204,7 @@
<enum>QTabWidget::West</enum> <enum>QTabWidget::West</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="datvTab"> <widget class="QWidget" name="datvTab">
<attribute name="title"> <attribute name="title">

View File

@ -18,7 +18,7 @@
#include <math.h> #include <math.h>
#include <algorithm> #include <algorithm>
#include <QGroupBox> #include <QLayout>
extern "C" extern "C"
{ {
@ -38,6 +38,7 @@ DATVideoRender::DATVideoRender(QWidget *parent) : TVScreen(true, parent), m_pare
m_isOpen = false; m_isOpen = false;
m_formatCtx = nullptr; m_formatCtx = nullptr;
m_videoDecoderCtx = nullptr; m_videoDecoderCtx = nullptr;
m_audioDecoderCtx = nullptr;
m_swsCtx = nullptr; m_swsCtx = nullptr;
m_audioFifo = nullptr; m_audioFifo = nullptr;
m_audioSWR = nullptr; m_audioSWR = nullptr;
@ -96,25 +97,30 @@ void DATVideoRender::SetFullScreen(bool fullScreen)
if (fullScreen == true) if (fullScreen == true)
{ {
m_originalWindowFlags = this->windowFlags(); qDebug("DATVideoRender::SetFullScreen: go to fullscreen");
m_originalSize = this->size(); // m_originalWindowFlags = this->windowFlags();
this->setParent(0); // m_originalSize = this->size();
this->setWindowFlags( Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint); // m_parentWidget->layout()->removeWidget(this);
this->showMaximized(); // //this->setParent(0);
// setWindowFlags(Qt::Window); // this->setWindowFlags( Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint);
// setWindowState(Qt::WindowFullScreen); // m_parentWidget->show();
// show(); setWindowFlags(Qt::Window);
setWindowState(Qt::WindowFullScreen);
show();
m_isFullScreen = true; m_isFullScreen = true;
} }
else else
{ {
this->setParent(m_parentWidget); qDebug("DATVideoRender::SetFullScreen: come back from fullscreen");
this->resize(m_originalSize); // //this->setParent(m_parentWidget);
this->overrideWindowFlags(m_originalWindowFlags); // this->resize(m_originalSize);
this->show(); // this->overrideWindowFlags(m_originalWindowFlags);
// setWindowFlags(Qt::Widget);
// setWindowState(Qt::WindowNoState); // setWindowState(Qt::WindowNoState);
// show(); // m_parentWidget->layout()->addWidget(this);
// m_parentWidget->show();
setWindowFlags(Qt::Widget);
setWindowState(Qt::WindowNoState);
show();
m_isFullScreen = false; m_isFullScreen = false;
} }
} }