DATV demod: refactored audio and video GUI

This commit is contained in:
f4exb 2019-03-21 14:13:26 +01:00
parent 2d86373418
commit 5b300c1033
2 changed files with 77 additions and 27 deletions

View File

@ -186,7 +186,10 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
m_deviceUISet->addChannelMarker(&m_objChannelMarker);
m_deviceUISet->addRollupWidget(this);
ui->videoPlay->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
QPixmap pixmapTarget = QPixmap(":/film.png");
pixmapTarget = pixmapTarget.scaled(16, 16, Qt::KeepAspectRatio, Qt::SmoothTransformation);
ui->videoPlay->setAlignment(Qt::AlignCenter);
ui->videoPlay->setPixmap(pixmapTarget);
CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute);
connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
@ -648,11 +651,11 @@ void DATVDemodGUI::on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData)
ui->chkVS->setChecked(objMetaData->OK_VideoStream);
ui->chkDecoding->setChecked(objMetaData->OK_Decoding);
if (objMetaData->OK_Decoding == true) {
ui->videoPlay->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
} else {
ui->videoPlay->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
}
if (objMetaData->OK_Decoding) {
ui->videoPlay->setStyleSheet("QLabel { background-color : green; }");
} else {
ui->videoPlay->setStyleSheet("QLabel { background:rgb(79,79,79); }");
}
if (objMetaData->Height > 0) {
ui->screenTV_2->setFixedWidth((int)objMetaData->Width*(270.0f/(float)objMetaData->Height));

View File

@ -761,8 +761,8 @@
<rect>
<x>400</x>
<y>350</y>
<width>91</width>
<height>27</height>
<width>90</width>
<height>26</height>
</rect>
</property>
<property name="toolTip">
@ -772,22 +772,6 @@
<string>Full Screen</string>
</property>
</widget>
<widget class="QPushButton" name="videoPlay">
<property name="geometry">
<rect>
<x>400</x>
<y>300</y>
<width>56</width>
<height>27</height>
</rect>
</property>
<property name="toolTip">
<string>Start/Stop video streaming</string>
</property>
<property name="text">
<string> Video</string>
</property>
</widget>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
@ -919,12 +903,15 @@
<widget class="QToolButton" name="audioMute">
<property name="geometry">
<rect>
<x>460</x>
<x>430</x>
<y>300</y>
<width>28</width>
<height>26</height>
<width>24</width>
<height>24</height>
</rect>
</property>
<property name="toolTip">
<string>Audio mute (right click: Audio select)</string>
</property>
<property name="text">
<string>...</string>
</property>
@ -934,6 +921,66 @@
<normalon>:/sound_off.png</normalon>:/sound_on.png</iconset>
</property>
</widget>
<widget class="QLabel" name="videoPlay">
<property name="geometry">
<rect>
<x>400</x>
<y>300</y>
<width>24</width>
<height>24</height>
</rect>
</property>
<property name="toolTip">
<string>Video play indicator</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QSlider" name="audioVolume">
<property name="geometry">
<rect>
<x>400</x>
<y>330</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="toolTip">
<string>Audio volume control</string>
</property>
<property name="minimum">
<number>-32</number>
</property>
<property name="maximum">
<number>32</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QLabel" name="audioVolumeText">
<property name="geometry">
<rect>
<x>460</x>
<y>300</y>
<width>24</width>
<height>24</height>
</rect>
</property>
<property name="toolTip">
<string>Audio volume</string>
</property>
<property name="text">
<string>-32</string>
</property>
</widget>
</widget>
</widget>
</widget>