forked from openlp/openlp
start off
This commit is contained in:
parent
060f56c76b
commit
60d4009261
@ -31,7 +31,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtGui, QtCore, QtWebKit
|
||||
|
||||
from openlp.core.common import Registry, Settings
|
||||
from openlp.core.common import Registry, OpenLPMixin, RegistryMixin, Settings
|
||||
from openlp.core.lib import FormattingTags, ImageSource, ItemCapabilities, ScreenList, ServiceItem, expand_tags, \
|
||||
build_lyrics_format_css, build_lyrics_outline_css
|
||||
from openlp.core.common import ThemeLevel
|
||||
@ -50,12 +50,11 @@ VERSE_FOR_LINE_COUNT = '\n'.join(map(str, range(100)))
|
||||
FOOTER = ['Arky Arky (Unknown)', 'Public Domain', 'CCLI 123456']
|
||||
|
||||
|
||||
class Renderer(object):
|
||||
class Renderer(OpenLPMixin, RegistryMixin):
|
||||
"""
|
||||
Class to pull all Renderer interactions into one place. The plugins will call helper methods to do the rendering but
|
||||
this class will provide display defense code.
|
||||
"""
|
||||
log.info('Renderer Loaded')
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
@ -63,20 +62,21 @@ class Renderer(object):
|
||||
"""
|
||||
log.debug('Initialisation started')
|
||||
self.screens = ScreenList()
|
||||
Registry().register('renderer', self)
|
||||
self.theme_level = ThemeLevel.Global
|
||||
self.global_theme_name = ''
|
||||
self.service_theme_name = ''
|
||||
self.item_theme_name = ''
|
||||
self.force_page = False
|
||||
self.display = MainDisplay(None, False, self)
|
||||
self.display.setup()
|
||||
self._theme_dimensions = {}
|
||||
self._calculate_default()
|
||||
Registry().register_function('theme_update_global', self.set_global_theme)
|
||||
self.web = QtWebKit.QWebView()
|
||||
self.web.setVisible(False)
|
||||
self.web_frame = self.web.page().mainFrame()
|
||||
Registry().register_function('theme_update_global', self.set_global_theme)
|
||||
|
||||
def bootstrap_initialise(self):
|
||||
self.display = MainDisplay(None, False, self)
|
||||
self.display.setup()
|
||||
|
||||
def update_display(self):
|
||||
"""
|
||||
|
@ -56,9 +56,8 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class Display(QtGui.QGraphicsView):
|
||||
"""
|
||||
This is a general display screen class. Here the general display settings
|
||||
will done. It will be used as specialized classes by Main Display and
|
||||
Preview display.
|
||||
This is a general display screen class. Here the general display settings will done. It will be used as
|
||||
specialized classes by Main Display and Preview display.
|
||||
"""
|
||||
def __init__(self, parent, live, controller):
|
||||
"""
|
||||
@ -521,8 +520,7 @@ class MainDisplay(Display):
|
||||
|
||||
class AudioPlayer(QtCore.QObject):
|
||||
"""
|
||||
This Class will play audio only allowing components to work with a
|
||||
soundtrack independent of the user interface.
|
||||
This Class will play audio only allowing components to work with a soundtrack independent of the user interface.
|
||||
"""
|
||||
log.info('AudioPlayer Loaded')
|
||||
|
||||
|
@ -158,7 +158,7 @@ class ThemeManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ThemeManager):
|
||||
self.theme_form.path = self.path
|
||||
self.file_rename_form = FileRenameForm()
|
||||
Registry().register_function('theme_update_global', self.change_global_from_tab)
|
||||
self._push_themes()
|
||||
self.load_themes()
|
||||
|
||||
def build_theme_path(self):
|
||||
"""
|
||||
@ -446,7 +446,6 @@ class ThemeManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ThemeManager):
|
||||
self._write_theme(theme, None, None)
|
||||
Settings().setValue(self.settings_section + '/global theme', theme.theme_name)
|
||||
self.application.set_normal_cursor()
|
||||
self.load_themes()
|
||||
|
||||
def load_themes(self):
|
||||
"""
|
||||
|
@ -160,7 +160,8 @@ class ThemesTab(SettingsTab):
|
||||
"""
|
||||
After setting things up...
|
||||
"""
|
||||
Registry().execute('theme_update_global')
|
||||
#Registry().execute('theme_update_global')
|
||||
pass
|
||||
|
||||
def on_song_level_button_clicked(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user