disable ui when stream or recieve is running

This commit is contained in:
mrbesen 2022-10-08 18:03:10 +02:00
parent f2dc9dd7e4
commit 85ca1675f8
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
1 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,9 @@ class ScreenStreamerGUI(QtWidgets.QMainWindow):
def set_recieve_status(self, status: bool):
"""status = True - stream is running"""
self.ui.recieveBtn.setEnabled(True)
self.ui.listenAddr.setEnabled(not status)
self.ui.listenPort.setEnabled(not status)
self.ui.disableAudio.setEnabled(not status)
if status:
self.ui.recieveBtn.setText('Stop Recieve')
else:
@ -122,6 +125,11 @@ class ScreenStreamerGUI(QtWidgets.QMainWindow):
def set_stream_status(self, status: bool):
"""status = True - stream is running"""
self.ui.streamBtn.setEnabled(True)
self.ui.displaySelect.setEnabled(not status)
self.ui.videoCodec.setEnabled(not status)
self.ui.audioSource.setEnabled(not status)
self.ui.sendto.setEnabled(not status)
self.ui.streamPort.setEnabled(not status)
if status:
self.ui.streamBtn.setText('Stop Stream')
else: