forked from openlp/openlp
Add New Theme Event Handlers to plugins
This commit is contained in:
parent
9b29d2b668
commit
d025d1ebf6
@ -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 *
|
||||
@ -77,3 +78,12 @@ class BiblePlugin(Plugin):
|
||||
self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self)
|
||||
self.bibleimportform.exec_()
|
||||
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())
|
||||
|
@ -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())
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user