forked from openlp/openlp
changed instance variable to camelCase as the class is Qt based
This commit is contained in:
parent
b0551d01e8
commit
4d20334cce
@ -56,11 +56,11 @@ class Renderer(object):
|
||||
"""
|
||||
log.info(u'Renderer Loaded')
|
||||
|
||||
def __init__(self, image_manager, theme_manager):
|
||||
def __init__(self, imageManager, theme_manager):
|
||||
"""
|
||||
Initialise the render manager.
|
||||
|
||||
``image_manager``
|
||||
``imageManager``
|
||||
A ImageManager instance which takes care of e. g. caching and resizing
|
||||
images.
|
||||
|
||||
@ -69,7 +69,7 @@ class Renderer(object):
|
||||
"""
|
||||
log.debug(u'Initialisation started')
|
||||
self.theme_manager = theme_manager
|
||||
self.image_manager = image_manager
|
||||
self.imageManager = imageManager
|
||||
self.screens = ScreenList.get_instance()
|
||||
self.service_theme = u''
|
||||
self.theme_level = u''
|
||||
@ -77,7 +77,7 @@ class Renderer(object):
|
||||
self.theme_data = None
|
||||
self.bg_frame = None
|
||||
self.force_page = False
|
||||
self.display = MainDisplay(None, self.image_manager, False)
|
||||
self.display = MainDisplay(None, self.imageManager, False)
|
||||
self.display.setup()
|
||||
|
||||
def update_display(self):
|
||||
@ -88,7 +88,7 @@ class Renderer(object):
|
||||
self._calculate_default(self.screens.current[u'size'])
|
||||
if self.display:
|
||||
self.display.close()
|
||||
self.display = MainDisplay(None, self.image_manager, False)
|
||||
self.display = MainDisplay(None, self.imageManager, False)
|
||||
self.display.setup()
|
||||
self.bg_frame = None
|
||||
self.theme_data = None
|
||||
@ -167,7 +167,7 @@ class Renderer(object):
|
||||
self._build_text_rectangle(self.theme_data)
|
||||
# if No file do not update cache
|
||||
if self.theme_data.background_filename:
|
||||
self.image_manager.add_image(self.theme_data.theme_name,
|
||||
self.imageManager.add_image(self.theme_data.theme_name,
|
||||
self.theme_data.background_filename)
|
||||
return self._rect, self._rect_footer
|
||||
|
||||
@ -193,7 +193,7 @@ class Renderer(object):
|
||||
# make big page for theme edit dialog to get line count
|
||||
serviceItem.add_from_text(u'', VERSE + VERSE + VERSE)
|
||||
else:
|
||||
self.image_manager.del_image(theme_data.theme_name)
|
||||
self.imageManager.del_image(theme_data.theme_name)
|
||||
serviceItem.add_from_text(u'', VERSE)
|
||||
serviceItem.renderer = self
|
||||
serviceItem.raw_footer = FOOTER
|
||||
|
@ -208,7 +208,7 @@ class ServiceItem(object):
|
||||
"""
|
||||
self.service_item_type = ServiceItemType.Image
|
||||
self._raw_frames.append({u'title': title, u'path': path})
|
||||
self.renderer.image_manager.add_image(title, path)
|
||||
self.renderer.imageManager.add_image(title, path)
|
||||
self._new_item()
|
||||
|
||||
def add_from_text(self, title, raw_slide, verse_tag=None):
|
||||
|
@ -48,13 +48,13 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||
"""
|
||||
This is the display screen.
|
||||
"""
|
||||
def __init__(self, parent, image_manager, live):
|
||||
def __init__(self, parent, imageManager, live):
|
||||
if live:
|
||||
QtGui.QGraphicsView.__init__(self)
|
||||
else:
|
||||
QtGui.QGraphicsView.__init__(self, parent)
|
||||
self.isLive = live
|
||||
self.image_manager = image_manager
|
||||
self.imageManager = imageManager
|
||||
self.screens = ScreenList.get_instance()
|
||||
self.alertTab = None
|
||||
self.hideMode = None
|
||||
@ -232,7 +232,7 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||
"""
|
||||
API for replacement backgrounds so Images are added directly to cache
|
||||
"""
|
||||
self.image_manager.add_image(name, path)
|
||||
self.imageManager.add_image(name, path)
|
||||
self.image(name)
|
||||
if hasattr(self, u'serviceItem'):
|
||||
self.override[u'image'] = name
|
||||
@ -247,7 +247,7 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||
The name of the image to be displayed
|
||||
"""
|
||||
log.debug(u'image to display')
|
||||
image = self.image_manager.get_image_bytes(name)
|
||||
image = self.imageManager.get_image_bytes(name)
|
||||
self.resetVideo()
|
||||
self.displayImage(image)
|
||||
return self.preview()
|
||||
@ -477,13 +477,13 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||
self.override = {}
|
||||
else:
|
||||
# replace the background
|
||||
background = self.image_manager. \
|
||||
background = self.imageManager. \
|
||||
get_image_bytes(self.override[u'image'])
|
||||
if self.serviceItem.themedata.background_filename:
|
||||
self.serviceItem.bg_image_bytes = self.image_manager. \
|
||||
self.serviceItem.bg_image_bytes = self.imageManager. \
|
||||
get_image_bytes(self.serviceItem.themedata.theme_name)
|
||||
if image:
|
||||
image_bytes = self.image_manager.get_image_bytes(image)
|
||||
image_bytes = self.imageManager.get_image_bytes(image)
|
||||
else:
|
||||
image_bytes = None
|
||||
html = build_html(self.serviceItem, self.screen, self.alertTab,
|
||||
|
Loading…
Reference in New Issue
Block a user