forked from openlp/openlp
Final changes following a revert and removal.
Finish plugin.py Add getThemes hook to thememanager.py
This commit is contained in:
parent
66f13e5ede
commit
ddde031adb
@ -22,6 +22,7 @@ from plugin import Plugin
|
||||
from settingstab import SettingsTab
|
||||
from mediamanageritem import MediaManagerItem
|
||||
from event import Event
|
||||
from event import EventType
|
||||
from eventmanager import EventManager
|
||||
from xmlrootclass import XmlRootClass
|
||||
from serviceitem import ServiceItem
|
||||
@ -31,6 +32,6 @@ from toolbar import OpenLPToolbar
|
||||
from songxmlhandler import SongXMLBuilder
|
||||
from songxmlhandler import SongXMLParser
|
||||
|
||||
__all__ = ['PluginConfig', 'Plugin', 'SettingsTab', 'MediaManagerItem', 'Event',
|
||||
__all__ = ['PluginConfig', 'Plugin', 'SettingsTab', 'MediaManagerItem', 'Event', 'EventType'
|
||||
'XmlRootClass', 'ServiceItem', 'Receiver', 'OpenLPToolbar', 'SongXMLBuilder',
|
||||
'SongXMLParser', 'EventManager']
|
||||
|
@ -46,15 +46,9 @@ class Event(object):
|
||||
"""
|
||||
Provides an Event class to encapsulate events within openlp.org.
|
||||
"""
|
||||
def __init__(self, event_type=EventType.Default):
|
||||
self.type = event_type
|
||||
self.payload = None
|
||||
|
||||
def get_payload(self):
|
||||
return self.payload
|
||||
|
||||
def set_payload(self, payload):
|
||||
def __init__(self, event_type=EventType.Default, payload=None):
|
||||
self.event_type = event_type
|
||||
self.payload = payload
|
||||
|
||||
def get_type(self):
|
||||
return self.type
|
||||
return self.event_type
|
||||
|
@ -90,6 +90,8 @@ class Plugin(object):
|
||||
self.log = logging.getLogger(self.name)
|
||||
self.preview_controller=plugin_helpers[u'preview']
|
||||
self.live_controller=plugin_helpers[u'live']
|
||||
self.theme_manager=plugin_helpers[u'theme']
|
||||
self.event_manager=plugin_helpers[u'event']
|
||||
|
||||
def check_pre_conditions(self):
|
||||
"""
|
||||
|
@ -133,6 +133,7 @@ class ThemeManager(QWidget):
|
||||
self.Theme_data=ThemeData()
|
||||
self.TreeView.setModel(self.Theme_data)
|
||||
self.Layout.addWidget(self.TreeView)
|
||||
self.themelist= []
|
||||
|
||||
# def addThemeItem(self, item):
|
||||
# """Adds Theme item"""
|
||||
@ -182,6 +183,9 @@ class ThemeManager(QWidget):
|
||||
# oosfile.write("# END OOS\n")
|
||||
# oosfile.close()
|
||||
|
||||
def get_themes(self):
|
||||
return [u'Theme A', u'Theme B']
|
||||
def load(self):
|
||||
log.debug(u'Load')
|
||||
self.themelist = [u'African Sunset', u'Snowy Mountains', u'Wilderness', u'Wet and Windy London']
|
||||
|
||||
def getThemes(self):
|
||||
return self.themelist
|
||||
|
Loading…
Reference in New Issue
Block a user