forked from openlp/openlp
moved code to core
This commit is contained in:
parent
471de78bfe
commit
42a955582b
@ -94,6 +94,8 @@ class DisplayWidget(QtGui.QGraphicsView):
|
||||
else:
|
||||
event.ignore()
|
||||
|
||||
|
||||
|
||||
class MainDisplay(DisplayWidget):
|
||||
"""
|
||||
This is the display screen.
|
||||
@ -270,6 +272,8 @@ class MainDisplay(DisplayWidget):
|
||||
else:
|
||||
js = u'show_image("");'
|
||||
self.frame.evaluateJavaScript(js)
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
def resetImage(self):
|
||||
"""
|
||||
@ -278,6 +282,8 @@ class MainDisplay(DisplayWidget):
|
||||
"""
|
||||
log.debug(u'resetImage')
|
||||
self.displayImage(self.serviceItem.bg_image_bytes)
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
def resetVideo(self):
|
||||
"""
|
||||
@ -292,6 +298,8 @@ class MainDisplay(DisplayWidget):
|
||||
self.phononActive = False
|
||||
else:
|
||||
self.frame.evaluateJavaScript(u'show_video("close");')
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
def videoPlay(self):
|
||||
"""
|
||||
@ -359,6 +367,8 @@ class MainDisplay(DisplayWidget):
|
||||
self.webView.setVisible(False)
|
||||
self.videoWidget.setVisible(True)
|
||||
self.audio.setVolume(vol)
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
return self.preview()
|
||||
|
||||
def isLoaded(self):
|
||||
@ -475,6 +485,7 @@ class MainDisplay(DisplayWidget):
|
||||
# Trigger actions when display is active again
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
|
||||
class AudioPlayer(QtCore.QObject):
|
||||
"""
|
||||
This Class will play audio only allowing components to work with a
|
||||
|
@ -31,7 +31,7 @@ from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||
ItemCapabilities, SettingsManager, translate, check_item_selected, \
|
||||
check_directory_exists, Receiver
|
||||
check_directory_exists
|
||||
from openlp.core.ui import criticalErrorMessageBox
|
||||
from openlp.core.utils import AppLocation, delete_file, get_images_filter
|
||||
|
||||
@ -192,8 +192,6 @@ class ImageMediaItem(MediaManagerItem):
|
||||
"""
|
||||
self.resetAction.setVisible(False)
|
||||
self.parent.liveController.display.resetImage()
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
def onReplaceClick(self):
|
||||
"""
|
||||
@ -209,8 +207,6 @@ class ImageMediaItem(MediaManagerItem):
|
||||
(path, name) = os.path.split(filename)
|
||||
self.parent.liveController.display.directImage(name, filename)
|
||||
self.resetAction.setVisible(True)
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
else:
|
||||
criticalErrorMessageBox(
|
||||
translate('ImagePlugin.MediaItem', 'Live Background Error'),
|
||||
|
@ -30,7 +30,7 @@ import os
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||
ItemCapabilities, SettingsManager, translate, check_item_selected, Receiver
|
||||
ItemCapabilities, SettingsManager, translate, check_item_selected
|
||||
from openlp.core.ui import criticalErrorMessageBox
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -98,8 +98,6 @@ class MediaMediaItem(MediaManagerItem):
|
||||
"""
|
||||
self.resetAction.setVisible(False)
|
||||
self.parent.liveController.display.resetVideo()
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
def onReplaceClick(self):
|
||||
"""
|
||||
@ -114,8 +112,6 @@ class MediaMediaItem(MediaManagerItem):
|
||||
(path, name) = os.path.split(filename)
|
||||
self.parent.liveController.display.video(filename, 0, True)
|
||||
self.resetAction.setVisible(True)
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
else:
|
||||
criticalErrorMessageBox(translate('MediaPlugin.MediaItem',
|
||||
'Live Background Error'),
|
||||
|
Loading…
Reference in New Issue
Block a user