1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00

DATV demod: not functionning full screen

This commit is contained in:
f4exb 2019-03-23 23:37:26 +01:00
parent 2d9715fbb6
commit 760c3fdd0f
4 changed files with 36 additions and 47 deletions

View File

@ -164,6 +164,8 @@ 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->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));
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999); ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>530</width> <width>530</width>
<height>442</height> <height>443</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -204,7 +204,7 @@
<enum>QTabWidget::West</enum> <enum>QTabWidget::West</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="datvTab"> <widget class="QWidget" name="datvTab">
<attribute name="title"> <attribute name="title">
@ -775,46 +775,6 @@
<string>Full Screen</string> <string>Full Screen</string>
</property> </property>
</widget> </widget>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>488</width>
<height>272</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="DATVideoRender" name="screenTV_2" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>270</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>355</width>
<height>270</height>
</size>
</property>
<property name="toolTip">
<string>Video</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QCheckBox" name="chkTS"> <widget class="QCheckBox" name="chkTS">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -998,6 +958,16 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="DATVideoRender" name="screenTV_2" native="true">
<property name="geometry">
<rect>
<x>2</x>
<y>22</y>
<width>492</width>
<height>270</height>
</rect>
</property>
</widget>
</widget> </widget>
</widget> </widget>
</widget> </widget>

View File

@ -18,6 +18,8 @@
#include <math.h> #include <math.h>
#include <algorithm> #include <algorithm>
#include <QGroupBox>
extern "C" extern "C"
{ {
#include <libswresample/swresample.h> #include <libswresample/swresample.h>
@ -26,7 +28,7 @@ extern "C"
#include "audio/audiofifo.h" #include "audio/audiofifo.h"
#include "datvideorender.h" #include "datvideorender.h"
DATVideoRender::DATVideoRender(QWidget *parent) : TVScreen(true, parent) DATVideoRender::DATVideoRender(QWidget *parent) : TVScreen(true, parent), m_parentWidget(parent)
{ {
installEventFilter(this); installEventFilter(this);
m_isFullScreen = false; m_isFullScreen = false;
@ -94,14 +96,25 @@ void DATVideoRender::SetFullScreen(bool fullScreen)
if (fullScreen == true) if (fullScreen == true)
{ {
setWindowFlags(Qt::Window); m_originalWindowFlags = this->windowFlags();
showFullScreen(); m_originalSize = this->size();
this->setParent(0);
this->setWindowFlags( Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint);
this->showMaximized();
// setWindowFlags(Qt::Window);
// setWindowState(Qt::WindowFullScreen);
// show();
m_isFullScreen = true; m_isFullScreen = true;
} }
else else
{ {
setWindowFlags(Qt::Widget); this->setParent(m_parentWidget);
showNormal(); this->resize(m_originalSize);
this->overrideWindowFlags(m_originalWindowFlags);
this->show();
// setWindowFlags(Qt::Widget);
// setWindowState(Qt::WindowNoState);
// show();
m_isFullScreen = false; m_isFullScreen = false;
} }
} }

View File

@ -109,6 +109,10 @@ class DATVideoRender : public TVScreen
struct DataTSMetaData2 MetaData; struct DataTSMetaData2 MetaData;
private: private:
QWidget *m_parentWidget;
Qt::WindowFlags m_originalWindowFlags;
QSize m_originalSize;
bool m_running; bool m_running;
bool m_isFullScreen; bool m_isFullScreen;