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 PyQt4.QtGui import *
|
||||||
|
|
||||||
from openlp.core.resources 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 import BibleManager, BiblesTab, BibleMediaItem
|
||||||
from openlp.plugins.bibles.lib.tables import *
|
from openlp.plugins.bibles.lib.tables import *
|
||||||
@ -76,4 +77,13 @@ class BiblePlugin(Plugin):
|
|||||||
def onBibleNewClick(self):
|
def onBibleNewClick(self):
|
||||||
self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self)
|
self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self)
|
||||||
self.bibleimportform.exec_()
|
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())
|
||||||
|
@ -56,7 +56,7 @@ class CustomPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
Handle the event contained in the event object.
|
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:
|
if event.event_type == EventType.ThemeListChanged:
|
||||||
log.debug(u'New Theme request received')
|
log.debug(u'New Theme request received')
|
||||||
self.edit_custom_form.loadThemes(self.theme_manager.getThemes())
|
self.edit_custom_form.loadThemes(self.theme_manager.getThemes())
|
||||||
|
@ -22,7 +22,8 @@ import logging
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.resources 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.songs.lib import SongManager, SongsTab, SongMediaItem
|
from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem
|
||||||
from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \
|
from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \
|
||||||
OpenSongImportForm, OpenLPExportForm
|
OpenSongImportForm, OpenLPExportForm
|
||||||
@ -122,3 +123,12 @@ class SongsPlugin(Plugin):
|
|||||||
|
|
||||||
def onExportOpenSongItemClicked(self):
|
def onExportOpenSongItemClicked(self):
|
||||||
self.opensong_export_form.show()
|
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