r1776 + resolved conflict

This commit is contained in:
Andreas Preikschat 2011-10-16 17:21:25 +02:00
commit 406ea9fe0a
4 changed files with 16 additions and 18 deletions

View File

@ -57,14 +57,14 @@ class Renderer(object):
def __init__(self, imageManager, themeManager): def __init__(self, imageManager, themeManager):
""" """
Initialise the render manager. Initialise the renderer.
``imageManager`` ``imageManager``
A ImageManager instance which takes care of e. g. caching and resizing A imageManager instance which takes care of e. g. caching and resizing
images. images.
``themeManager`` ``themeManager``
The ThemeManager instance, used to get the current theme details. The themeManager instance, used to get the current theme details.
""" """
log.debug(u'Initialisation started') log.debug(u'Initialisation started')
self.themeManager = themeManager self.themeManager = themeManager
@ -81,7 +81,7 @@ class Renderer(object):
def update_display(self): def update_display(self):
""" """
Updates the render manager's information about the current screen. Updates the renderer's information about the current screen.
""" """
log.debug(u'Update Display') log.debug(u'Update Display')
self._calculate_default() self._calculate_default()
@ -306,7 +306,7 @@ class Renderer(object):
""" """
log.debug(u'_build_text_rectangle') log.debug(u'_build_text_rectangle')
main_rect = self.get_main_rectangle(theme) main_rect = self.get_main_rectangle(theme)
footer_rect = self.get_main_rectangle(theme) footer_rect = self.get_footer_rectangle(theme)
self._set_text_rectangle(main_rect, footer_rect) self._set_text_rectangle(main_rect, footer_rect)
def get_main_rectangle(self, theme): def get_main_rectangle(self, theme):

View File

@ -122,9 +122,8 @@ class ServiceItem(object):
def _new_item(self): def _new_item(self):
""" """
Method to set the internal id of the item Method to set the internal id of the item. This is used to compare
This is used to compare service items to see if they are service items to see if they are the same.
the same
""" """
self._uuid = unicode(uuid.uuid1()) self._uuid = unicode(uuid.uuid1())
@ -160,9 +159,8 @@ class ServiceItem(object):
def render(self, use_override=False): def render(self, use_override=False):
""" """
The render method is what generates the frames for the screen and The render method is what generates the frames for the screen and
obtains the display information from the renderemanager. obtains the display information from the renderer. At this point all
At this point all the slides are built for the given slides are built for the given display size.
display size.
""" """
log.debug(u'Render called') log.debug(u'Render called')
self._display_frames = [] self._display_frames = []

View File

@ -345,7 +345,7 @@ class MainDisplay(QtGui.QGraphicsView):
""" """
# We request a background video but have no service Item # We request a background video but have no service Item
if isBackground and not hasattr(self, u'serviceItem'): if isBackground and not hasattr(self, u'serviceItem'):
return None return False
if not self.mediaObject: if not self.mediaObject:
self.createMediaObject() self.createMediaObject()
log.debug(u'video') log.debug(u'video')
@ -372,6 +372,7 @@ class MainDisplay(QtGui.QGraphicsView):
self.webView.setVisible(False) self.webView.setVisible(False)
self.videoWidget.setVisible(True) self.videoWidget.setVisible(True)
self.audio.setVolume(vol) self.audio.setVolume(vol)
return True
def videoState(self, newState, oldState): def videoState(self, newState, oldState):
""" """

View File

@ -39,7 +39,7 @@ from openlp.core.lib.ui import UiStrings, critical_error_message_box
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
CLAPPERBOARD = QtGui.QPixmap(u':/media/media_video.png').toImage() CLAPPERBOARD = QtGui.QImage(u':/media/media_video.png')
class MediaMediaItem(MediaManagerItem): class MediaMediaItem(MediaManagerItem):
""" """
@ -95,14 +95,14 @@ class MediaMediaItem(MediaManagerItem):
def onResetClick(self): def onResetClick(self):
""" """
Called to reset the Live backgound with the media selected, Called to reset the Live backgound with the media selected.
""" """
self.resetAction.setVisible(False) self.resetAction.setVisible(False)
self.plugin.liveController.display.resetVideo() self.plugin.liveController.display.resetVideo()
def videobackgroundReplaced(self): def videobackgroundReplaced(self):
""" """
Triggered by main display on change of serviceitem Triggered by main display on change of serviceitem.
""" """
self.resetAction.setVisible(False) self.resetAction.setVisible(False)
@ -179,8 +179,7 @@ class MediaMediaItem(MediaManagerItem):
def mediaStateWait(self, mediaState): def mediaStateWait(self, mediaState):
""" """
Wait for the video to change its state Wait for the video to change its state. Wait no longer than 5 seconds.
Wait no longer than 5 seconds.
""" """
start = datetime.now() start = datetime.now()
while self.mediaObject.state() != mediaState: while self.mediaObject.state() != mediaState:
@ -198,7 +197,7 @@ class MediaMediaItem(MediaManagerItem):
def onDeleteClick(self): def onDeleteClick(self):
""" """
Remove a media item from the list Remove a media item from the list.
""" """
if check_item_selected(self.listView, translate('MediaPlugin.MediaItem', if check_item_selected(self.listView, translate('MediaPlugin.MediaItem',
'You must select a media file to delete.')): 'You must select a media file to delete.')):