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``
|
``cursor_normal``
|
||||||
Resets the cursor to default
|
Resets the cursor to default
|
||||||
|
|
||||||
|
|
||||||
|
``maindisplay_css_updated``
|
||||||
|
CSS has been updated which needs to be changed on the main display.
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
"""
|
||||||
|
@ -44,6 +44,9 @@ class PluginManager(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_instance():
|
def get_instance():
|
||||||
|
"""
|
||||||
|
Obtain a single instance of class.
|
||||||
|
"""
|
||||||
return PluginManager.instance
|
return PluginManager.instance
|
||||||
|
|
||||||
def __init__(self, plugin_dir):
|
def __init__(self, plugin_dir):
|
||||||
|
@ -82,7 +82,7 @@ class MainDisplay(QtGui.QGraphicsView):
|
|||||||
QtCore.SIGNAL(u'openlp_phonon_creation'),
|
QtCore.SIGNAL(u'openlp_phonon_creation'),
|
||||||
self.createMediaObject)
|
self.createMediaObject)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
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.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'config_updated'), self.configChanged)
|
QtCore.SIGNAL(u'config_updated'), self.configChanged)
|
||||||
|
|
||||||
|
@ -179,18 +179,33 @@ class AlertsPlugin(Plugin):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def getDisplayJavaScript(self):
|
def getDisplayJavaScript(self):
|
||||||
|
"""
|
||||||
|
Add Javascript to the main display.
|
||||||
|
"""
|
||||||
return JAVASCRIPT
|
return JAVASCRIPT
|
||||||
|
|
||||||
def getDisplayCss(self):
|
def getDisplayCss(self):
|
||||||
|
"""
|
||||||
|
Add CSS to the main display.
|
||||||
|
"""
|
||||||
align = VerticalType.Names[self.settings_tab.location]
|
align = VerticalType.Names[self.settings_tab.location]
|
||||||
return CSS % (align, self.settings_tab.font_face,
|
return CSS % (align, self.settings_tab.font_face,
|
||||||
self.settings_tab.font_size, self.settings_tab.font_color,
|
self.settings_tab.font_size, self.settings_tab.font_color,
|
||||||
self.settings_tab.bg_color)
|
self.settings_tab.bg_color)
|
||||||
|
|
||||||
def getDisplayHtml(self):
|
def getDisplayHtml(self):
|
||||||
|
"""
|
||||||
|
Add HTML to the main display.
|
||||||
|
"""
|
||||||
return HTML
|
return HTML
|
||||||
|
|
||||||
def refreshCss(self, frame):
|
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]
|
align = VerticalType.Names[self.settings_tab.location]
|
||||||
frame.evaluateJavaScript(u'update_css("%s", "%s", "%s", "%s", "%s")' %
|
frame.evaluateJavaScript(u'update_css("%s", "%s", "%s", "%s", "%s")' %
|
||||||
(align, self.settings_tab.font_face, self.settings_tab.font_size,
|
(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.setValue(u'location', QtCore.QVariant(self.location))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
if self.changed:
|
if self.changed:
|
||||||
Receiver.send_message(u'css_update')
|
Receiver.send_message(u'maindisplay_css_updated')
|
||||||
self.changed = False
|
self.changed = False
|
||||||
|
|
||||||
def updateDisplay(self):
|
def updateDisplay(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user