Alerts: Import and long lines

This commit is contained in:
Jon Tibble 2010-07-01 13:56:02 +01:00
parent c61121bb51
commit 254ac02561

View File

@ -25,7 +25,7 @@
import logging import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore
from openlp.core.lib import Receiver, translate from openlp.core.lib import Receiver, translate
@ -95,7 +95,8 @@ class AlertsManager(QtCore.QObject):
alertTab = self.parent.alertsTab alertTab = self.parent.alertsTab
text = HTMLCODE % (alertTab.font_color, alertTab.bg_color, text = HTMLCODE % (alertTab.font_color, alertTab.bg_color,
alertTab.font_face, alertTab.font_size, text) alertTab.font_face, alertTab.font_size, text)
self.parent.preview_controller.parent.displayManager.addAlert(text, alertTab.location) self.parent.preview_controller.parent.displayManager.addAlert(text,
alertTab.location)
# check to see if we have a timer running # check to see if we have a timer running
if self.timer_id == 0: if self.timer_id == 0:
self.timer_id = self.startTimer(int(alertTab.timeout) * 1000) self.timer_id = self.startTimer(int(alertTab.timeout) * 1000)
@ -111,7 +112,8 @@ class AlertsManager(QtCore.QObject):
log.debug(u'timer event') log.debug(u'timer event')
alertTab = self.parent.alertsTab alertTab = self.parent.alertsTab
if event.timerId() == self.timer_id: if event.timerId() == self.timer_id:
self.parent.preview_controller.parent.displayManager.addAlert(u'', alertTab.location) self.parent.preview_controller.parent.displayManager.addAlert(u'',
alertTab.location)
self.killTimer(self.timer_id) self.killTimer(self.timer_id)
self.timer_id = 0 self.timer_id = 0
self.generateAlert() self.generateAlert()