more constructors

This commit is contained in:
Andreas Preikschat 2013-08-01 15:04:42 +02:00
parent b48fbd40a3
commit 5e7bc82694
10 changed files with 11 additions and 11 deletions

View File

@ -128,7 +128,7 @@ class Plugin(QtCore.QObject):
class MyPlugin(Plugin):
def __init__(self):
Plugin.__init__(self, u'MyPlugin', version=u'0.1')
super(MyPlugin, self).__init__('MyPlugin', version=u'0.1')
``name``
Defaults to *None*. The name of the plugin.
@ -146,7 +146,7 @@ class Plugin(QtCore.QObject):
Defaults to *None*, which means that the same version number is used as OpenLP's version number.
"""
log.debug(u'Plugin %s initialised' % name)
QtCore.QObject.__init__(self)
super(Plugin, self).__init__()
self.name = name
self.text_strings = {}
self.set_plugin_text_strings()

View File

@ -129,7 +129,7 @@ class AlertsPlugin(Plugin):
log.info(u'Alerts Plugin loaded')
def __init__(self):
Plugin.__init__(self, u'alerts', __default_settings__, settings_tab_class=AlertsTab)
super(AlertsPlugin, self).__init__(u'alerts', __default_settings__, settings_tab_class=AlertsTab)
self.weight = -3
self.icon_path = u':/plugins/plugin_alerts.png'
self.icon = build_icon(self.icon_path)

View File

@ -69,7 +69,7 @@ class BiblePlugin(Plugin):
log.info(u'Bible Plugin loaded')
def __init__(self):
Plugin.__init__(self, u'bibles', __default_settings__, BibleMediaItem, BiblesTab)
super(BiblePlugin, self).__init__(u'bibles', __default_settings__, BibleMediaItem, BiblesTab)
self.weight = -9
self.icon_path = u':/plugins/plugin_bibles.png'
self.icon = build_icon(self.icon_path)

View File

@ -61,7 +61,7 @@ class CustomPlugin(Plugin):
log.info(u'Custom Plugin loaded')
def __init__(self):
Plugin.__init__(self, u'custom', __default_settings__, CustomMediaItem, CustomTab)
super(CustomPlugin, self).__init__(u'custom', __default_settings__, CustomMediaItem, CustomTab)
self.weight = -5
self.manager = Manager(u'custom', init_schema)
self.icon_path = u':/plugins/plugin_custom.png'

View File

@ -48,7 +48,7 @@ class ImagePlugin(Plugin):
log.info(u'Image Plugin loaded')
def __init__(self):
Plugin.__init__(self, u'images', __default_settings__, ImageMediaItem, ImageTab)
super(ImagePlugin, self).__init__(u'images', __default_settings__, ImageMediaItem, ImageTab)
self.manager = Manager(u'images', init_schema)
self.weight = -7
self.icon_path = u':/plugins/plugin_images.png'

View File

@ -49,7 +49,7 @@ class MediaPlugin(Plugin):
log.info(u'%s MediaPlugin loaded', __name__)
def __init__(self):
Plugin.__init__(self, u'media', __default_settings__, MediaMediaItem)
super(MediaPlugin, self).__init__(u'media', __default_settings__, MediaMediaItem)
self.weight = -6
self.icon_path = u':/plugins/plugin_media.png'
self.icon = build_icon(self.icon_path)

View File

@ -109,7 +109,7 @@ class PptviewDocument(PresentationDocument):
Constructor, store information about the file and initialise.
"""
log.debug(u'Init Presentation PowerPoint')
PresentationDocument.__init__(self, controller, presentation)
super(PptviewDocument, self).__init__(controller, presentation)
self.presentation = None
self.ppt_id = None
self.blanked = False

View File

@ -55,7 +55,7 @@ class RemotesPlugin(Plugin):
"""
remotes constructor
"""
Plugin.__init__(self, u'remotes', __default_settings__, settings_tab_class=RemoteTab)
super(RemotePlugin, self).__init__(u'remotes', __default_settings__, settings_tab_class=RemoteTab)
self.icon_path = u':/plugins/plugin_remote.png'
self.icon = build_icon(self.icon_path)
self.weight = -1

View File

@ -80,7 +80,7 @@ class SongsPlugin(Plugin):
"""
Create and set up the Songs plugin.
"""
Plugin.__init__(self, u'songs', __default_settings__, SongMediaItem, SongsTab)
super(SongsPlugin, self).__init__(u'songs', __default_settings__, SongMediaItem, SongsTab)
self.manager = Manager(u'songs', init_schema, upgrade_mod=upgrade)
self.weight = -10
self.icon_path = u':/plugins/plugin_songs.png'

View File

@ -60,7 +60,7 @@ class SongUsagePlugin(Plugin):
log.info(u'SongUsage Plugin loaded')
def __init__(self):
Plugin.__init__(self, u'songusage', __default_settings__)
super(SongUsagePlugin, self).__init__(u'songusage', __default_settings__)
self.manager = Manager(u'songusage', init_schema, upgrade_mod=upgrade)
self.weight = -4
self.icon = build_icon(u':/plugins/plugin_songusage.png')