updated constructors

This commit is contained in:
Andreas Preikschat 2013-07-18 16:37:09 +02:00
commit 1ac35584bd
10 changed files with 11 additions and 10 deletions

View File

@ -61,7 +61,7 @@ class ServiceManagerList(QtGui.QTreeWidget):
"""
Constructor
"""
QtGui.QTreeWidget.__init__(self, parent)
super(ServiceManagerList, self).__init__(parent)
self.serviceManager = serviceManager
def keyPressEvent(self, event):

View File

@ -43,7 +43,7 @@ class CaptureShortcutButton(QtGui.QPushButton):
"""
Constructor
"""
QtGui.QPushButton.__init__(self, *args)
super(CaptureShortcutButton, self).__init__(*args)
self.setCheckable(True)
def keyPressEvent(self, event):

View File

@ -52,7 +52,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
"""
Constructor
"""
QtGui.QDialog.__init__(self, parent)
super(ShortcutListForm, self).__init__(parent)
self.setupUi(self)
self.changedActions = {}
self.action_list = ActionList.get_instance()

View File

@ -65,7 +65,7 @@ class DisplayController(QtGui.QWidget):
"""
Set up the general Controller.
"""
QtGui.QWidget.__init__(self, parent)
super(DisplayController, self).__init__(parent)
self.is_live = is_live
self.display = None
self.controller_type = DisplayControllerType.Plugin
@ -90,7 +90,7 @@ class SlideController(DisplayController):
"""
Set up the Slide Controller.
"""
DisplayController.__init__(self, parent, is_live)
super(SlideController, self).__init__(parent, is_live)
Registry().register_function(u'bootstrap_post_set_up', self.screen_size_changed)
self.screens = ScreenList()
try:

View File

@ -57,7 +57,7 @@ class ThemeManager(QtGui.QWidget):
"""
Constructor
"""
QtGui.QWidget.__init__(self, parent)
super(ThemeManager, self).__init__(parent)
Registry().register(u'theme_manager', self)
Registry().register_function(u'bootstrap_initialise', self.load_first_time_themes)
Registry().register_function(u'bootstrap_post_set_up', self._push_themes)

View File

@ -48,7 +48,7 @@ class ThemesTab(SettingsTab):
"""
self.icon_path = u':/themes/theme_new.png'
theme_translated = translate('OpenLP.ThemesTab', 'Themes')
SettingsTab.__init__(self, parent, u'Themes', theme_translated)
super(ThemesTab, self).__init__(parent, u'Themes', theme_translated)
def setupUi(self):
"""

View File

@ -96,7 +96,7 @@ class OpenLPWizard(QtGui.QWizard):
"""
Constructor
"""
QtGui.QWizard.__init__(self, parent)
super(OpenLPWizard, self).__init__(parent)
self.plugin = plugin
self.with_progress_page = add_progress_page
self.setObjectName(name)

View File

@ -41,7 +41,7 @@ above, like so::
class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog):
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
super(AuthorsForm, self).__init__(parent)
self.setupUi(self)
This allows OpenLP to use ``self.object`` for all the GUI elements while keeping them separate from the functionality,

View File

@ -46,6 +46,7 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
self.manager = plugin.manager
self.plugin = plugin
self.item_id = None
# TODO: Use Registry()
super(AlertForm, self).__init__(self.plugin.main_window)
self.setupUi(self)
self.display_button.clicked.connect(self.on_display_clicked)

View File

@ -48,7 +48,7 @@ class AlertsManager(QtCore.QObject):
log.info(u'Alert Manager loaded')
def __init__(self, parent):
QtCore.QObject.__init__(self, parent)
super(AlertsManager, self).__init__(parent)
Registry().register(u'alerts_manager', self)
self.timer_id = 0
self.alert_list = []