forked from openlp/openlp
make blank button workable
This commit is contained in:
parent
5170ad1607
commit
bc50765e3a
@ -226,6 +226,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
``frame``
|
``frame``
|
||||||
Image frame to be rendered
|
Image frame to be rendered
|
||||||
"""
|
"""
|
||||||
|
log.debug(u'frameView %d' % (self.displayBlank))
|
||||||
if not self.displayBlank:
|
if not self.displayBlank:
|
||||||
if transition:
|
if transition:
|
||||||
if self.frame is not None:
|
if self.frame is not None:
|
||||||
@ -248,14 +249,22 @@ class MainDisplay(DisplayWidget):
|
|||||||
if not self.isVisible():
|
if not self.isVisible():
|
||||||
self.setVisible(True)
|
self.setVisible(True)
|
||||||
self.showFullScreen()
|
self.showFullScreen()
|
||||||
|
else:
|
||||||
|
self.waitingFrame = frame
|
||||||
|
self.waitingFrameTrans = transition
|
||||||
|
|
||||||
def blankDisplay(self, blanked=True):
|
def blankDisplay(self, blanked=True):
|
||||||
|
log.debug(u'Blank main Display %d' % blanked)
|
||||||
if blanked:
|
if blanked:
|
||||||
self.displayBlank = True
|
self.displayBlank = True
|
||||||
self.display_text.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame))
|
self.display_text.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame))
|
||||||
|
self.waitingFrame = None
|
||||||
|
self.waitingFrameTrans = False
|
||||||
else:
|
else:
|
||||||
self.displayBlank = False
|
self.displayBlank = False
|
||||||
if self.display_frame:
|
if self.waitingFrame:
|
||||||
|
self.frameView(self.waitingFrame, self.waitingFrameTrans)
|
||||||
|
elif self.display_frame:
|
||||||
self.frameView(self.display_frame)
|
self.frameView(self.display_frame)
|
||||||
|
|
||||||
def onMediaQueue(self, message):
|
def onMediaQueue(self, message):
|
||||||
|
@ -524,6 +524,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
Handle the blank screen button
|
Handle the blank screen button
|
||||||
"""
|
"""
|
||||||
|
log.debug(u'onBlankDisplay %d' % force)
|
||||||
if force:
|
if force:
|
||||||
self.blankButton.setChecked(True)
|
self.blankButton.setChecked(True)
|
||||||
self.blankScreen(self.blankButton.isChecked())
|
self.blankScreen(self.blankButton.isChecked())
|
||||||
@ -540,6 +541,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
Receiver.send_message(u'%s_blank'% self.serviceItem.name.lower())
|
Receiver.send_message(u'%s_blank'% self.serviceItem.name.lower())
|
||||||
else:
|
else:
|
||||||
Receiver.send_message(u'%s_unblank'% self.serviceItem.name.lower())
|
Receiver.send_message(u'%s_unblank'% self.serviceItem.name.lower())
|
||||||
|
else:
|
||||||
|
self.parent.mainDisplay.blankDisplay(blanked)
|
||||||
else:
|
else:
|
||||||
self.parent.mainDisplay.blankDisplay(blanked)
|
self.parent.mainDisplay.blankDisplay(blanked)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user