Add New Theme Event Handlers to plugins

This commit is contained in:
Tim Bentley 2009-04-10 07:06:41 +01:00
parent 9b29d2b668
commit d025d1ebf6
3 changed files with 24 additions and 4 deletions

View File

@ -24,7 +24,8 @@ from PyQt4.QtCore import *
from PyQt4.QtGui import *
from openlp.core.resources import *
from openlp.core.lib import Plugin
from openlp.core.lib import Plugin, Event
from openlp.core.lib import EventType
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
from openlp.plugins.bibles.lib.tables import *
@ -76,4 +77,13 @@ class BiblePlugin(Plugin):
def onBibleNewClick(self):
self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self)
self.bibleimportform.exec_()
pass
pass
def handle_event(self, event):
"""
Handle the event contained in the event object.
"""
log.debug(u'Handle event called with event %s'%event.event_type)
if event.event_type == EventType.ThemeListChanged:
log.debug(u'New Theme request received')
#self.edit_custom_form.loadThemes(self.theme_manager.getThemes())

View File

@ -56,7 +56,7 @@ class CustomPlugin(Plugin):
"""
Handle the event contained in the event object.
"""
log.debug(u'Handle event called with event %s' %event.event_type)
log.debug(u'Handle event called with event %s'%event.event_type)
if event.event_type == EventType.ThemeListChanged:
log.debug(u'New Theme request received')
self.edit_custom_form.loadThemes(self.theme_manager.getThemes())

View File

@ -22,7 +22,8 @@ import logging
from PyQt4 import QtCore, QtGui
from openlp.core.resources import *
from openlp.core.lib import Plugin
from openlp.core.lib import Plugin, Event
from openlp.core.lib import EventType
from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem
from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \
OpenSongImportForm, OpenLPExportForm
@ -122,3 +123,12 @@ class SongsPlugin(Plugin):
def onExportOpenSongItemClicked(self):
self.opensong_export_form.show()
def handle_event(self, event):
"""
Handle the event contained in the event object.
"""
log.debug(u'Handle event called with event %s'%event.event_type)
if event.event_type == EventType.ThemeListChanged:
log.debug(u'New Theme request received')
#self.edit_custom_form.loadThemes(self.theme_manager.getThemes())