forked from openlp/openlp
Fix up Alert generation (needs to be tested on duel screen)
This commit is contained in:
parent
d676430ffa
commit
fe959f451f
@ -99,4 +99,4 @@ class AlertForm(QtGui.QDialog):
|
||||
self.CancelButton.setText(self.trUtf8('Cancel'))
|
||||
|
||||
def onDisplayClicked(self):
|
||||
self.parent.mainDisplay.displayAlert(self.AlertEntryEditItem.text())
|
||||
self.parent.mainDisplay.displayAlert(unicode(self.AlertEntryEditItem.text()))
|
||||
|
@ -214,6 +214,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.setVisible(True)
|
||||
self.showFullScreen()
|
||||
self.frame = frame
|
||||
print type(self.frame)
|
||||
|
||||
def blankDisplay(self, blanked=True):
|
||||
if blanked:
|
||||
@ -234,8 +235,12 @@ class MainDisplay(DisplayWidget):
|
||||
``text``
|
||||
display text
|
||||
"""
|
||||
log.debug(u'display alert called %s' % text)
|
||||
alertTab = self.parent.settingsForm.AlertsTab
|
||||
alertframe = QtGui.QPixmap.fromImage(self.frame)
|
||||
if isinstance(self.frame, QtGui.QImage):
|
||||
alertframe = QtGui.QPixmap.fromImage(self.frame)
|
||||
else:
|
||||
alertframe = QtGui.QPixmap.fromImage(self.frame[u'main'])
|
||||
painter = QtGui.QPainter(alertframe)
|
||||
top = alertframe.rect().height() * 0.9
|
||||
painter.fillRect(
|
||||
@ -261,7 +266,10 @@ class MainDisplay(DisplayWidget):
|
||||
|
||||
def timerEvent(self, event):
|
||||
if event.timerId() == self.timer_id:
|
||||
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame))
|
||||
if isinstance(self.frame, QtGui.QImage):
|
||||
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame))
|
||||
else:
|
||||
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame[u'main']))
|
||||
self.killTimer(self.timer_id)
|
||||
self.timer_id = 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user