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