forked from openlp/openlp
Fix up review comments
This commit is contained in:
parent
2f36c33f62
commit
bf2ada0b67
@ -219,6 +219,11 @@ class EventReceiver(QtCore.QObject):
|
||||
``cursor_normal``
|
||||
Resets the cursor to default
|
||||
|
||||
|
||||
``maindisplay_css_updated``
|
||||
CSS has been updated which needs to be changed on the main display.
|
||||
|
||||
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
|
@ -44,6 +44,9 @@ class PluginManager(object):
|
||||
|
||||
@staticmethod
|
||||
def get_instance():
|
||||
"""
|
||||
Obtain a single instance of class.
|
||||
"""
|
||||
return PluginManager.instance
|
||||
|
||||
def __init__(self, plugin_dir):
|
||||
|
@ -82,7 +82,7 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||
QtCore.SIGNAL(u'openlp_phonon_creation'),
|
||||
self.createMediaObject)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'css_update'), self.cssChanged)
|
||||
QtCore.SIGNAL(u'maindisplay_css_updated'), self.cssChanged)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'config_updated'), self.configChanged)
|
||||
|
||||
|
@ -179,18 +179,33 @@ class AlertsPlugin(Plugin):
|
||||
}
|
||||
|
||||
def getDisplayJavaScript(self):
|
||||
"""
|
||||
Add Javascript to the main display.
|
||||
"""
|
||||
return JAVASCRIPT
|
||||
|
||||
def getDisplayCss(self):
|
||||
"""
|
||||
Add CSS to the main display.
|
||||
"""
|
||||
align = VerticalType.Names[self.settings_tab.location]
|
||||
return CSS % (align, self.settings_tab.font_face,
|
||||
self.settings_tab.font_size, self.settings_tab.font_color,
|
||||
self.settings_tab.bg_color)
|
||||
|
||||
def getDisplayHtml(self):
|
||||
"""
|
||||
Add HTML to the main display.
|
||||
"""
|
||||
return HTML
|
||||
|
||||
def refreshCss(self, frame):
|
||||
"""
|
||||
Trigger an update of the CSS in the maindisplay.
|
||||
|
||||
`frame`
|
||||
The Web frame holding the page
|
||||
"""
|
||||
align = VerticalType.Names[self.settings_tab.location]
|
||||
frame.evaluateJavaScript(u'update_css("%s", "%s", "%s", "%s", "%s")' %
|
||||
(align, self.settings_tab.font_face, self.settings_tab.font_size,
|
||||
|
@ -191,7 +191,7 @@ class AlertsTab(SettingsTab):
|
||||
settings.setValue(u'location', QtCore.QVariant(self.location))
|
||||
settings.endGroup()
|
||||
if self.changed:
|
||||
Receiver.send_message(u'css_update')
|
||||
Receiver.send_message(u'maindisplay_css_updated')
|
||||
self.changed = False
|
||||
|
||||
def updateDisplay(self):
|
||||
|
Loading…
Reference in New Issue
Block a user