forked from openlp/openlp
changed constructors
This commit is contained in:
commit
f5ce8e85f3
|
@ -60,7 +60,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
|||
Constructor.
|
||||
"""
|
||||
global ENCHANT_AVAILABLE
|
||||
QtGui.QPlainTextEdit.__init__(self, parent)
|
||||
super(SpellTextEdit, self).__init__(parent)
|
||||
self.formatting_tags_allowed = formatting_tags_allowed
|
||||
# Default dictionary based on the current locale.
|
||||
if ENCHANT_AVAILABLE:
|
||||
|
|
|
@ -44,7 +44,7 @@ class TreeWidgetWithDnD(QtGui.QTreeWidget):
|
|||
"""
|
||||
Initialise the tree widget
|
||||
"""
|
||||
QtGui.QTreeWidget.__init__(self, parent)
|
||||
super(TreeWidgetWithDnD, self).__init__(parent)
|
||||
self.mimeDataText = name
|
||||
self.allow_internal_dnd = False
|
||||
self.header().close()
|
||||
|
|
|
@ -46,7 +46,7 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
|||
"""
|
||||
Do some initialisation stuff
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
super(AboutForm, self).__init__(parent)
|
||||
application_version = get_application_version()
|
||||
self.setupUi(self)
|
||||
about_text = self.about_text_edit.toPlainText()
|
||||
|
|
|
@ -57,7 +57,7 @@ class AdvancedTab(SettingsTab):
|
|||
self.data_exists = False
|
||||
self.icon_path = u':/system/system_settings.png'
|
||||
advanced_translated = translate('OpenLP.AdvancedTab', 'Advanced')
|
||||
SettingsTab.__init__(self, parent, u'Advanced', advanced_translated)
|
||||
super(AdvancedTab, self).__init__(parent, u'Advanced', advanced_translated)
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
|
|
|
@ -117,7 +117,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
|||
"""
|
||||
Constructor.
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
super(ExceptionForm, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.settings_section = u'crashreport'
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class FirstTimeLanguageForm(QtGui.QDialog, Ui_FirstTimeLanguageDialog):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
super(FirstTimeLanguageForm, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.qmList = LanguageManager.get_qm_list()
|
||||
self.language_combo_box.addItem(u'Autodetect')
|
||||
|
|
|
@ -46,7 +46,7 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
super(FormattingTagForm, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.tag_table_widget.itemSelectionChanged.connect(self.on_row_selected)
|
||||
self.new_push_button.clicked.connect(self.on_new_clicked)
|
||||
|
|
|
@ -49,7 +49,7 @@ class GeneralTab(SettingsTab):
|
|||
self.screens = ScreenList()
|
||||
self.icon_path = u':/icon/openlp-logo-16x16.png'
|
||||
general_translated = translate('OpenLP.GeneralTab', 'General')
|
||||
SettingsTab.__init__(self, parent, u'Core', general_translated)
|
||||
super(GeneralTab, self).__init__(parent, u'Core', general_translated)
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
|
|
|
@ -475,7 +475,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||
"""
|
||||
This constructor sets up the interface, the various managers, and the plugins.
|
||||
"""
|
||||
QtGui.QMainWindow.__init__(self)
|
||||
super(MainWindow, self).__init__()
|
||||
Registry().register(u'main_window', self)
|
||||
self.clipboard = self.application.clipboard()
|
||||
self.arguments = self.application.args
|
||||
|
|
|
@ -53,7 +53,7 @@ class MediaSlider(QtGui.QSlider):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QSlider.__init__(self, direction)
|
||||
super(MediaSlider, self).__init__(direction)
|
||||
self.manager = manager
|
||||
self.controller = controller
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class PhononPlayer(MediaPlayer):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
MediaPlayer.__init__(self, parent, u'phonon')
|
||||
super(PhononPlayer, self).__init__(parent, u'phonon')
|
||||
self.original_name = u'Phonon'
|
||||
self.display_name = u'&Phonon'
|
||||
self.parent = parent
|
||||
|
|
|
@ -59,7 +59,7 @@ class PlayerTab(SettingsTab):
|
|||
self.saved_used_players = None
|
||||
self.icon_path = u':/media/multimedia-player.png'
|
||||
player_translated = translate('OpenLP.PlayerTab', 'Players')
|
||||
SettingsTab.__init__(self, parent, u'Players', player_translated)
|
||||
super(PlayerTab, self).__init__(parent, u'Players', player_translated)
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
|
|
|
@ -98,15 +98,14 @@ VIDEO_EXT = [
|
|||
|
||||
class VlcPlayer(MediaPlayer):
|
||||
"""
|
||||
A specialised version of the MediaPlayer class, which provides a VLC
|
||||
display.
|
||||
A specialised version of the MediaPlayer class, which provides a VLC display.
|
||||
"""
|
||||
|
||||
def __init__(self, parent):
|
||||
"""
|
||||
Constructor
|
||||
"""
|
||||
MediaPlayer.__init__(self, parent, u'vlc')
|
||||
super(VlcPlayer, self).__init__(parent, u'vlc')
|
||||
self.original_name = u'VLC'
|
||||
self.display_name = u'&VLC'
|
||||
self.parent = parent
|
||||
|
|
|
@ -213,7 +213,7 @@ class WebkitPlayer(MediaPlayer):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
MediaPlayer.__init__(self, parent, u'webkit')
|
||||
super(WebkitPlayer, self).__init__(parent, u'webkit')
|
||||
self.original_name = u'WebKit'
|
||||
self.display_name = u'&WebKit'
|
||||
self.parent = parent
|
||||
|
|
|
@ -48,7 +48,7 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
super(PluginForm, self).__init__(parent)
|
||||
self.activePlugin = None
|
||||
self.programaticChange = False
|
||||
self.setupUi(self)
|
||||
|
|
|
@ -118,7 +118,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, Registry().get('main_window'))
|
||||
super(PrintServiceForm, self).__init__(Registry().get('main_window'))
|
||||
self.printer = QtGui.QPrinter()
|
||||
self.print_dialog = QtGui.QPrintDialog(self.printer, self)
|
||||
self.document = QtGui.QTextDocument()
|
||||
|
|
|
@ -295,7 +295,7 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog):
|
|||
"""
|
||||
Sets up the service manager, toolbars, list view, et al.
|
||||
"""
|
||||
QtGui.QWidget.__init__(self, parent)
|
||||
super(ServiceManager, self).__init__(parent)
|
||||
self.active = build_icon(u':/media/auto-start_active.png')
|
||||
self.inactive = build_icon(u':/media/auto-start_inactive.png')
|
||||
Registry().register(u'service_manager', self)
|
||||
|
|
|
@ -51,7 +51,7 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||
"""
|
||||
Registry().register(u'settings_form', self)
|
||||
Registry().register_function(u'bootstrap_post_set_up', self.post_set_up)
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
super(SettingsForm, self).__init__(parent)
|
||||
self.processes = []
|
||||
self.setupUi(self)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class SplashScreen(QtGui.QSplashScreen):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QSplashScreen.__init__(self)
|
||||
super(SplashScreen, self).__init__()
|
||||
self.setupUi()
|
||||
|
||||
def setupUi(self):
|
||||
|
|
|
@ -58,7 +58,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||
``parent``
|
||||
The QWidget-derived parent of the wizard.
|
||||
"""
|
||||
QtGui.QWizard.__init__(self, parent)
|
||||
super(ThemeForm, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.registerFields()
|
||||
self.updateThemeAllowed = True
|
||||
|
|
|
@ -42,7 +42,7 @@ class ThemeLayoutForm(QtGui.QDialog, Ui_ThemeLayoutDialog):
|
|||
"""
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
super(ThemeLayoutForm, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
def exec_(self, image):
|
||||
|
|
Loading…
Reference in New Issue