From 6a99a9e1406c4d6e8ad0a15da4c307dad5d37301 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 16 Mar 2013 20:52:59 +0000 Subject: [PATCH] Changes made --- openlp/core/lib/settingstab.py | 3 +- openlp/core/ui/generaltab.py | 11 ++-- openlp/core/ui/media/playertab.py | 2 +- openlp/core/ui/settingsdialog.py | 44 ++++++------- openlp/core/ui/settingsform.py | 63 +++++++++---------- openlp/core/ui/themestab.py | 2 +- openlp/plugins/alerts/alertsplugin.py | 4 +- openlp/plugins/alerts/lib/alertstab.py | 18 +++--- openlp/plugins/bibles/lib/biblestab.py | 20 +++--- openlp/plugins/custom/lib/customtab.py | 4 +- openlp/plugins/images/lib/imagetab.py | 39 ++++++------ openlp/plugins/media/lib/mediatab.py | 10 +-- .../presentations/lib/presentationtab.py | 2 +- openlp/plugins/remotes/lib/remotetab.py | 16 ++--- 14 files changed, 118 insertions(+), 120 deletions(-) diff --git a/openlp/core/lib/settingstab.py b/openlp/core/lib/settingstab.py index 4694dae86..6483ae22b 100644 --- a/openlp/core/lib/settingstab.py +++ b/openlp/core/lib/settingstab.py @@ -39,8 +39,7 @@ from openlp.core.lib import Registry class SettingsTab(QtGui.QWidget): """ - SettingsTab is a helper widget for plugins to define Tabs for the settings - dialog. + SettingsTab is a helper widget for plugins to define Tabs for the settings dialog. """ def __init__(self, parent, title, visible_title=None, icon_path=None): """ diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index 73d658ef1..b8198634a 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -47,7 +47,7 @@ class GeneralTab(SettingsTab): Initialise the general settings tab """ self.screens = ScreenList() - self.iconPath = u':/icon/openlp-logo-16x16.png' + self.icon_path = u':/icon/openlp-logo-16x16.png' general_translated = translate('OpenLP.GeneralTab', 'General') SettingsTab.__init__(self, parent, u'General', general_translated) @@ -57,7 +57,7 @@ class GeneralTab(SettingsTab): """ self.setObjectName(u'GeneralTab') SettingsTab.setupUi(self) - self.tabLayout.setStretch(1, 1) + self.tab_layout.setStretch(1, 1) # Monitors self.monitor_group_box = QtGui.QGroupBox(self.left_column) self.monitor_group_box.setObjectName(u'monitor_group_box') @@ -226,7 +226,7 @@ class GeneralTab(SettingsTab): self.timeout_label.setText(translate('OpenLP.GeneralTab', 'Timed slide interval:')) self.timeout_spin_box.setSuffix(translate('OpenLP.GeneralTab', ' sec')) self.ccli_group_box.setTitle(translate('OpenLP.GeneralTab', 'CCLI Details')) - self.number_label.setText(UiStrings().CCLInumber_label) + self.number_label.setText(UiStrings().CCLINumberLabel) self.username_label.setText(translate('OpenLP.GeneralTab', 'SongSelect username:')) self.password_label.setText(translate('OpenLP.GeneralTab', 'SongSelect password:')) # Moved from display tab @@ -244,7 +244,7 @@ class GeneralTab(SettingsTab): Load the settings to populate the form """ settings = Settings() - settings.beginGroup(self.settingsSection) + settings.beginGroup(self.settings_section) self.monitor_combo_box.clear() self.monitor_combo_box.addItems(self.screens.get_screen_list()) monitorNumber = settings.value(u'monitor') @@ -276,14 +276,13 @@ class GeneralTab(SettingsTab): self.custom_height_value_edit.setEnabled(self.override_radio_button.isChecked()) self.custom_width_value_edit.setEnabled(self.override_radio_button.isChecked()) self.display_changed = False - settings.beginGroup(self.settingsSection) def save(self): """ Save the settings from the form """ settings = Settings() - settings.beginGroup(self.settingsSection) + settings.beginGroup(self.settings_section) settings.setValue(u'monitor', self.monitor_combo_box.currentIndex()) settings.setValue(u'display on monitor', self.display_on_monitor_check.isChecked()) settings.setValue(u'blank warning', self.warning_check_box.isChecked()) diff --git a/openlp/core/ui/media/playertab.py b/openlp/core/ui/media/playertab.py index 714d457c0..896e75b40 100644 --- a/openlp/core/ui/media/playertab.py +++ b/openlp/core/ui/media/playertab.py @@ -36,7 +36,7 @@ from openlp.core.lib.ui import create_button from openlp.core.ui.media import get_media_players, set_media_players -class MediaQ_check_box(QtGui.Q_check_box): +class MediaQ_check_box(QtGui.QCheckBox): """ MediaQ_check_box adds an extra property, playerName to the Q_check_box class. """ diff --git a/openlp/core/ui/settingsdialog.py b/openlp/core/ui/settingsdialog.py index fd61ae612..4c32da69e 100644 --- a/openlp/core/ui/settingsdialog.py +++ b/openlp/core/ui/settingsdialog.py @@ -39,32 +39,32 @@ class Ui_SettingsDialog(object): """ The UI widgets of the settings dialog. """ - def setupUi(self, settingsDialog): + def setupUi(self, settings_dialog): """ Set up the UI """ - settingsDialog.setObjectName(u'settingsDialog') - settingsDialog.resize(800, 500) - settingsDialog.setWindowIcon(build_icon(u':/system/system_settings.png')) - self.dialogLayout = QtGui.QGridLayout(settingsDialog) - self.dialogLayout.setObjectName(u'dialog_layout') - self.dialogLayout.setMargin(8) - self.settingListWidget = QtGui.QListWidget(settingsDialog) - self.settingListWidget.setUniformItemSizes(True) - self.settingListWidget.setMinimumSize(QtCore.QSize(150, 0)) - self.settingListWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) - self.settingListWidget.setObjectName(u'settingListWidget') - self.dialogLayout.addWidget(self.settingListWidget, 0, 0, 1, 1) - self.stackedLayout = QtGui.QStackedLayout() - self.stackedLayout.setObjectName(u'stackedLayout') - self.dialogLayout.addLayout(self.stackedLayout, 0, 1, 1, 1) - self.button_box = create_button_box(settingsDialog, u'button_box', [u'cancel', u'ok']) - self.dialogLayout.addWidget(self.button_box, 1, 1, 1, 1) - self.retranslateUi(settingsDialog) - self.settingListWidget.currentRowChanged.connect(self.tabChanged) + settings_dialog.setObjectName(u'settings_dialog') + settings_dialog.resize(800, 500) + settings_dialog.setWindowIcon(build_icon(u':/system/system_settings.png')) + self.dialog_layout = QtGui.QGridLayout(settings_dialog) + self.dialog_layout.setObjectName(u'dialog_layout') + self.dialog_layout.setMargin(8) + self.setting_list_widget = QtGui.QListWidget(settings_dialog) + self.setting_list_widget.setUniformItemSizes(True) + self.setting_list_widget.setMinimumSize(QtCore.QSize(150, 0)) + self.setting_list_widget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) + self.setting_list_widget.setObjectName(u'setting_list_widget') + self.dialog_layout.addWidget(self.setting_list_widget, 0, 0, 1, 1) + self.stacked_layout = QtGui.QStackedLayout() + self.stacked_layout.setObjectName(u'stacked_layout') + self.dialog_layout.addLayout(self.stacked_layout, 0, 1, 1, 1) + self.button_box = create_button_box(settings_dialog, u'button_box', [u'cancel', u'ok']) + self.dialog_layout.addWidget(self.button_box, 1, 1, 1, 1) + self.retranslateUi(settings_dialog) + self.setting_list_widget.currentRowChanged.connect(self.tab_changed) - def retranslateUi(self, settingsDialog): + def retranslateUi(self, settings_dialog): """ Translate the UI on the fly """ - settingsDialog.setWindowTitle(translate('OpenLP.SettingsForm', 'Configure OpenLP')) + settings_dialog.setWindowTitle(translate('OpenLP.SettingsForm', 'Configure OpenLP')) diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py index f03bc228e..50ada28d1 100644 --- a/openlp/core/ui/settingsform.py +++ b/openlp/core/ui/settingsform.py @@ -60,46 +60,45 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): Execute the form """ # load all the settings - self.settingListWidget.clear() - while self.stackedLayout.count(): + self.setting_list_widget.clear() + while self.stacked_layout.count(): # take at 0 and the rest shuffle up. - self.stackedLayout.takeAt(0) - self.insertTab(self.generalTab, 0, PluginStatus.Active) - self.insertTab(self.themesTab, 1, PluginStatus.Active) - self.insertTab(self.advancedTab, 2, PluginStatus.Active) - self.insertTab(self.playerTab, 3, PluginStatus.Active) + self.stacked_layout.takeAt(0) + self.insert_tab(self.general_tab, 0, PluginStatus.Active) + self.insert_tab(self.themes_tab, 1, PluginStatus.Active) + self.insert_tab(self.advanced_tab, 2, PluginStatus.Active) + self.insert_tab(self.player_tab, 3, PluginStatus.Active) count = 4 for plugin in self.plugin_manager.plugins: if plugin.settingsTab: - self.insertTab(plugin.settingsTab, count, plugin.status) + self.insert_tab(plugin.settingsTab, count, plugin.status) count += 1 - self.settingListWidget.setCurrentRow(0) + self.setting_list_widget.setCurrentRow(0) return QtGui.QDialog.exec_(self) - def insertTab(self, tab, location, is_active): + def insert_tab(self, tab, location, is_active): """ Add a tab to the form at a specific location """ - log.debug(u'Inserting %s tab' % tab.tabTitle) + log.debug(u'Inserting %s tab' % tab.tab_title) # add the tab to get it to display in the correct part of the screen - pos = self.stackedLayout.addWidget(tab) + pos = self.stacked_layout.addWidget(tab) if is_active: - item_name = QtGui.QListWidgetItem(tab.tabTitleVisible) - icon = build_icon(tab.iconPath) + item_name = QtGui.QListWidgetItem(tab.tab_title_visible) + icon = build_icon(tab.icon_path) item_name.setIcon(icon) - self.settingListWidget.insertItem(location, item_name) + self.setting_list_widget.insertItem(location, item_name) else: # then remove tab to stop the UI displaying it even if # it is not required. - self.stackedLayout.takeAt(pos) + self.stacked_layout.takeAt(pos) def accept(self): """ Process the form saving the settings """ - self.resetSuffixes = True - for tabIndex in range(self.stackedLayout.count()): - self.stackedLayout.widget(tabIndex).save() + for tabIndex in range(self.stacked_layout.count()): + self.stacked_layout.widget(tabIndex).save() # Must go after all settings are save while self.processes: Registry().execute(self.processes.pop(0)) @@ -111,8 +110,8 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): Process the form saving the settings """ self.processes = [] - for tabIndex in range(self.stackedLayout.count()): - self.stackedLayout.widget(tabIndex).cancel() + for tabIndex in range(self.stacked_layout.count()): + self.stacked_layout.widget(tabIndex).cancel() return QtGui.QDialog.reject(self) def post_set_up(self): @@ -120,27 +119,27 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): Run any post-setup code for the tabs on the form """ # General tab - self.generalTab = GeneralTab(self) + self.general_tab = GeneralTab(self) # Themes tab - self.themesTab = ThemesTab(self) + self.themes_tab = ThemesTab(self) # Advanced tab - self.advancedTab = AdvancedTab(self) + self.advanced_tab = AdvancedTab(self) # Advanced tab - self.playerTab = PlayerTab(self) - self.generalTab.post_set_up() - self.themesTab.post_set_up() - self.advancedTab.post_set_up() - self.playerTab.post_set_up() + self.player_tab = PlayerTab(self) + self.general_tab.post_set_up() + self.themes_tab.post_set_up() + self.advanced_tab.post_set_up() + self.player_tab.post_set_up() for plugin in self.plugin_manager.plugins: if plugin.settingsTab: plugin.settingsTab.post_set_up() - def tabChanged(self, tabIndex): + def tab_changed(self, tabIndex): """ A different settings tab is selected """ - self.stackedLayout.setCurrentIndex(tabIndex) - self.stackedLayout.currentWidget().tabVisible() + self.stacked_layout.setCurrentIndex(tabIndex) + self.stacked_layout.currentWidget().tabVisible() def register_post_process(self, function): """ diff --git a/openlp/core/ui/themestab.py b/openlp/core/ui/themestab.py index 6db938ab5..7e1f486b8 100644 --- a/openlp/core/ui/themestab.py +++ b/openlp/core/ui/themestab.py @@ -44,9 +44,9 @@ class ThemesTab(SettingsTab): """ Constructor """ + self.icon_path = u':/themes/theme_new.png' theme_translated = translate('OpenLP.ThemesTab', 'Themes') SettingsTab._init_(self, parent, u'Themes', theme_translated) - self.icon_path = u':/themes/theme_new.png' def setupUi(self): """ diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py index 9b792e9c3..15516d054 100644 --- a/openlp/plugins/alerts/alertsplugin.py +++ b/openlp/plugins/alerts/alertsplugin.py @@ -210,7 +210,7 @@ class AlertsPlugin(Plugin): """ align = VerticalType.Names[self.settingsTab.location] return CSS % (align, self.settingsTab.font_face, self.settingsTab.font_size, self.settingsTab.font_color, - self.settingsTab.bg_color) + self.settingsTab.background_color) def getDisplayHtml(self): """ @@ -228,4 +228,4 @@ class AlertsPlugin(Plugin): align = VerticalType.Names[self.settingsTab.location] frame.evaluateJavaScript(u'update_css("%s", "%s", "%s", "%s", "%s")' % (align, self.settingsTab.font_face, self.settingsTab.font_size, - self.settingsTab.font_color, self.settingsTab.bg_color)) + self.settingsTab.font_color, self.settingsTab.background_color)) diff --git a/openlp/plugins/alerts/lib/alertstab.py b/openlp/plugins/alerts/lib/alertstab.py index 2e9a1e52f..c4ae93c0d 100644 --- a/openlp/plugins/alerts/lib/alertstab.py +++ b/openlp/plugins/alerts/lib/alertstab.py @@ -43,7 +43,7 @@ class AlertsTab(SettingsTab): def setupUi(self): self.setObjectName(u'AlertsTab') SettingsTab.setupUi(self) - self.font_group_box = QtGui.QGroupBox(self.leftColumn) + self.font_group_box = QtGui.QGroupBox(self.left_column) self.font_group_box.setObjectName(u'font_group_box') self.font_layout = QtGui.QFormLayout(self.font_group_box) self.font_layout.setObjectName(u'font_layout') @@ -84,7 +84,7 @@ class AlertsTab(SettingsTab): self.font_layout.addRow(self.vertical_label, self.vertical_combo_box) self.left_layout.addWidget(self.font_group_box) self.left_layout.addStretch() - self.preview_group_box = QtGui.QGroupBox(self.rightColumn) + self.preview_group_box = QtGui.QGroupBox(self.right_column) self.preview_group_box.setObjectName(u'preview_group_box') self.preview_layout = QtGui.QVBoxLayout(self.preview_group_box) self.preview_layout.setObjectName(u'preview_layout') @@ -95,10 +95,10 @@ class AlertsTab(SettingsTab): self.right_layout.addStretch() # Signals and slots self.background_color_button.clicked.connect(self.on_background_color_button_clicked) - self.font_color_button.clicked.connect(self.onFontColor_button_clicked) - self.font_combo_box.activated.connect(self.onFontcombo_box_clicked) - self.timeout_spin_box.valueChanged.connect(self.onTimeout_spin_box_changed) - self.font_size_spin_box.valueChanged.connect(self.onfont_size_spin_box_changed) + self.font_color_button.clicked.connect(self.on_font_color_button_clicked) + self.font_combo_box.activated.connect(self.on_font_combo_box_clicked) + self.timeout_spin_box.valueChanged.connect(self.on_timeout_spin_box_changed) + self.font_size_spin_box.valueChanged.connect(self.on_font_size_spin_box_changed) def retranslateUi(self): self.font_group_box.setTitle(translate('AlertsPlugin.AlertsTab', 'Font')) @@ -106,7 +106,7 @@ class AlertsTab(SettingsTab): self.font_color_label.setText(translate('AlertsPlugin.AlertsTab', 'Font color:')) self.background_color_label.setText(translate('AlertsPlugin.AlertsTab', 'Background color:')) self.font_size_label.setText(translate('AlertsPlugin.AlertsTab', 'Font size:')) - self.font_size_spin_box.setSuffix(UiStrings().font_sizePtUnit) + self.font_size_spin_box.setSuffix(UiStrings().FontSizePtUnit) self.timeout_label.setText(translate('AlertsPlugin.AlertsTab', 'Alert timeout:')) self.timeout_spin_box.setSuffix(UiStrings().Seconds) self.preview_group_box.setTitle(UiStrings().Preview) @@ -139,7 +139,7 @@ class AlertsTab(SettingsTab): def load(self): settings = Settings() - settings.beginGroup(self.settingsSection) + settings.beginGroup(self.settings_section) self.timeout = settings.value(u'timeout') self.font_color = settings.value(u'font color') self.font_size = settings.value(u'font size') @@ -160,7 +160,7 @@ class AlertsTab(SettingsTab): def save(self): settings = Settings() - settings.beginGroup(self.settingsSection) + settings.beginGroup(self.settings_section) # Check value has changed as no event handles this field if settings.value(u'location') != self.vertical_combo_box.currentIndex(): self.changed = True diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index 1b4a8e699..cf556b303 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -123,14 +123,14 @@ class BiblesTab(SettingsTab): self.language_selection_group_box = QtGui.QGroupBox(self.right_column) self.language_selection_group_box.setObjectName(u'language_selection_group_box') self.language_selection_layout = QtGui.QVBoxLayout(self.language_selection_group_box) - self.language_selection_label = QtGui.QLabel(self.language_selectiongroup_box) + self.language_selection_label = QtGui.QLabel(self.language_selection_group_box) self.language_selection_label.setObjectName(u'language_selection_label') self.language_selection_combo_box = QtGui.QComboBox(self.language_selection_group_box) self.language_selection_combo_box.setObjectName(u'language_selection_combo_box') self.language_selection_combo_box.addItems([u'', u'', u'']) self.language_selection_layout.addWidget(self.language_selection_label) self.language_selection_layout.addWidget(self.language_selection_combo_box) - self.right_layout.addWidget(self.language_selectiongroup_box) + self.right_layout.addWidget(self.language_selection_group_box) self.left_layout.addStretch() self.right_layout.addStretch() # Signals and slots @@ -152,12 +152,12 @@ class BiblesTab(SettingsTab): self.end_separator_line_edit.textEdited.connect(self.on_end_separator_line_edit_edited) self.end_separator_line_edit.editingFinished.connect(self.on_end_separator_line_edit_finished) Registry().register_function(u'theme_update_list', self.update_theme_list) - self.language_selectioncombo_box.activated.connect(self.on_language_selection_combo_box_changed) + self.language_selection_combo_box.activated.connect(self.on_language_selection_combo_box_changed) def retranslateUi(self): self.verse_display_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Verse Display')) self.new_chapters_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Only show new chapter numbers')) - self.layout_style_label.setText(UiStrings()._layout_style_) + self.layout_style_label.setText(UiStrings().LayoutStyle) self.display_style_label.setText(UiStrings().DisplayStyle) self.bible_theme_label.setText(translate('BiblesPlugin.BiblesTab', 'Bible theme:')) self.layout_style_combo_box.setItemText(LayoutStyle.VersePerSlide, UiStrings().VersePerSlide) @@ -186,14 +186,14 @@ class BiblesTab(SettingsTab): self.range_separator_line_edit.setToolTip(tip_text) self.list_separator_line_edit.setToolTip(tip_text) self.end_separator_line_edit.setToolTip(tip_text) - self.language_selectiongroup_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Default Bible Language')) + self.language_selection_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Default Bible Language')) self.language_selection_label.setText(translate('BiblesPlugin.BiblesTab', 'Book name language in search field,\nsearch results and on display:')) - self.language_selectioncombo_box.setItemText(LanguageSelection.Bible, + self.language_selection_combo_box.setItemText(LanguageSelection.Bible, translate('BiblesPlugin.BiblesTab', 'Bible Language')) - self.language_selectioncombo_box.setItemText(LanguageSelection.Application, + self.language_selection_combo_box.setItemText(LanguageSelection.Application, translate('BiblesPlugin.BiblesTab', 'Application Language')) - self.language_selectioncombo_box.setItemText(LanguageSelection.English, + self.language_selection_combo_box.setItemText(LanguageSelection.English, translate('BiblesPlugin.BiblesTab', 'English')) def on_bible_theme_combo_box_changed(self): @@ -298,7 +298,7 @@ class BiblesTab(SettingsTab): def load(self): settings = Settings() - settings.beginGroup(self.settingsSection) + settings.beginGroup(self.settings_section) self.show_new_chapters = settings.value(u'display new chapter') self.display_style = settings.value(u'display brackets') self.layout_style = settings.value(u'verse layout style') @@ -345,7 +345,7 @@ class BiblesTab(SettingsTab): self.end_separator_line_edit.setPalette(self.getGreyTextPalette(False)) self.end_separator_check_box.setChecked(True) self.language_selection = settings.value(u'book name language') - self.language_selectioncombo_box.setCurrentIndex(self.language_selection) + self.language_selection_combo_box.setCurrentIndex(self.language_selection) settings.endGroup() def save(self): diff --git a/openlp/plugins/custom/lib/customtab.py b/openlp/plugins/custom/lib/customtab.py index 33afc9c61..318706be0 100644 --- a/openlp/plugins/custom/lib/customtab.py +++ b/openlp/plugins/custom/lib/customtab.py @@ -81,7 +81,7 @@ class CustomTab(SettingsTab): def load(self): settings = Settings() - settings.beginGroup(self.settingsSection) + settings.beginGroup(self.settings_section) self.display_footer = settings.value(u'display footer') self.update_load = settings.value(u'add custom from service') self.display_footer_check_box.setChecked(self.display_footer) @@ -90,7 +90,7 @@ class CustomTab(SettingsTab): def save(self): settings = Settings() - settings.beginGroup(self.settingsSection) + settings.beginGroup(self.settings_section) settings.setValue(u'display footer', self.display_footer) settings.setValue(u'add custom from service', self.update_load) settings.endGroup() diff --git a/openlp/plugins/images/lib/imagetab.py b/openlp/plugins/images/lib/imagetab.py index f20bc8d3d..25a9983aa 100644 --- a/openlp/plugins/images/lib/imagetab.py +++ b/openlp/plugins/images/lib/imagetab.py @@ -27,9 +27,10 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui + +from openlp.core.lib import SettingsTab, Settings, UiStrings, translate -from openlp.core.lib import SettingsTab, Registry, Settings, UiStrings, translate class ImageTab(SettingsTab): """ @@ -42,15 +43,15 @@ class ImageTab(SettingsTab): self.setObjectName(u'ImagesTab') SettingsTab.setupUi(self) self.background_color_group_box = QtGui.QGroupBox(self.left_column) - self.background_color_group_box.setObjectName(u'FontGroupBox') - self.form_layout = QtGui.QForm_layout(self.background_color_group_box) - self.form_layout.setObjectName(u'Form_layout') - self.color_layout = QtGui.QHBox_layout() + self.background_color_group_box.setObjectName(u'background_color_group_box') + self.form_layout = QtGui.QFormLayout(self.background_color_group_box) + self.form_layout.setObjectName(u'form_layout') + self.color_layout = QtGui.QHBoxLayout() self.background_color_label = QtGui.QLabel(self.background_color_group_box) - self.background_color_label.setObjectName(u'BackgroundColor_label') + self.background_color_label.setObjectName(u'background_color_label') self.color_layout.addWidget(self.background_color_label) self.background_color_button = QtGui.QPushButton(self.background_color_group_box) - self.background_color_button.setObjectName(u'BackgroundColor_button') + self.background_color_button.setObjectName(u'background_color_button') self.color_layout.addWidget(self.background_color_button) self.form_layout.addRow(self.color_layout) self.information_label = QtGui.QLabel(self.background_color_group_box) @@ -70,24 +71,24 @@ class ImageTab(SettingsTab): self.information_label.setText( translate('ImagesPlugin.ImageTab', 'Visible background for images with aspect ratio different to screen.')) - def on_background_color_button_licked(self): - new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.bg_color), self) + def on_background_color_button_clicked(self): + new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.background_color), self) if new_color.isValid(): - self.bg_color = new_color.name() - self.background_color_button.setStyleSheet(u'background-color: %s' % self.bg_color) + self.background_color = new_color.name() + self.background_color_button.setStyleSheet(u'background-color: %s' % self.background_color) def load(self): settings = Settings() - settings.beginGroup(self.settingsSection) - self.bg_color = settings.value(u'background color') - self.initial_color = self.bg_color + settings.beginGroup(self.settings_section) + self.background_color = settings.value(u'background color') + self.initial_color = self.background_color settings.endGroup() - self.background_color_button.setStyleSheet(u'background-color: %s' % self.bg_color) + self.background_color_button.setStyleSheet(u'background-color: %s' % self.background_color) def save(self): settings = Settings() - settings.beginGroup(self.settingsSection) - settings.setValue(u'background color', self.bg_color) + settings.beginGroup(self.setting_sSection) + settings.setValue(u'background color', self.background_color) settings.endGroup() - if self.initial_color != self.bg_color: + if self.initial_color != self.background_color: self.settings_form.register_post_process(u'image_updated') diff --git a/openlp/plugins/media/lib/mediatab.py b/openlp/plugins/media/lib/mediatab.py index 92982e16f..795541f03 100644 --- a/openlp/plugins/media/lib/mediatab.py +++ b/openlp/plugins/media/lib/mediatab.py @@ -32,7 +32,7 @@ from PyQt4 import QtGui from openlp.core.lib import Settings, SettingsTab, UiStrings, translate -class MediaQ_check_box(QtGui.Q_check_box): +class MediaQ_check_box(QtGui.QCheckBox): """ MediaQ_check_box adds an extra property, playerName to the Q_check_box class. """ @@ -51,7 +51,7 @@ class MediaTab(SettingsTab): def setupUi(self): self.setObjectName(u'MediaTab') SettingsTab.setupUi(self) - self.advanced_group_box = QtGui.QGroupBbox(self.leftColumn) + self.advanced_group_box = QtGui.QGroupBox(self.left_column) self.advanced_group_box.setObjectName(u'advanced_group_box') self.advanced_layout = QtGui.QVBoxLayout(self.advanced_group_box) self.advanced_layout.setObjectName(u'advanced_layout') @@ -71,11 +71,11 @@ class MediaTab(SettingsTab): self.auto_start_check_box.setText(translate('MediaPlugin.MediaTab', 'Start Live items automatically')) def load(self): - self.override_player_check_box.setChecked(Settings().value(self.settingsSection + u'/override player')) - self.auto_start_check_box.setChecked(Settings().value(self.settingsSection + u'/media auto start')) + self.override_player_check_box.setChecked(Settings().value(self.settings_section + u'/override player')) + self.auto_start_check_box.setChecked(Settings().value(self.settings_section + u'/media auto start')) def save(self): - setting_key = self.settingsSection + u'/override player' + setting_key = self.settings_section + u'/override player' if Settings().value(setting_key) != self.override_player_check_box.checkState(): Settings().setValue(setting_key, self.override_player_check_box.checkState()) self.settings_form.register_post_process(u'mediaitem_suffix_reset') diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py index 1ddb14b79..93321ce8c 100644 --- a/openlp/plugins/presentations/lib/presentationtab.py +++ b/openlp/plugins/presentations/lib/presentationtab.py @@ -63,7 +63,7 @@ class PresentationTab(SettingsTab): self.presenter_check_boxes[controller.name] = checkbox self.controllers_layout.addWidget(checkbox) self.left_layout.addWidget(self.controllers_group_box) - self.advanced_group_box = QtGui.QGroupBox(self.leftColumn) + self.advanced_group_box = QtGui.QGroupBox(self.left_column) self.advanced_group_box.setObjectName(u'advanced_group_box') self.advanced_layout = QtGui.QVBoxLayout(self.advanced_group_box) self.advanced_layout.setObjectName(u'advanced_layout') diff --git a/openlp/plugins/remotes/lib/remotetab.py b/openlp/plugins/remotes/lib/remotetab.py index 4a4379773..55c8f9bb0 100644 --- a/openlp/plugins/remotes/lib/remotetab.py +++ b/openlp/plugins/remotes/lib/remotetab.py @@ -135,20 +135,20 @@ class RemoteTab(SettingsTab): self.stage_url.setText(u'%s' % (url, url)) def load(self): - self.port_spin_box.setValue(Settings().value(self.settingsSection + u'/port')) - self.address_edit.setText(Settings().value(self.settingsSection + u'/ip address')) - self.twelve_hour = Settings().value(self.settingsSection + u'/twelve hour') + self.port_spin_box.setValue(Settings().value(self.settings_section + u'/port')) + self.address_edit.setText(Settings().value(self.settings_section + u'/ip address')) + self.twelve_hour = Settings().value(self.settings_section + u'/twelve hour') self.twelve_hour_check_box.setChecked(self.twelve_hour) self.set_urls() def save(self): changed = False - if Settings().value(self.settingsSection + u'/ip address') != self.address_edit.text() or \ - Settings().value(self.settingsSection + u'/port') != self.port_spin_box.value(): + if Settings().value(self.settings_section + u'/ip address') != self.address_edit.text() or \ + Settings().value(self.settings_section + u'/port') != self.port_spin_box.value(): changed = True - Settings().setValue(self.settingsSection + u'/port', self.port_spin_box.value()) - Settings().setValue(self.settingsSection + u'/ip address', self.address_edit.text()) - Settings().setValue(self.settingsSection + u'/twelve hour', self.twelve_hour) + Settings().setValue(self.settings_section + u'/port', self.port_spin_box.value()) + Settings().setValue(self.settings_section + u'/ip address', self.address_edit.text()) + Settings().setValue(self.settings_section + u'/twelve hour', self.twelve_hour) if changed: Registry().register_function(u'remotes_config_updated')