forked from openlp/openlp
names changes
This commit is contained in:
parent
0c9bea3b50
commit
2a7c5bd4de
@ -55,19 +55,16 @@ class Renderer(object):
|
|||||||
|
|
||||||
``theme_manager``
|
``theme_manager``
|
||||||
The ThemeManager instance, used to get the current theme details.
|
The ThemeManager instance, used to get the current theme details.
|
||||||
|
|
||||||
``screen_number``
|
|
||||||
Defaults to *0*. The index of the output/display screen.
|
|
||||||
"""
|
"""
|
||||||
log.info(u'Renderer Loaded')
|
log.info(u'Renderer Loaded')
|
||||||
|
|
||||||
def __init__(self, imageManager, theme_manager):
|
def __init__(self, image_manager, theme_manager):
|
||||||
"""
|
"""
|
||||||
Initialise the render manager.
|
Initialise the render manager.
|
||||||
"""
|
"""
|
||||||
log.debug(u'Initilisation started')
|
log.debug(u'Initilisation started')
|
||||||
self.theme_manager = theme_manager
|
self.theme_manager = theme_manager
|
||||||
self.image_manager = imageManager
|
self.image_manager = image_manager
|
||||||
self.screens = ScreenList.get_instance()
|
self.screens = ScreenList.get_instance()
|
||||||
self.service_theme = u''
|
self.service_theme = u''
|
||||||
self.theme_level = u''
|
self.theme_level = u''
|
||||||
|
@ -60,11 +60,11 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
This is the display screen.
|
This is the display screen.
|
||||||
"""
|
"""
|
||||||
def __init__(self, parent, imageManager, live):
|
def __init__(self, parent, image_manager, live):
|
||||||
DisplayWidget.__init__(self, live, parent)
|
DisplayWidget.__init__(self, live, parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.isLive = live
|
self.isLive = live
|
||||||
self.imageManager = imageManager
|
self.image_manager = image_manager
|
||||||
self.screens = ScreenList.get_instance()
|
self.screens = ScreenList.get_instance()
|
||||||
self.alertTab = None
|
self.alertTab = None
|
||||||
self.hideMode = None
|
self.hideMode = None
|
||||||
@ -245,7 +245,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
API for replacement backgrounds so Images are added directly to cache
|
API for replacement backgrounds so Images are added directly to cache
|
||||||
"""
|
"""
|
||||||
self.imageManager.add_image(name, path)
|
self.image_manager.add_image(name, path)
|
||||||
self.image(name)
|
self.image(name)
|
||||||
if hasattr(self, u'serviceItem'):
|
if hasattr(self, u'serviceItem'):
|
||||||
self.override[u'image'] = name
|
self.override[u'image'] = name
|
||||||
@ -260,7 +260,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
The name of the image to be displayed
|
The name of the image to be displayed
|
||||||
"""
|
"""
|
||||||
log.debug(u'image to display')
|
log.debug(u'image to display')
|
||||||
image = self.imageManager.get_image_bytes(name)
|
image = self.image_manager.get_image_bytes(name)
|
||||||
self.resetVideo()
|
self.resetVideo()
|
||||||
self.displayImage(image)
|
self.displayImage(image)
|
||||||
return self.preview()
|
return self.preview()
|
||||||
@ -490,13 +490,13 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.override = {}
|
self.override = {}
|
||||||
else:
|
else:
|
||||||
# replace the background
|
# replace the background
|
||||||
background = self.imageManager. \
|
background = self.image_manager. \
|
||||||
get_image_bytes(self.override[u'image'])
|
get_image_bytes(self.override[u'image'])
|
||||||
if self.serviceItem.themedata.background_filename:
|
if self.serviceItem.themedata.background_filename:
|
||||||
self.serviceItem.bg_image_bytes = self.imageManager. \
|
self.serviceItem.bg_image_bytes = self.image_manager. \
|
||||||
get_image_bytes(self.serviceItem.themedata.theme_name)
|
get_image_bytes(self.serviceItem.themedata.theme_name)
|
||||||
if image:
|
if image:
|
||||||
image_bytes = self.imageManager.get_image_bytes(image)
|
image_bytes = self.image_manager.get_image_bytes(image)
|
||||||
else:
|
else:
|
||||||
image_bytes = None
|
image_bytes = None
|
||||||
html = build_html(self.serviceItem, self.screen, self.alertTab,
|
html = build_html(self.serviceItem, self.screen, self.alertTab,
|
||||||
|
@ -475,7 +475,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
pluginpath = AppLocation.get_directory(AppLocation.PluginsDir)
|
pluginpath = AppLocation.get_directory(AppLocation.PluginsDir)
|
||||||
self.pluginManager = PluginManager(pluginpath)
|
self.pluginManager = PluginManager(pluginpath)
|
||||||
self.pluginHelpers = {}
|
self.pluginHelpers = {}
|
||||||
self.imageManager = ImageManager()
|
self.image_manager = ImageManager()
|
||||||
# Set up the interface
|
# Set up the interface
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
# Load settings after setupUi so default UI sizes are overwritten
|
# Load settings after setupUi so default UI sizes are overwritten
|
||||||
@ -541,7 +541,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
# warning cyclic dependency
|
# warning cyclic dependency
|
||||||
# renderer needs to call ThemeManager and
|
# renderer needs to call ThemeManager and
|
||||||
# ThemeManager needs to call Renderer
|
# ThemeManager needs to call Renderer
|
||||||
self.renderer = Renderer(self.imageManager, self.themeManagerContents)
|
self.renderer = Renderer(self.image_manager, self.themeManagerContents)
|
||||||
# Define the media Dock Manager
|
# Define the media Dock Manager
|
||||||
self.mediaDockManager = MediaDockManager(self.MediaToolBox)
|
self.mediaDockManager = MediaDockManager(self.MediaToolBox)
|
||||||
log.info(u'Load Plugins')
|
log.info(u'Load Plugins')
|
||||||
@ -774,8 +774,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
their locations
|
their locations
|
||||||
"""
|
"""
|
||||||
log.debug(u'screenChanged')
|
log.debug(u'screenChanged')
|
||||||
self.setFocus()
|
|
||||||
self.renderer.update_display()
|
self.renderer.update_display()
|
||||||
|
self.setFocus()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
|
|
||||||
def closeEvent(self, event):
|
def closeEvent(self, event):
|
||||||
|
@ -63,7 +63,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.screens = ScreenList.get_instance()
|
self.screens = ScreenList.get_instance()
|
||||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||||
float(self.screens.current[u'size'].height())
|
float(self.screens.current[u'size'].height())
|
||||||
self.image_manager = self.parent.imageManager
|
self.image_manager = self.parent.image_manager
|
||||||
self.display = MainDisplay(self, self.image_manager, isLive)
|
self.display = MainDisplay(self, self.image_manager, isLive)
|
||||||
self.display.setup()
|
self.display.setup()
|
||||||
self.loopList = [
|
self.loopList = [
|
||||||
|
Loading…
Reference in New Issue
Block a user