forked from openlp/openlp
moved function code into buildHtml, made setting name more descriptive
This commit is contained in:
parent
3428f68582
commit
0cab45bcf8
@ -128,7 +128,7 @@ class AdvancedTab(SettingsTab):
|
||||
self.hideMouseGroupBox.setTitle(translate('OpenLP.GeneralTab',
|
||||
'Mouse Cursor'))
|
||||
self.hideMouseCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||
'Hide the Mouse Cursor'))
|
||||
'Hide the ouse cursor when over the display window'))
|
||||
# self.sharedDirGroupBox.setTitle(
|
||||
# translate('AdvancedTab', 'Central Data Store'))
|
||||
# self.sharedCheckBox.setText(
|
||||
|
@ -206,7 +206,6 @@ class MainDisplay(DisplayWidget):
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
self.frame.evaluateJavaScript(u'show_text("%s")' % \
|
||||
slide.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'))
|
||||
self.hideMouseCursor()
|
||||
return self.preview()
|
||||
|
||||
def alert(self, text):
|
||||
@ -272,7 +271,6 @@ class MainDisplay(DisplayWidget):
|
||||
else:
|
||||
js = u'show_image("");'
|
||||
self.frame.evaluateJavaScript(js)
|
||||
self.hideMouseCursor()
|
||||
|
||||
def resetImage(self):
|
||||
"""
|
||||
@ -362,7 +360,6 @@ class MainDisplay(DisplayWidget):
|
||||
self.webView.setVisible(False)
|
||||
self.videoWidget.setVisible(True)
|
||||
self.audio.setVolume(vol)
|
||||
self.hideMouseCursor()
|
||||
return self.preview()
|
||||
|
||||
def isLoaded(self):
|
||||
@ -430,6 +427,15 @@ class MainDisplay(DisplayWidget):
|
||||
# if was hidden keep it hidden
|
||||
if self.hideMode and self.isLive:
|
||||
self.hideDisplay(self.hideMode)
|
||||
# Hide the mouse cursor over display if enabled in settings
|
||||
settings = QtCore.QSettings()
|
||||
if settings.value(u'%s/hide mouse' % self.advancedSettingsSection,
|
||||
QtCore.QVariant(False)).toBool():
|
||||
self.setCursor(QtCore.Qt.BlankCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "none"')
|
||||
else:
|
||||
self.setCursor(QtCore.Qt.ArrowCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "auto"')
|
||||
|
||||
def footer(self, text):
|
||||
"""
|
||||
@ -478,19 +484,6 @@ class MainDisplay(DisplayWidget):
|
||||
self.hideMode = None
|
||||
# Trigger actions when display is active again
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
def hideMouseCursor(self):
|
||||
"""
|
||||
Hide the mouse cursor if enabled in settings
|
||||
"""
|
||||
settings = QtCore.QSettings()
|
||||
if settings.value(u'%s/hide mouse' % self.advancedSettingsSection,
|
||||
QtCore.QVariant(False)).toBool():
|
||||
self.setCursor(QtCore.Qt.BlankCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "none"')
|
||||
else:
|
||||
self.setCursor(QtCore.Qt.ArrowCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "auto"')
|
||||
|
||||
class AudioPlayer(QtCore.QObject):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user