forked from openlp/openlp
Name cleanups
bzr-revno: 910
This commit is contained in:
commit
168625f630
@ -443,7 +443,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
service_item = self.buildServiceItem()
|
||||
if service_item:
|
||||
service_item.from_plugin = True
|
||||
self.parent.preview_controller.addServiceItem(service_item)
|
||||
self.parent.previewController.addServiceItem(service_item)
|
||||
|
||||
def onLiveClick(self):
|
||||
"""
|
||||
@ -460,7 +460,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
service_item = self.buildServiceItem()
|
||||
if service_item:
|
||||
service_item.from_plugin = True
|
||||
self.parent.live_controller.addServiceItem(service_item)
|
||||
self.parent.liveController.addServiceItem(service_item)
|
||||
|
||||
def onAddClick(self):
|
||||
"""
|
||||
@ -479,7 +479,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
service_item = self.buildServiceItem()
|
||||
if service_item:
|
||||
service_item.from_plugin = False
|
||||
self.parent.service_manager.addServiceItem(service_item,
|
||||
self.parent.serviceManager.addServiceItem(service_item,
|
||||
replace=self.remoteTriggered)
|
||||
else:
|
||||
items = self.ListView.selectedIndexes()
|
||||
@ -487,7 +487,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
service_item = self.buildServiceItem(item)
|
||||
if service_item:
|
||||
service_item.from_plugin = False
|
||||
self.parent.service_manager.addServiceItem(service_item)
|
||||
self.parent.serviceManager.addServiceItem(service_item)
|
||||
|
||||
def onAddEditClick(self):
|
||||
"""
|
||||
@ -500,7 +500,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
'You must select one or more items'))
|
||||
else:
|
||||
log.debug(self.PluginNameShort + u' Add requested')
|
||||
service_item = self.parent.service_manager.getServiceItem()
|
||||
service_item = self.parent.serviceManager.getServiceItem()
|
||||
if not service_item:
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('MediaManagerItem', 'No Service Item Selected'),
|
||||
@ -508,7 +508,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
'You must select an existing service item to add to.'))
|
||||
elif self.title.lower() == service_item.name.lower():
|
||||
self.generateSlideData(service_item)
|
||||
self.parent.service_manager.addServiceItem(service_item,
|
||||
self.parent.serviceManager.addServiceItem(service_item,
|
||||
replace=True)
|
||||
else:
|
||||
#Turn off the remote edit update message indicator
|
||||
|
@ -124,13 +124,13 @@ class Plugin(QtCore.QObject):
|
||||
self.status = PluginStatus.Inactive
|
||||
# Set up logging
|
||||
self.log = logging.getLogger(self.name)
|
||||
self.preview_controller = plugin_helpers[u'preview']
|
||||
self.live_controller = plugin_helpers[u'live']
|
||||
self.render_manager = plugin_helpers[u'render']
|
||||
self.service_manager = plugin_helpers[u'service']
|
||||
self.settings_form = plugin_helpers[u'settings form']
|
||||
self.previewController = plugin_helpers[u'preview']
|
||||
self.liveController = plugin_helpers[u'live']
|
||||
self.renderManager = plugin_helpers[u'render']
|
||||
self.serviceManager = plugin_helpers[u'service']
|
||||
self.settingsForm = plugin_helpers[u'settings form']
|
||||
self.mediadock = plugin_helpers[u'toolbox']
|
||||
self.maindisplay = plugin_helpers[u'maindisplay']
|
||||
self.displayManager = plugin_helpers[u'displaymanager']
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
||||
self.process_add_service_event)
|
||||
@ -175,29 +175,29 @@ class Plugin(QtCore.QObject):
|
||||
"""
|
||||
pass
|
||||
|
||||
def add_import_menu_item(self, import_menu):
|
||||
def add_import_menu_item(self, importMenu):
|
||||
"""
|
||||
Create a menu item and add it to the "Import" menu.
|
||||
|
||||
``import_menu``
|
||||
``importMenu``
|
||||
The Import menu.
|
||||
"""
|
||||
pass
|
||||
|
||||
def add_export_menu_item(self, export_menu):
|
||||
def add_export_menu_item(self, exportMenu):
|
||||
"""
|
||||
Create a menu item and add it to the "Export" menu.
|
||||
|
||||
``export_menu``
|
||||
``exportMenu``
|
||||
The Export menu
|
||||
"""
|
||||
pass
|
||||
|
||||
def add_tools_menu_item(self, tools_menu):
|
||||
def add_tools_menu_item(self, toolsMenu):
|
||||
"""
|
||||
Create a menu item and add it to the "Tools" menu.
|
||||
|
||||
``tools_menu``
|
||||
``toolsMenu``
|
||||
The Tools menu
|
||||
"""
|
||||
pass
|
||||
@ -224,9 +224,9 @@ class Plugin(QtCore.QObject):
|
||||
log.debug(u'process_add_service_event event called for plugin %s' %
|
||||
self.name)
|
||||
if replace:
|
||||
self.media_item.onAddEditClick()
|
||||
self.mediaItem.onAddEditClick()
|
||||
else:
|
||||
self.media_item.onAddClick()
|
||||
self.mediaItem.onAddClick()
|
||||
|
||||
def about(self):
|
||||
"""
|
||||
@ -240,8 +240,8 @@ class Plugin(QtCore.QObject):
|
||||
"""
|
||||
Called by the plugin Manager to initialise anything it needs.
|
||||
"""
|
||||
if self.media_item:
|
||||
self.media_item.initialise()
|
||||
if self.mediaItem:
|
||||
self.mediaItem.initialise()
|
||||
self.insert_toolbox_item()
|
||||
|
||||
def finalise(self):
|
||||
@ -254,19 +254,19 @@ class Plugin(QtCore.QObject):
|
||||
"""
|
||||
Called by the plugin to remove toolbar
|
||||
"""
|
||||
if self.media_item:
|
||||
if self.mediaItem:
|
||||
self.mediadock.remove_dock(self.name)
|
||||
if self.settings_tab:
|
||||
self.settings_form.removeTab(self.name)
|
||||
self.settingsForm.removeTab(self.name)
|
||||
|
||||
def insert_toolbox_item(self):
|
||||
"""
|
||||
Called by plugin to replace toolbar
|
||||
"""
|
||||
if self.media_item:
|
||||
self.mediadock.insert_dock(self.media_item, self.icon, self.weight)
|
||||
if self.mediaItem:
|
||||
self.mediadock.insert_dock(self.mediaItem, self.icon, self.weight)
|
||||
if self.settings_tab:
|
||||
self.settings_form.insertTab(self.settings_tab, self.weight)
|
||||
self.settingsForm.insertTab(self.settings_tab, self.weight)
|
||||
|
||||
def can_delete_theme(self, theme):
|
||||
"""
|
||||
|
@ -138,7 +138,7 @@ class PluginManager(object):
|
||||
"""
|
||||
for plugin in self.plugins:
|
||||
if plugin.status is not PluginStatus.Disabled:
|
||||
plugin.media_item = plugin.get_media_manager_item()
|
||||
plugin.mediaItem = plugin.get_media_manager_item()
|
||||
|
||||
def hook_settings_tabs(self, settingsform=None):
|
||||
"""
|
||||
|
@ -73,7 +73,7 @@ class ServiceItem(object):
|
||||
The plugin that this service item belongs to.
|
||||
"""
|
||||
if plugin:
|
||||
self.render_manager = plugin.render_manager
|
||||
self.render_manager = plugin.renderManager
|
||||
self.name = plugin.name
|
||||
self.title = u''
|
||||
self.shortname = u''
|
||||
|
@ -580,7 +580,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.plugin_helpers[u'service'] = self.ServiceManagerContents
|
||||
self.plugin_helpers[u'settings form'] = self.settingsForm
|
||||
self.plugin_helpers[u'toolbox'] = self.mediaDockManager
|
||||
self.plugin_helpers[u'maindisplay'] = self.displayManager.mainDisplay
|
||||
self.plugin_helpers[u'displaymanager'] = self.displayManager
|
||||
self.plugin_manager.find_plugins(pluginpath, self.plugin_helpers)
|
||||
# hook methods have to happen after find_plugins. Find plugins needs
|
||||
# the controllers hence the hooks have moved from setupUI() to here
|
||||
|
@ -73,7 +73,7 @@ class alertsPlugin(Plugin):
|
||||
self.toolsAlertItem.setStatusTip(
|
||||
translate('AlertsPlugin', 'Show an alert message'))
|
||||
self.toolsAlertItem.setShortcut(u'F7')
|
||||
self.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem)
|
||||
self.serviceManager.parent.ToolsMenu.addAction(self.toolsAlertItem)
|
||||
QtCore.QObject.connect(self.toolsAlertItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onAlertsTrigger)
|
||||
self.toolsAlertItem.setVisible(False)
|
||||
|
@ -178,7 +178,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
bitem = self.ListView.item(item.row())
|
||||
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||
frame = QtGui.QImage(unicode(filename))
|
||||
self.parent.live_controller.displayManager.displayImageWithText(frame)
|
||||
self.parent.displayManager.displayImageWithText(frame)
|
||||
|
||||
def onPreviewClick(self):
|
||||
MediaManagerItem.onPreviewClick(self)
|
||||
|
@ -101,22 +101,13 @@ class MediaMediaItem(MediaManagerItem):
|
||||
self.PageLayout.addWidget(self.ImageWidget)
|
||||
|
||||
def onReplaceClick(self):
|
||||
# if self.background:
|
||||
# self.background = False
|
||||
# Receiver.send_message(u'videodisplay_stop')
|
||||
# else:
|
||||
# self.background = True
|
||||
|
||||
if check_item_selected(self.ListView,
|
||||
translate('ImagePlugin.MediaItem',
|
||||
'You must select an item to process.')):
|
||||
item = self.ListView.currentItem()
|
||||
filename = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
self.parent.live_controller.displayManager.displayVideo(filename)
|
||||
# items = self.ListView.selectedIndexes()
|
||||
# for item in items:
|
||||
# bitem = self.ListView.item(item.row())
|
||||
# filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||
# Receiver.send_message(u'videodisplay_background', filename)
|
||||
self.parent.displayManager.displayVideo(filename)
|
||||
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
if item is None:
|
||||
|
@ -63,7 +63,7 @@ class MediaPlugin(Plugin):
|
||||
if len(value) == 2:
|
||||
if list.find(value[1]) == -1:
|
||||
list += u'*.%s ' % value[1]
|
||||
self.service_manager.supportedSuffixes(value[1])
|
||||
self.serviceManager.supportedSuffixes(value[1])
|
||||
type = u''
|
||||
return list, type
|
||||
|
||||
|
@ -88,7 +88,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onThemeComboChanged)
|
||||
QtCore.QObject.connect(self.ThemeAddButton,
|
||||
QtCore.SIGNAL(u'clicked()'),
|
||||
self.parent.parent.render_manager.theme_manager.onAddTheme)
|
||||
self.parent.parent.renderManager.theme_manager.onAddTheme)
|
||||
QtCore.QObject.connect(self.MaintenanceButton,
|
||||
QtCore.SIGNAL(u'clicked()'), self.onMaintenanceButtonClicked)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
|
@ -67,7 +67,7 @@ class SongsPlugin(Plugin):
|
||||
def initialise(self):
|
||||
log.info(u'Songs Initialising')
|
||||
Plugin.initialise(self)
|
||||
self.media_item.displayResultsSong(
|
||||
self.mediaItem.displayResultsSong(
|
||||
self.manager.get_all_objects(Song, Song.title))
|
||||
|
||||
def get_media_manager_item(self):
|
||||
|
Loading…
Reference in New Issue
Block a user