openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19989
[Merge] lp:~trb143/openlp/cleanup into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/cleanup into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~trb143/openlp/cleanup/+merge/153670
debugging
--
https://code.launchpad.net/~trb143/openlp/cleanup/+merge/153670
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/cleanup into lp:openlp.
=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py 2013-02-04 21:39:44 +0000
+++ openlp/core/lib/db.py 2013-03-16 20:56:21 +0000
@@ -342,8 +342,7 @@
if try_count >= 2:
raise
- def get_all_objects(self, object_class, filter_clause=None,
- order_by_ref=None):
+ def get_all_objects(self, object_class, filter_clause=None, order_by_ref=None):
"""
Returns all the objects from the database
=== modified file 'openlp/core/lib/dockwidget.py'
--- openlp/core/lib/dockwidget.py 2013-02-05 08:05:28 +0000
+++ openlp/core/lib/dockwidget.py 2013-03-16 20:56:21 +0000
@@ -28,8 +28,7 @@
###############################################################################
"""
-Provide additional functionality required by OpenLP from the inherited
-QDockWidget.
+Provide additional functionality required by OpenLP from the inherited QDockWidget.
"""
import logging
@@ -56,8 +55,8 @@
self.setWindowIcon(build_icon(icon))
# Sort out the minimum width.
screens = ScreenList()
- mainwindow_docbars = screens.current[u'size'].width() / 5
- if mainwindow_docbars > 300:
+ main_window_docbars = screens.current[u'size'].width() / 5
+ if main_window_docbars > 300:
self.setMinimumWidth(300)
else:
- self.setMinimumWidth(mainwindow_docbars)
+ self.setMinimumWidth(main_window_docbars)
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py 2013-03-07 13:14:31 +0000
+++ openlp/core/lib/plugin.py 2013-03-16 20:56:21 +0000
@@ -214,7 +214,7 @@
you need, and return it for integration into OpenLP.
"""
if self.mediaItemClass:
- self.mediaItem = self.mediaItemClass(self.main_window.mediaDockManager.media_dock, self)
+ self.mediaItem = self.mediaItemClass(self.main_window.media_dock_manager.media_dock, self)
def addImportMenuItem(self, importMenu):
"""
@@ -284,14 +284,14 @@
"""
if self.mediaItem:
self.mediaItem.initialise()
- self.main_window.mediaDockManager.insert_dock(self.mediaItem, self.icon, self.weight)
+ self.main_window.media_dock_manager.insert_dock(self.mediaItem, self.icon, self.weight)
def finalise(self):
"""
Called by the plugin Manager to cleanup things.
"""
if self.mediaItem:
- self.main_window.mediaDockManager.remove_dock(self.mediaItem)
+ self.main_window.media_dock_manager.remove_dock(self.mediaItem)
def app_startup(self):
"""
=== modified file 'openlp/core/lib/settingstab.py'
--- openlp/core/lib/settingstab.py 2013-03-10 20:19:42 +0000
+++ openlp/core/lib/settingstab.py 2013-03-16 20:56:21 +0000
@@ -36,10 +36,10 @@
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):
"""
@@ -52,11 +52,11 @@
The title of the tab, which is usually displayed on the tab.
"""
QtGui.QWidget.__init__(self, parent)
- self.tabTitle = title
- self.tabTitleVisible = visible_title
- self.settingsSection = self.tabTitle.lower()
+ self.tab_title = title
+ self.tab_title_visible = visible_title
+ self.settings_section = self.tab_title.lower()
if icon_path:
- self.iconPath = icon_path
+ self.icon_path = icon_path
self.setupUi()
self.retranslateUi()
self.initialise()
@@ -66,20 +66,20 @@
"""
Setup the tab's interface.
"""
- self.tabLayout = QtGui.QHBoxLayout(self)
- self.tabLayout.setObjectName(u'tabLayout')
- self.leftColumn = QtGui.QWidget(self)
- self.leftColumn.setObjectName(u'leftColumn')
- self.leftLayout = QtGui.QVBoxLayout(self.leftColumn)
- self.leftLayout.setMargin(0)
- self.leftLayout.setObjectName(u'leftLayout')
- self.tabLayout.addWidget(self.leftColumn)
- self.rightColumn = QtGui.QWidget(self)
- self.rightColumn.setObjectName(u'rightColumn')
- self.rightLayout = QtGui.QVBoxLayout(self.rightColumn)
- self.rightLayout.setMargin(0)
- self.rightLayout.setObjectName(u'rightLayout')
- self.tabLayout.addWidget(self.rightColumn)
+ self.tab_layout = QtGui.QHBoxLayout(self)
+ self.tab_layout.setObjectName(u'tab_layout')
+ self.left_column = QtGui.QWidget(self)
+ self.left_column.setObjectName(u'left_column')
+ self.left_layout = QtGui.QVBoxLayout(self.left_column)
+ self.left_layout.setMargin(0)
+ self.left_layout.setObjectName(u'left_layout')
+ self.tab_layout.addWidget(self.left_column)
+ self.right_column = QtGui.QWidget(self)
+ self.right_column.setObjectName(u'right_column')
+ self.right_layout = QtGui.QVBoxLayout(self.right_column)
+ self.right_layout.setMargin(0)
+ self.right_layout.setObjectName(u'right_layout')
+ self.tab_layout.addWidget(self.right_column)
def resizeEvent(self, event=None):
"""
@@ -87,11 +87,11 @@
"""
if event:
QtGui.QWidget.resizeEvent(self, event)
- width = self.width() - self.tabLayout.spacing() - \
- self.tabLayout.contentsMargins().left() - self.tabLayout.contentsMargins().right()
- left_width = min(width - self.rightColumn.minimumSizeHint().width(), width / 2)
- left_width = max(left_width, self.leftColumn.minimumSizeHint().width())
- self.leftColumn.setFixedWidth(left_width)
+ width = self.width() - self.tab_layout.spacing() - \
+ self.tab_layout.contentsMargins().left() - self.tab_layout.contentsMargins().right()
+ left_width = min(width - self.right_column.minimumSizeHint().width(), width / 2)
+ left_width = max(left_width, self.left_column.minimumSizeHint().width())
+ self.left_column.setFixedWidth(left_width)
def retranslateUi(self):
"""
@@ -133,7 +133,7 @@
"""
pass
- def tabVisible(self):
+ def tab_visible(self):
"""
Tab has just been made visible to the user
"""
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2013-03-10 20:35:14 +0000
+++ openlp/core/ui/advancedtab.py 2013-03-16 20:56:21 +0000
@@ -55,7 +55,7 @@
self.default_image = u':/graphics/openlp-splash-screen.png'
self.default_color = u'#ffffff'
self.data_exists = False
- self.iconPath = u':/system/system_settings.png'
+ self.icon_path = u':/system/system_settings.png'
advanced_translated = translate('OpenLP.AdvancedTab', 'Advanced')
SettingsTab.__init__(self, parent, u'Advanced', advanced_translated)
@@ -65,7 +65,7 @@
"""
self.setObjectName(u'AdvancedTab')
SettingsTab.setupUi(self)
- self.ui_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.ui_group_box = QtGui.QGroupBox(self.left_column)
self.ui_group_box.setObjectName(u'ui_group_box')
self.ui_layout = QtGui.QFormLayout(self.ui_group_box)
self.ui_layout.setObjectName(u'ui_layout')
@@ -90,9 +90,9 @@
self.enable_auto_close_check_box = QtGui.QCheckBox(self.ui_group_box)
self.enable_auto_close_check_box.setObjectName(u'enable_auto_close_check_box')
self.ui_layout.addRow(self.enable_auto_close_check_box)
- self.leftLayout.addWidget(self.ui_group_box)
+ self.left_layout.addWidget(self.ui_group_box)
# Default service name
- self.service_name_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.service_name_group_box = QtGui.QGroupBox(self.left_column)
self.service_name_group_box.setObjectName(u'service_name_group_box')
self.service_name_layout = QtGui.QFormLayout(self.service_name_group_box)
self.service_name_check_box = QtGui.QCheckBox(self.service_name_group_box)
@@ -129,9 +129,9 @@
self.service_name_example = QtGui.QLabel(self.service_name_group_box)
self.service_name_example.setObjectName(u'service_name_example')
self.service_name_layout.addRow(self.service_name_example_label, self.service_name_example)
- self.leftLayout.addWidget(self.service_name_group_box)
+ self.left_layout.addWidget(self.service_name_group_box)
# Data Directory
- self.data_directory_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.data_directory_group_box = QtGui.QGroupBox(self.left_column)
self.data_directory_group_box.setObjectName(u'data_directory_group_box')
self.data_directory_layout = QtGui.QFormLayout(self.data_directory_group_box)
self.data_directory_layout.setObjectName(u'data_directory_layout')
@@ -172,10 +172,10 @@
self.data_directory_layout.addRow(self.data_directory_new_label, self.new_data_directory_label_layout)
self.data_directory_layout.addRow(self.data_directory_copy_check_layout)
self.data_directory_layout.addRow(self.new_data_directory_has_files_label)
- self.leftLayout.addWidget(self.data_directory_group_box)
- self.leftLayout.addStretch()
+ self.left_layout.addWidget(self.data_directory_group_box)
+ self.left_layout.addStretch()
# Default Image
- self.default_image_group_box = QtGui.QGroupBox(self.rightColumn)
+ self.default_image_group_box = QtGui.QGroupBox(self.right_column)
self.default_image_group_box.setObjectName(u'default_image_group_box')
self.default_image_layout = QtGui.QFormLayout(self.default_image_group_box)
self.default_image_layout.setObjectName(u'default_image_layout')
@@ -200,18 +200,18 @@
self.default_file_layout.addWidget(self.default_browse_button)
self.default_file_layout.addWidget(self.default_revert_button)
self.default_image_layout.addRow(self.default_file_label, self.default_file_layout)
- self.rightLayout.addWidget(self.default_image_group_box)
+ self.right_layout.addWidget(self.default_image_group_box)
# Hide mouse
- self.hide_mouse_group_box = QtGui.QGroupBox(self.rightColumn)
+ self.hide_mouse_group_box = QtGui.QGroupBox(self.right_column)
self.hide_mouse_group_box.setObjectName(u'hide_mouse_group_box')
self.hide_mouse_layout = QtGui.QVBoxLayout(self.hide_mouse_group_box)
self.hide_mouse_layout.setObjectName(u'hide_mouse_layout')
self.hide_mouse_check_box = QtGui.QCheckBox(self.hide_mouse_group_box)
self.hide_mouse_check_box.setObjectName(u'hide_mouse_check_box')
self.hide_mouse_layout.addWidget(self.hide_mouse_check_box)
- self.rightLayout.addWidget(self.hide_mouse_group_box)
+ self.right_layout.addWidget(self.hide_mouse_group_box)
# Service Item Slide Limits
- self.slide_group_box = QtGui.QGroupBox(self.rightColumn)
+ self.slide_group_box = QtGui.QGroupBox(self.right_column)
self.slide_group_box.setObjectName(u'slide_group_box')
self.slide_layout = QtGui.QVBoxLayout(self.slide_group_box)
self.slide_layout.setObjectName(u'slide_layout')
@@ -227,9 +227,9 @@
self.next_item_radio_button = QtGui.QRadioButton(self.slide_group_box)
self.next_item_radio_button.setObjectName(u'next_item_radio_button')
self.slide_layout.addWidget(self.next_item_radio_button)
- self.rightLayout.addWidget(self.slide_group_box)
+ self.right_layout.addWidget(self.slide_group_box)
# Display Workarounds
- self.display_workaround_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.display_workaround_group_box = QtGui.QGroupBox(self.left_column)
self.display_workaround_group_box.setObjectName(u'display_workaround_group_box')
self.display_workaround_layout = QtGui.QVBoxLayout(self.display_workaround_group_box)
self.display_workaround_layout.setObjectName(u'display_workaround_layout')
@@ -239,8 +239,8 @@
self.alternate_rows_check_box = QtGui.QCheckBox(self.display_workaround_group_box)
self.alternate_rows_check_box.setObjectName(u'alternate_rows_check_box')
self.display_workaround_layout.addWidget(self.alternate_rows_check_box)
- self.rightLayout.addWidget(self.display_workaround_group_box)
- self.rightLayout.addStretch()
+ self.right_layout.addWidget(self.display_workaround_group_box)
+ self.right_layout.addStretch()
self.should_update_service_name_example = False
self.service_name_check_box.toggled.connect(self.service_name_check_box_toggled)
self.service_name_day.currentIndexChanged.connect(self.on_service_name_day_changed)
@@ -259,7 +259,6 @@
self.wrap_slide_radio_button.clicked.connect(self.on_wrap_slide_button_clicked)
self.next_item_radio_button.clicked.connect(self.on_next_item_button_clicked)
-
def retranslateUi(self):
"""
Setup the interface translation strings.
@@ -334,7 +333,7 @@
Load settings from disk.
"""
settings = Settings()
- settings.beginGroup(self.settingsSection)
+ settings.beginGroup(self.settings_section)
# The max recent files value does not have an interface and so never
# gets actually stored in the settings therefore the default value of
# 20 will always be used.
@@ -406,7 +405,7 @@
Save settings to disk.
"""
settings = Settings()
- settings.beginGroup(self.settingsSection)
+ settings.beginGroup(self.settings_section)
settings.setValue(u'default service enabled', self.service_name_check_box.isChecked())
service_name = self.service_name_edit.text()
preset_is_valid = self.generate_service_name_example()[0]
=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py 2013-03-10 20:19:42 +0000
+++ openlp/core/ui/generaltab.py 2013-03-16 20:56:21 +0000
@@ -47,9 +47,9 @@
Initialise the general settings tab
"""
self.screens = ScreenList()
- self.iconPath = u':/icon/openlp-logo-16x16.png'
- generalTranslated = translate('OpenLP.GeneralTab', 'General')
- SettingsTab.__init__(self, parent, u'General', generalTranslated)
+ self.icon_path = u':/icon/openlp-logo-16x16.png'
+ general_translated = translate('OpenLP.GeneralTab', 'General')
+ SettingsTab.__init__(self, parent, u'General', general_translated)
def setupUi(self):
"""
@@ -57,253 +57,252 @@
"""
self.setObjectName(u'GeneralTab')
SettingsTab.setupUi(self)
- self.tabLayout.setStretch(1, 1)
+ self.tab_layout.setStretch(1, 1)
# Monitors
- self.monitorGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.monitorGroupBox.setObjectName(u'monitorGroupBox')
- self.monitorLayout = QtGui.QGridLayout(self.monitorGroupBox)
- self.monitorLayout.setObjectName(u'monitorLayout')
- self.monitorRadioButton = QtGui.QRadioButton(self.monitorGroupBox)
- self.monitorRadioButton.setObjectName(u'monitorRadioButton')
- self.monitorLayout.addWidget(self.monitorRadioButton, 0, 0, 1, 5)
- self.monitorComboBox = QtGui.QComboBox(self.monitorGroupBox)
- self.monitorComboBox.setObjectName(u'monitorComboBox')
- self.monitorLayout.addWidget(self.monitorComboBox, 1, 1, 1, 4)
+ self.monitor_group_box = QtGui.QGroupBox(self.left_column)
+ self.monitor_group_box.setObjectName(u'monitor_group_box')
+ self.monitor_layout = QtGui.QGridLayout(self.monitor_group_box)
+ self.monitor_layout.setObjectName(u'monitor_layout')
+ self.monitor_radio_button = QtGui.QRadioButton(self.monitor_group_box)
+ self.monitor_radio_button.setObjectName(u'monitor_radio_button')
+ self.monitor_layout.addWidget(self.monitor_radio_button, 0, 0, 1, 5)
+ self.monitor_combo_box = QtGui.QComboBox(self.monitor_group_box)
+ self.monitor_combo_box.setObjectName(u'monitor_combo_box')
+ self.monitor_layout.addWidget(self.monitor_combo_box, 1, 1, 1, 4)
# Display Position
- self.overrideRadioButton = QtGui.QRadioButton(self.monitorGroupBox)
- self.overrideRadioButton.setObjectName(u'overrideRadioButton')
- self.monitorLayout.addWidget(self.overrideRadioButton, 2, 0, 1, 5)
+ self.override_radio_button = QtGui.QRadioButton(self.monitor_group_box)
+ self.override_radio_button.setObjectName(u'override_radio_button')
+ self.monitor_layout.addWidget(self.override_radio_button, 2, 0, 1, 5)
# Custom position
- self.customXLabel = QtGui.QLabel(self.monitorGroupBox)
- self.customXLabel.setObjectName(u'customXLabel')
- self.monitorLayout.addWidget(self.customXLabel, 3, 1)
- self.customXValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
- self.customXValueEdit.setObjectName(u'customXValueEdit')
- self.customXValueEdit.setRange(-9999, 9999)
- self.monitorLayout.addWidget(self.customXValueEdit, 4, 1)
- self.customYLabel = QtGui.QLabel(self.monitorGroupBox)
- self.customYLabel.setObjectName(u'customYLabel')
- self.monitorLayout.addWidget(self.customYLabel, 3, 2)
- self.customYValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
- self.customYValueEdit.setObjectName(u'customYValueEdit')
- self.customYValueEdit.setRange(-9999, 9999)
- self.monitorLayout.addWidget(self.customYValueEdit, 4, 2)
- self.customWidthLabel = QtGui.QLabel(self.monitorGroupBox)
- self.customWidthLabel.setObjectName(u'customWidthLabel')
- self.monitorLayout.addWidget(self.customWidthLabel, 3, 3)
- self.customWidthValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
- self.customWidthValueEdit.setObjectName(u'customWidthValueEdit')
- self.customWidthValueEdit.setMaximum(9999)
- self.monitorLayout.addWidget(self.customWidthValueEdit, 4, 3)
- self.customHeightLabel = QtGui.QLabel(self.monitorGroupBox)
- self.customHeightLabel.setObjectName(u'customHeightLabel')
- self.monitorLayout.addWidget(self.customHeightLabel, 3, 4)
- self.customHeightValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
- self.customHeightValueEdit.setObjectName(u'customHeightValueEdit')
- self.customHeightValueEdit.setMaximum(9999)
- self.monitorLayout.addWidget(self.customHeightValueEdit, 4, 4)
- self.displayOnMonitorCheck = QtGui.QCheckBox(self.monitorGroupBox)
- self.displayOnMonitorCheck.setObjectName(u'monitorComboBox')
- self.monitorLayout.addWidget(self.displayOnMonitorCheck, 5, 0, 1, 5)
+ self.custom_x_label = QtGui.QLabel(self.monitor_group_box)
+ self.custom_x_label.setObjectName(u'custom_x_label')
+ self.monitor_layout.addWidget(self.custom_x_label, 3, 1)
+ self.custom_X_value_edit = QtGui.QSpinBox(self.monitor_group_box)
+ self.custom_X_value_edit.setObjectName(u'custom_X_value_edit')
+ self.custom_X_value_edit.setRange(-9999, 9999)
+ self.monitor_layout.addWidget(self.custom_X_value_edit, 4, 1)
+ self.custom_y_label = QtGui.QLabel(self.monitor_group_box)
+ self.custom_y_label.setObjectName(u'custom_y_label')
+ self.monitor_layout.addWidget(self.custom_y_label, 3, 2)
+ self.custom_Y_value_edit = QtGui.QSpinBox(self.monitor_group_box)
+ self.custom_Y_value_edit.setObjectName(u'custom_Y_value_edit')
+ self.custom_Y_value_edit.setRange(-9999, 9999)
+ self.monitor_layout.addWidget(self.custom_Y_value_edit, 4, 2)
+ self.custom_width_label = QtGui.QLabel(self.monitor_group_box)
+ self.custom_width_label.setObjectName(u'custom_width_label')
+ self.monitor_layout.addWidget(self.custom_width_label, 3, 3)
+ self.custom_width_value_edit = QtGui.QSpinBox(self.monitor_group_box)
+ self.custom_width_value_edit.setObjectName(u'custom_width_value_edit')
+ self.custom_width_value_edit.setMaximum(9999)
+ self.monitor_layout.addWidget(self.custom_width_value_edit, 4, 3)
+ self.custom_height_label = QtGui.QLabel(self.monitor_group_box)
+ self.custom_height_label.setObjectName(u'custom_height_label')
+ self.monitor_layout.addWidget(self.custom_height_label, 3, 4)
+ self.custom_height_value_edit = QtGui.QSpinBox(self.monitor_group_box)
+ self.custom_height_value_edit.setObjectName(u'custom_height_value_edit')
+ self.custom_height_value_edit.setMaximum(9999)
+ self.monitor_layout.addWidget(self.custom_height_value_edit, 4, 4)
+ self.display_on_monitor_check = QtGui.QCheckBox(self.monitor_group_box)
+ self.display_on_monitor_check.setObjectName(u'monitor_combo_box')
+ self.monitor_layout.addWidget(self.display_on_monitor_check, 5, 0, 1, 5)
# Set up the stretchiness of each column, so that the first column
# less stretchy (and therefore smaller) than the others
- self.monitorLayout.setColumnStretch(0, 1)
- self.monitorLayout.setColumnStretch(1, 3)
- self.monitorLayout.setColumnStretch(2, 3)
- self.monitorLayout.setColumnStretch(3, 3)
- self.monitorLayout.setColumnStretch(4, 3)
- self.leftLayout.addWidget(self.monitorGroupBox)
+ self.monitor_layout.setColumnStretch(0, 1)
+ self.monitor_layout.setColumnStretch(1, 3)
+ self.monitor_layout.setColumnStretch(2, 3)
+ self.monitor_layout.setColumnStretch(3, 3)
+ self.monitor_layout.setColumnStretch(4, 3)
+ self.left_layout.addWidget(self.monitor_group_box)
# CCLI Details
- self.ccliGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.ccliGroupBox.setObjectName(u'ccliGroupBox')
- self.ccliLayout = QtGui.QFormLayout(self.ccliGroupBox)
- self.ccliLayout.setObjectName(u'ccliLayout')
- self.numberLabel = QtGui.QLabel(self.ccliGroupBox)
- self.numberLabel.setObjectName(u'numberLabel')
- self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox)
- self.numberEdit.setValidator(QtGui.QIntValidator())
- self.numberEdit.setObjectName(u'numberEdit')
- self.ccliLayout.addRow(self.numberLabel, self.numberEdit)
- self.usernameLabel = QtGui.QLabel(self.ccliGroupBox)
- self.usernameLabel.setObjectName(u'usernameLabel')
- self.usernameEdit = QtGui.QLineEdit(self.ccliGroupBox)
- self.usernameEdit.setObjectName(u'usernameEdit')
- self.ccliLayout.addRow(self.usernameLabel, self.usernameEdit)
- self.passwordLabel = QtGui.QLabel(self.ccliGroupBox)
- self.passwordLabel.setObjectName(u'passwordLabel')
- self.passwordEdit = QtGui.QLineEdit(self.ccliGroupBox)
- self.passwordEdit.setEchoMode(QtGui.QLineEdit.Password)
- self.passwordEdit.setObjectName(u'passwordEdit')
- self.ccliLayout.addRow(self.passwordLabel, self.passwordEdit)
- self.leftLayout.addWidget(self.ccliGroupBox)
+ self.ccli_group_box = QtGui.QGroupBox(self.left_column)
+ self.ccli_group_box.setObjectName(u'ccli_group_box')
+ self.ccli_layout = QtGui.QFormLayout(self.ccli_group_box)
+ self.ccli_layout.setObjectName(u'ccli_layout')
+ self.number_label = QtGui.QLabel(self.ccli_group_box)
+ self.number_label.setObjectName(u'number_label')
+ self.number_edit = QtGui.QLineEdit(self.ccli_group_box)
+ self.number_edit.setValidator(QtGui.QIntValidator())
+ self.number_edit.setObjectName(u'number_edit')
+ self.ccli_layout.addRow(self.number_label, self.number_edit)
+ self.username_label = QtGui.QLabel(self.ccli_group_box)
+ self.username_label.setObjectName(u'username_label')
+ self.username_edit = QtGui.QLineEdit(self.ccli_group_box)
+ self.username_edit.setObjectName(u'username_edit')
+ self.ccli_layout.addRow(self.username_label, self.username_edit)
+ self.password_label = QtGui.QLabel(self.ccli_group_box)
+ self.password_label.setObjectName(u'password_label')
+ self.password_edit = QtGui.QLineEdit(self.ccli_group_box)
+ self.password_edit.setEchoMode(QtGui.QLineEdit.Password)
+ self.password_edit.setObjectName(u'password_edit')
+ self.ccli_layout.addRow(self.password_label, self.password_edit)
+ self.left_layout.addWidget(self.ccli_group_box)
# Background audio
- self.audioGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.audioGroupBox.setObjectName(u'audioGroupBox')
- self.audioLayout = QtGui.QVBoxLayout(self.audioGroupBox)
- self.audioLayout.setObjectName(u'audioLayout')
- self.startPausedCheckBox = QtGui.QCheckBox(self.audioGroupBox)
- self.startPausedCheckBox.setObjectName(u'startPausedCheckBox')
- self.audioLayout.addWidget(self.startPausedCheckBox)
- self.repeatListCheckBox = QtGui.QCheckBox(self.audioGroupBox)
- self.repeatListCheckBox.setObjectName(u'repeatListCheckBox')
- self.audioLayout.addWidget(self.repeatListCheckBox)
- self.leftLayout.addWidget(self.audioGroupBox)
- self.leftLayout.addStretch()
+ self.audio_group_box = QtGui.QGroupBox(self.left_column)
+ self.audio_group_box.setObjectName(u'audio_group_box')
+ self.audio_layout = QtGui.QVBoxLayout(self.audio_group_box)
+ self.audio_layout.setObjectName(u'audio_layout')
+ self.start_paused_check_box = QtGui.QCheckBox(self.audio_group_box)
+ self.start_paused_check_box.setObjectName(u'start_paused_check_box')
+ self.audio_layout.addWidget(self.start_paused_check_box)
+ self.repeat_list_check_box = QtGui.QCheckBox(self.audio_group_box)
+ self.repeat_list_check_box.setObjectName(u'repeat_list_check_box')
+ self.audio_layout.addWidget(self.repeat_list_check_box)
+ self.left_layout.addWidget(self.audio_group_box)
+ self.left_layout.addStretch()
# Application Startup
- self.startupGroupBox = QtGui.QGroupBox(self.rightColumn)
- self.startupGroupBox.setObjectName(u'startupGroupBox')
- self.startupLayout = QtGui.QVBoxLayout(self.startupGroupBox)
- self.startupLayout.setObjectName(u'startupLayout')
- self.warningCheckBox = QtGui.QCheckBox(self.startupGroupBox)
- self.warningCheckBox.setObjectName(u'warningCheckBox')
- self.startupLayout.addWidget(self.warningCheckBox)
- self.autoOpenCheckBox = QtGui.QCheckBox(self.startupGroupBox)
- self.autoOpenCheckBox.setObjectName(u'autoOpenCheckBox')
- self.startupLayout.addWidget(self.autoOpenCheckBox)
- self.showSplashCheckBox = QtGui.QCheckBox(self.startupGroupBox)
- self.showSplashCheckBox.setObjectName(u'showSplashCheckBox')
- self.startupLayout.addWidget(self.showSplashCheckBox)
- self.checkForUpdatesCheckBox = QtGui.QCheckBox(self.startupGroupBox)
- self.checkForUpdatesCheckBox.setObjectName(u'checkForUpdatesCheckBox')
- self.startupLayout.addWidget(self.checkForUpdatesCheckBox)
- self.rightLayout.addWidget(self.startupGroupBox)
+ self.startup_group_box = QtGui.QGroupBox(self.right_column)
+ self.startup_group_box.setObjectName(u'startup_group_box')
+ self.startup_layout = QtGui.QVBoxLayout(self.startup_group_box)
+ self.startup_layout.setObjectName(u'startup_layout')
+ self.warning_check_box = QtGui.QCheckBox(self.startup_group_box)
+ self.warning_check_box.setObjectName(u'warning_check_box')
+ self.startup_layout.addWidget(self.warning_check_box)
+ self.auto_open_check_box = QtGui.QCheckBox(self.startup_group_box)
+ self.auto_open_check_box.setObjectName(u'auto_open_check_box')
+ self.startup_layout.addWidget(self.auto_open_check_box)
+ self.show_splash_check_box = QtGui.QCheckBox(self.startup_group_box)
+ self.show_splash_check_box.setObjectName(u'show_splash_check_box')
+ self.startup_layout.addWidget(self.show_splash_check_box)
+ self.check_for_updates_check_box = QtGui.QCheckBox(self.startup_group_box)
+ self.check_for_updates_check_box.setObjectName(u'check_for_updates_check_box')
+ self.startup_layout.addWidget(self.check_for_updates_check_box)
+ self.right_layout.addWidget(self.startup_group_box)
# Application Settings
- self.settingsGroupBox = QtGui.QGroupBox(self.rightColumn)
- self.settingsGroupBox.setObjectName(u'settingsGroupBox')
- self.settingsLayout = QtGui.QFormLayout(self.settingsGroupBox)
- self.settingsLayout.setObjectName(u'settingsLayout')
- self.saveCheckServiceCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
- self.saveCheckServiceCheckBox.setObjectName(u'saveCheckServiceCheckBox')
- self.settingsLayout.addRow(self.saveCheckServiceCheckBox)
- self.autoUnblankCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
- self.autoUnblankCheckBox.setObjectName(u'autoUnblankCheckBox')
- self.settingsLayout.addRow(self.autoUnblankCheckBox)
- self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
- self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox')
- self.settingsLayout.addRow(self.autoPreviewCheckBox)
+ self.settings_group_box = QtGui.QGroupBox(self.right_column)
+ self.settings_group_box.setObjectName(u'settings_group_box')
+ self.settings_layout = QtGui.QFormLayout(self.settings_group_box)
+ self.settings_layout.setObjectName(u'settings_layout')
+ self.save_check_service_check_box = QtGui.QCheckBox(self.settings_group_box)
+ self.save_check_service_check_box.setObjectName(u'save_check_service_check_box')
+ self.settings_layout.addRow(self.save_check_service_check_box)
+ self.auto_unblank_check_box = QtGui.QCheckBox(self.settings_group_box)
+ self.auto_unblank_check_box.setObjectName(u'auto_unblank_check_box')
+ self.settings_layout.addRow(self.auto_unblank_check_box)
+ self.auto_preview_check_box = QtGui.QCheckBox(self.settings_group_box)
+ self.auto_preview_check_box.setObjectName(u'auto_preview_check_box')
+ self.settings_layout.addRow(self.auto_preview_check_box)
# Moved here from image tab
- self.timeoutLabel = QtGui.QLabel(self.settingsGroupBox)
- self.timeoutLabel.setObjectName(u'timeoutLabel')
- self.timeoutSpinBox = QtGui.QSpinBox(self.settingsGroupBox)
- self.timeoutSpinBox.setObjectName(u'timeoutSpinBox')
- self.timeoutSpinBox.setRange(1, 180)
- self.settingsLayout.addRow(self.timeoutLabel, self.timeoutSpinBox)
- self.rightLayout.addWidget(self.settingsGroupBox)
- self.rightLayout.addStretch()
+ self.timeout_label = QtGui.QLabel(self.settings_group_box)
+ self.timeout_label.setObjectName(u'timeout_label')
+ self.timeout_spin_box = QtGui.QSpinBox(self.settings_group_box)
+ self.timeout_spin_box.setObjectName(u'timeout_spin_box')
+ self.timeout_spin_box.setRange(1, 180)
+ self.settings_layout.addRow(self.timeout_label, self.timeout_spin_box)
+ self.right_layout.addWidget(self.settings_group_box)
+ self.right_layout.addStretch()
# Signals and slots
- self.overrideRadioButton.toggled.connect(self.onOverrideRadioButtonPressed)
- self.customHeightValueEdit.valueChanged.connect(self.onDisplayChanged)
- self.customWidthValueEdit.valueChanged.connect(self.onDisplayChanged)
- self.customYValueEdit.valueChanged.connect(self.onDisplayChanged)
- self.customXValueEdit.valueChanged.connect(self.onDisplayChanged)
- self.monitorComboBox.currentIndexChanged.connect(self.onDisplayChanged)
+ self.override_radio_button.toggled.connect(self.on_override_radio_button_pressed)
+ self.custom_height_value_edit.valueChanged.connect(self.on_display_changed)
+ self.custom_width_value_edit.valueChanged.connect(self.on_display_changed)
+ self.custom_Y_value_edit.valueChanged.connect(self.on_display_changed)
+ self.custom_X_value_edit.valueChanged.connect(self.on_display_changed)
+ self.monitor_combo_box.currentIndexChanged.connect(self.on_display_changed)
# Reload the tab, as the screen resolution/count may have changed.
Registry().register_function(u'config_screen_changed', self.load)
# Remove for now
- self.usernameLabel.setVisible(False)
- self.usernameEdit.setVisible(False)
- self.passwordLabel.setVisible(False)
- self.passwordEdit.setVisible(False)
+ self.username_label.setVisible(False)
+ self.username_edit.setVisible(False)
+ self.password_label.setVisible(False)
+ self.password_edit.setVisible(False)
def retranslateUi(self):
"""
Translate the general settings tab to the currently selected language
"""
- self.tabTitleVisible = translate('OpenLP.GeneralTab', 'General')
- self.monitorGroupBox.setTitle(translate('OpenLP.GeneralTab', 'Monitors'))
- self.monitorRadioButton.setText(translate('OpenLP.GeneralTab', 'Select monitor for output display:'))
- self.displayOnMonitorCheck.setText(translate('OpenLP.GeneralTab', 'Display if a single screen'))
- self.startupGroupBox.setTitle(translate('OpenLP.GeneralTab', 'Application Startup'))
- self.warningCheckBox.setText(translate('OpenLP.GeneralTab', 'Show blank screen warning'))
- self.autoOpenCheckBox.setText(translate('OpenLP.GeneralTab', 'Automatically open the last service'))
- self.showSplashCheckBox.setText(translate('OpenLP.GeneralTab', 'Show the splash screen'))
- self.checkForUpdatesCheckBox.setText(translate('OpenLP.GeneralTab', 'Check for updates to OpenLP'))
- self.settingsGroupBox.setTitle(translate('OpenLP.GeneralTab', 'Application Settings'))
- self.saveCheckServiceCheckBox.setText(translate('OpenLP.GeneralTab',
+ self.tab_title_visible = translate('OpenLP.GeneralTab', 'General')
+ self.monitor_group_box.setTitle(translate('OpenLP.GeneralTab', 'Monitors'))
+ self.monitor_radio_button.setText(translate('OpenLP.GeneralTab', 'Select monitor for output display:'))
+ self.display_on_monitor_check.setText(translate('OpenLP.GeneralTab', 'Display if a single screen'))
+ self.startup_group_box.setTitle(translate('OpenLP.GeneralTab', 'Application Startup'))
+ self.warning_check_box.setText(translate('OpenLP.GeneralTab', 'Show blank screen warning'))
+ self.auto_open_check_box.setText(translate('OpenLP.GeneralTab', 'Automatically open the last service'))
+ self.show_splash_check_box.setText(translate('OpenLP.GeneralTab', 'Show the splash screen'))
+ self.check_for_updates_check_box.setText(translate('OpenLP.GeneralTab', 'Check for updates to OpenLP'))
+ self.settings_group_box.setTitle(translate('OpenLP.GeneralTab', 'Application Settings'))
+ self.save_check_service_check_box.setText(translate('OpenLP.GeneralTab',
'Prompt to save before starting a new service'))
- self.autoUnblankCheckBox.setText(translate('OpenLP.GeneralTab', 'Unblank display when adding new live item'))
- self.autoPreviewCheckBox.setText(translate('OpenLP.GeneralTab', 'Automatically preview next item in service'))
- self.timeoutLabel.setText(translate('OpenLP.GeneralTab', 'Timed slide interval:'))
- self.timeoutSpinBox.setSuffix(translate('OpenLP.GeneralTab', ' sec'))
- self.ccliGroupBox.setTitle(translate('OpenLP.GeneralTab', 'CCLI Details'))
- self.numberLabel.setText(UiStrings().CCLINumberLabel)
- self.usernameLabel.setText(translate('OpenLP.GeneralTab', 'SongSelect username:'))
- self.passwordLabel.setText(translate('OpenLP.GeneralTab', 'SongSelect password:'))
+ self.auto_unblank_check_box.setText(translate('OpenLP.GeneralTab', 'Unblank display when adding new live item'))
+ self.auto_preview_check_box.setText(translate('OpenLP.GeneralTab', 'Automatically preview next item in service'))
+ 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().CCLINumberLabel)
+ self.username_label.setText(translate('OpenLP.GeneralTab', 'SongSelect username:'))
+ self.password_label.setText(translate('OpenLP.GeneralTab', 'SongSelect password:'))
# Moved from display tab
- self.overrideRadioButton.setText(translate('OpenLP.GeneralTab', 'Override display position:'))
- self.customXLabel.setText(translate('OpenLP.GeneralTab', 'X'))
- self.customYLabel.setText(translate('OpenLP.GeneralTab', 'Y'))
- self.customHeightLabel.setText(translate('OpenLP.GeneralTab', 'Height'))
- self.customWidthLabel.setText(translate('OpenLP.GeneralTab', 'Width'))
- self.audioGroupBox.setTitle(translate('OpenLP.GeneralTab', 'Background Audio'))
- self.startPausedCheckBox.setText(translate('OpenLP.GeneralTab', 'Start background audio paused'))
- self.repeatListCheckBox.setText(translate('OpenLP.GeneralTab', 'Repeat track list'))
+ self.override_radio_button.setText(translate('OpenLP.GeneralTab', 'Override display position:'))
+ self.custom_x_label.setText(translate('OpenLP.GeneralTab', 'X'))
+ self.custom_y_label.setText(translate('OpenLP.GeneralTab', 'Y'))
+ self.custom_height_label.setText(translate('OpenLP.GeneralTab', 'Height'))
+ self.custom_width_label.setText(translate('OpenLP.GeneralTab', 'Width'))
+ self.audio_group_box.setTitle(translate('OpenLP.GeneralTab', 'Background Audio'))
+ self.start_paused_check_box.setText(translate('OpenLP.GeneralTab', 'Start background audio paused'))
+ self.repeat_list_check_box.setText(translate('OpenLP.GeneralTab', 'Repeat track list'))
def load(self):
"""
Load the settings to populate the form
"""
settings = Settings()
- settings.beginGroup(self.settingsSection)
- self.monitorComboBox.clear()
- self.monitorComboBox.addItems(self.screens.get_screen_list())
+ 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')
- self.monitorComboBox.setCurrentIndex(monitorNumber)
- self.numberEdit.setText(settings.value(u'ccli number'))
- self.usernameEdit.setText(settings.value(u'songselect username'))
- self.passwordEdit.setText(settings.value(u'songselect password'))
- self.saveCheckServiceCheckBox.setChecked(settings.value(u'save prompt'))
- self.autoUnblankCheckBox.setChecked(settings.value(u'auto unblank'))
- self.displayOnMonitorCheck.setChecked(self.screens.display)
- self.warningCheckBox.setChecked(settings.value(u'blank warning'))
- self.autoOpenCheckBox.setChecked(settings.value(u'auto open'))
- self.showSplashCheckBox.setChecked(settings.value(u'show splash'))
- self.checkForUpdatesCheckBox.setChecked(settings.value(u'update check'))
- self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview'))
- self.timeoutSpinBox.setValue(settings.value(u'loop delay'))
- self.monitorRadioButton.setChecked(not settings.value(u'override position',))
- self.overrideRadioButton.setChecked(settings.value(u'override position'))
- self.customXValueEdit.setValue(settings.value(u'x position'))
- self.customYValueEdit.setValue(settings.value(u'y position'))
- self.customHeightValueEdit.setValue(settings.value(u'height'))
- self.customWidthValueEdit.setValue(settings.value(u'width'))
- self.startPausedCheckBox.setChecked(settings.value(u'audio start paused'))
- self.repeatListCheckBox.setChecked(settings.value(u'audio repeat list'))
+ self.monitor_combo_box.setCurrentIndex(monitorNumber)
+ self.number_edit.setText(settings.value(u'ccli number'))
+ self.username_edit.setText(settings.value(u'songselect username'))
+ self.password_edit.setText(settings.value(u'songselect password'))
+ self.save_check_service_check_box.setChecked(settings.value(u'save prompt'))
+ self.auto_unblank_check_box.setChecked(settings.value(u'auto unblank'))
+ self.display_on_monitor_check.setChecked(self.screens.display)
+ self.warning_check_box.setChecked(settings.value(u'blank warning'))
+ self.auto_open_check_box.setChecked(settings.value(u'auto open'))
+ self.show_splash_check_box.setChecked(settings.value(u'show splash'))
+ self.check_for_updates_check_box.setChecked(settings.value(u'update check'))
+ self.auto_preview_check_box.setChecked(settings.value(u'auto preview'))
+ self.timeout_spin_box.setValue(settings.value(u'loop delay'))
+ self.monitor_radio_button.setChecked(not settings.value(u'override position',))
+ self.override_radio_button.setChecked(settings.value(u'override position'))
+ self.custom_X_value_edit.setValue(settings.value(u'x position'))
+ self.custom_Y_value_edit.setValue(settings.value(u'y position'))
+ self.custom_height_value_edit.setValue(settings.value(u'height'))
+ self.custom_width_value_edit.setValue(settings.value(u'width'))
+ self.start_paused_check_box.setChecked(settings.value(u'audio start paused'))
+ self.repeat_list_check_box.setChecked(settings.value(u'audio repeat list'))
settings.endGroup()
- self.monitorComboBox.setDisabled(self.overrideRadioButton.isChecked())
- self.customXValueEdit.setEnabled(self.overrideRadioButton.isChecked())
- self.customYValueEdit.setEnabled(self.overrideRadioButton.isChecked())
- self.customHeightValueEdit.setEnabled(self.overrideRadioButton.isChecked())
- self.customWidthValueEdit.setEnabled(self.overrideRadioButton.isChecked())
+ self.monitor_combo_box.setDisabled(self.override_radio_button.isChecked())
+ self.custom_X_value_edit.setEnabled(self.override_radio_button.isChecked())
+ self.custom_Y_value_edit.setEnabled(self.override_radio_button.isChecked())
+ 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.setValue(u'monitor', self.monitorComboBox.currentIndex())
- settings.setValue(u'display on monitor', self.displayOnMonitorCheck.isChecked())
- settings.setValue(u'blank warning', self.warningCheckBox.isChecked())
- settings.setValue(u'auto open', self.autoOpenCheckBox.isChecked())
- settings.setValue(u'show splash', self.showSplashCheckBox.isChecked())
- settings.setValue(u'update check', self.checkForUpdatesCheckBox.isChecked())
- settings.setValue(u'save prompt', self.saveCheckServiceCheckBox.isChecked())
- settings.setValue(u'auto unblank', self.autoUnblankCheckBox.isChecked())
- settings.setValue(u'auto preview', self.autoPreviewCheckBox.isChecked())
- settings.setValue(u'loop delay', self.timeoutSpinBox.value())
- settings.setValue(u'ccli number', self.numberEdit.displayText())
- settings.setValue(u'songselect username', self.usernameEdit.displayText())
- settings.setValue(u'songselect password', self.passwordEdit.displayText())
- settings.setValue(u'x position', self.customXValueEdit.value())
- settings.setValue(u'y position', self.customYValueEdit.value())
- settings.setValue(u'height', self.customHeightValueEdit.value())
- settings.setValue(u'width', self.customWidthValueEdit.value())
- settings.setValue(u'override position', self.overrideRadioButton.isChecked())
- settings.setValue(u'audio start paused', self.startPausedCheckBox.isChecked())
- settings.setValue(u'audio repeat list', self.repeatListCheckBox.isChecked())
+ 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())
+ settings.setValue(u'auto open', self.auto_open_check_box.isChecked())
+ settings.setValue(u'show splash', self.show_splash_check_box.isChecked())
+ settings.setValue(u'update check', self.check_for_updates_check_box.isChecked())
+ settings.setValue(u'save prompt', self.save_check_service_check_box.isChecked())
+ settings.setValue(u'auto unblank', self.auto_unblank_check_box.isChecked())
+ settings.setValue(u'auto preview', self.auto_preview_check_box.isChecked())
+ settings.setValue(u'loop delay', self.timeout_spin_box.value())
+ settings.setValue(u'ccli number', self.number_edit.displayText())
+ settings.setValue(u'songselect username', self.username_edit.displayText())
+ settings.setValue(u'songselect password', self.password_edit.displayText())
+ settings.setValue(u'x position', self.custom_X_value_edit.value())
+ settings.setValue(u'y position', self.custom_Y_value_edit.value())
+ settings.setValue(u'height', self.custom_height_value_edit.value())
+ settings.setValue(u'width', self.custom_width_value_edit.value())
+ settings.setValue(u'override position', self.override_radio_button.isChecked())
+ settings.setValue(u'audio start paused', self.start_paused_check_box.isChecked())
+ settings.setValue(u'audio repeat list', self.repeat_list_check_box.isChecked())
settings.endGroup()
# On save update the screens as well
self.post_set_up(True)
@@ -317,14 +316,14 @@
# Do not continue on start up.
if not postUpdate:
return
- self.screens.set_current_display(self.monitorComboBox.currentIndex())
- self.screens.display = self.displayOnMonitorCheck.isChecked()
+ self.screens.set_current_display(self.monitor_combo_box.currentIndex())
+ self.screens.display = self.display_on_monitor_check.isChecked()
self.screens.override[u'size'] = QtCore.QRect(
- self.customXValueEdit.value(),
- self.customYValueEdit.value(),
- self.customWidthValueEdit.value(),
- self.customHeightValueEdit.value())
- if self.overrideRadioButton.isChecked():
+ self.custom_X_value_edit.value(),
+ self.custom_Y_value_edit.value(),
+ self.custom_width_value_edit.value(),
+ self.custom_height_value_edit.value())
+ if self.override_radio_button.isChecked():
self.screens.set_override_display()
else:
self.screens.reset_current_display()
@@ -332,21 +331,21 @@
self.settings_form.register_post_process(u'config_screen_changed')
self.display_changed = False
- def onOverrideRadioButtonPressed(self, checked):
+ def on_override_radio_button_pressed(self, checked):
"""
Toggle screen state depending on check box state.
``checked``
The state of the check box (boolean).
"""
- self.monitorComboBox.setDisabled(checked)
- self.customXValueEdit.setEnabled(checked)
- self.customYValueEdit.setEnabled(checked)
- self.customHeightValueEdit.setEnabled(checked)
- self.customWidthValueEdit.setEnabled(checked)
+ self.monitor_combo_box.setDisabled(checked)
+ self.custom_X_value_edit.setEnabled(checked)
+ self.custom_Y_value_edit.setEnabled(checked)
+ self.custom_height_value_edit.setEnabled(checked)
+ self.custom_width_value_edit.setEnabled(checked)
self.display_changed = True
- def onDisplayChanged(self):
+ def on_display_changed(self):
"""
Called when the width, height, x position or y position has changed.
"""
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2013-03-12 09:09:42 +0000
+++ openlp/core/ui/mainwindow.py 2013-03-16 20:56:21 +0000
@@ -93,209 +93,211 @@
main_window.setWindowIcon(build_icon(u':/icon/openlp-logo-64x64.png'))
main_window.setDockNestingEnabled(True)
# Set up the main container, which contains all the other form widgets.
- self.mainContent = QtGui.QWidget(main_window)
- self.mainContent.setObjectName(u'mainContent')
- self.mainContentLayout = QtGui.QHBoxLayout(self.mainContent)
- self.mainContentLayout.setSpacing(0)
- self.mainContentLayout.setMargin(0)
- self.mainContentLayout.setObjectName(u'mainContentLayout')
- main_window.setCentralWidget(self.mainContent)
- self.controlSplitter = QtGui.QSplitter(self.mainContent)
+ self.main_content = QtGui.QWidget(main_window)
+ self.main_content.setObjectName(u'main_content')
+ self.main_contentLayout = QtGui.QHBoxLayout(self.main_content)
+ self.main_contentLayout.setSpacing(0)
+ self.main_contentLayout.setMargin(0)
+ self.main_contentLayout.setObjectName(u'main_contentLayout')
+ main_window.setCentralWidget(self.main_content)
+ self.controlSplitter = QtGui.QSplitter(self.main_content)
self.controlSplitter.setOrientation(QtCore.Qt.Horizontal)
self.controlSplitter.setObjectName(u'controlSplitter')
- self.mainContentLayout.addWidget(self.controlSplitter)
+ self.main_contentLayout.addWidget(self.controlSplitter)
# Create slide controllers
self.preview_controller = SlideController(self)
self.live_controller = SlideController(self, True)
- previewVisible = Settings().value(u'user interface/preview panel')
- self.preview_controller.panel.setVisible(previewVisible)
- liveVisible = Settings().value(u'user interface/live panel')
- panelLocked = Settings().value(u'user interface/lock panel')
- self.live_controller.panel.setVisible(liveVisible)
+ preview_visible = Settings().value(u'user interface/preview panel')
+ self.preview_controller.panel.setVisible(preview_visible)
+ live_visible = Settings().value(u'user interface/live panel')
+ panel_locked = Settings().value(u'user interface/lock panel')
+ self.live_controller.panel.setVisible(live_visible)
# Create menu
self.menuBar = QtGui.QMenuBar(main_window)
self.menuBar.setObjectName(u'menuBar')
- self.fileMenu = QtGui.QMenu(self.menuBar)
- self.fileMenu.setObjectName(u'fileMenu')
- self.recentFilesMenu = QtGui.QMenu(self.fileMenu)
- self.recentFilesMenu.setObjectName(u'recentFilesMenu')
- self.file_import_menu = QtGui.QMenu(self.fileMenu)
+ self.file_menu = QtGui.QMenu(self.menuBar)
+ self.file_menu.setObjectName(u'fileMenu')
+ self.recent_files_menu = QtGui.QMenu(self.file_menu)
+ self.recent_files_menu.setObjectName(u'recentFilesMenu')
+ self.file_import_menu = QtGui.QMenu(self.file_menu)
self.file_import_menu.setObjectName(u'file_import_menu')
- self.file_export_menu = QtGui.QMenu(self.fileMenu)
+ self.file_export_menu = QtGui.QMenu(self.file_menu)
self.file_export_menu.setObjectName(u'file_export_menu')
# View Menu
- self.viewMenu = QtGui.QMenu(self.menuBar)
- self.viewMenu.setObjectName(u'viewMenu')
- self.viewModeMenu = QtGui.QMenu(self.viewMenu)
- self.viewModeMenu.setObjectName(u'viewModeMenu')
+ self.view_menu = QtGui.QMenu(self.menuBar)
+ self.view_menu.setObjectName(u'viewMenu')
+ self.view_modeMenu = QtGui.QMenu(self.view_menu)
+ self.view_modeMenu.setObjectName(u'viewModeMenu')
# Tools Menu
self.tools_menu = QtGui.QMenu(self.menuBar)
self.tools_menu.setObjectName(u'tools_menu')
# Settings Menu
- self.settingsMenu = QtGui.QMenu(self.menuBar)
- self.settingsMenu.setObjectName(u'settingsMenu')
- self.settingsLanguageMenu = QtGui.QMenu(self.settingsMenu)
- self.settingsLanguageMenu.setObjectName(u'settingsLanguageMenu')
+ self.settings_menu = QtGui.QMenu(self.menuBar)
+ self.settings_menu.setObjectName(u'settingsMenu')
+ self.settings_language_menu = QtGui.QMenu(self.settings_menu)
+ self.settings_language_menu.setObjectName(u'settingsLanguageMenu')
# Help Menu
- self.helpMenu = QtGui.QMenu(self.menuBar)
- self.helpMenu.setObjectName(u'helpMenu')
+ self.help_menu = QtGui.QMenu(self.menuBar)
+ self.help_menu.setObjectName(u'helpMenu')
main_window.setMenuBar(self.menuBar)
- self.statusBar = QtGui.QStatusBar(main_window)
- self.statusBar.setObjectName(u'statusBar')
- main_window.setStatusBar(self.statusBar)
- self.loadProgressBar = QtGui.QProgressBar(self.statusBar)
- self.loadProgressBar.setObjectName(u'loadProgressBar')
- self.statusBar.addPermanentWidget(self.loadProgressBar)
- self.loadProgressBar.hide()
- self.loadProgressBar.setValue(0)
- self.loadProgressBar.setStyleSheet(PROGRESSBAR_STYLE)
- self.defaultThemeLabel = QtGui.QLabel(self.statusBar)
- self.defaultThemeLabel.setObjectName(u'defaultThemeLabel')
- self.statusBar.addPermanentWidget(self.defaultThemeLabel)
+ self.status_bar = QtGui.QStatusBar(main_window)
+ self.status_bar.setObjectName(u'status_bar')
+ main_window.setStatusBar(self.status_bar)
+ self.load_progress_bar = QtGui.QProgressBar(self.status_bar)
+ self.load_progress_bar.setObjectName(u'load_progress_bar')
+ self.status_bar.addPermanentWidget(self.load_progress_bar)
+ self.load_progress_bar.hide()
+ self.load_progress_bar.setValue(0)
+ self.load_progress_bar.setStyleSheet(PROGRESSBAR_STYLE)
+ self.default_theme_label = QtGui.QLabel(self.status_bar)
+ self.default_theme_label.setObjectName(u'default_theme_label')
+ self.status_bar.addPermanentWidget(self.default_theme_label)
# Create the MediaManager
- self.mediaManagerDock = OpenLPDockWidget(main_window, u'mediaManagerDock', u':/system/system_mediamanager.png')
- self.mediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE)
+ self.media_manager_dock = OpenLPDockWidget(main_window, u'media_manager_dock',
+ u':/system/system_mediamanager.png')
+ self.media_manager_dock.setStyleSheet(MEDIA_MANAGER_STYLE)
# Create the media toolbox
- self.mediaToolBox = QtGui.QToolBox(self.mediaManagerDock)
- self.mediaToolBox.setObjectName(u'mediaToolBox')
- self.mediaManagerDock.setWidget(self.mediaToolBox)
- main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, self.mediaManagerDock)
+ self.media_tool_box = QtGui.QToolBox(self.media_manager_dock)
+ self.media_tool_box.setObjectName(u'media_tool_box')
+ self.media_manager_dock.setWidget(self.media_tool_box)
+ main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, self.media_manager_dock)
# Create the service manager
- self.serviceManagerDock = OpenLPDockWidget(main_window, u'serviceManagerDock',
+ self.service_manager_dock = OpenLPDockWidget(main_window, u'service_manager_dock',
u':/system/system_servicemanager.png')
- self.serviceManagerContents = ServiceManager(self.serviceManagerDock)
- self.serviceManagerDock.setWidget(self.serviceManagerContents)
- main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.serviceManagerDock)
+ self.service_manager_contents = ServiceManager(self.service_manager_dock)
+ self.service_manager_dock.setWidget(self.service_manager_contents)
+ main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.service_manager_dock)
# Create the theme manager
- self.themeManagerDock = OpenLPDockWidget(main_window, u'themeManagerDock', u':/system/system_thememanager.png')
- self.themeManagerContents = ThemeManager(self.themeManagerDock)
- self.themeManagerContents.setObjectName(u'themeManagerContents')
- self.themeManagerDock.setWidget(self.themeManagerContents)
- main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.themeManagerDock)
+ self.theme_manager_dock = OpenLPDockWidget(main_window, u'theme_manager_dock',
+ u':/system/system_thememanager.png')
+ self.theme_manager_contents = ThemeManager(self.theme_manager_dock)
+ self.theme_manager_contents.setObjectName(u'theme_manager_contents')
+ self.theme_manager_dock.setWidget(self.theme_manager_contents)
+ main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.theme_manager_dock)
# Create the menu items
action_list = ActionList.get_instance()
action_list.add_category(UiStrings().File, CategoryOrder.standard_menu)
- self.fileNewItem = create_action(main_window, u'fileNewItem',
+ self.file_new_item = create_action(main_window, u'fileNewItem',
icon=u':/general/general_new.png',
can_shortcuts=True,
category=UiStrings().File,
- triggers=self.serviceManagerContents.on_new_service_clicked)
- self.fileOpenItem = create_action(main_window, u'fileOpenItem',
+ triggers=self.service_manager_contents.on_new_service_clicked)
+ self.file_open_item = create_action(main_window, u'fileOpenItem',
icon=u':/general/general_open.png',
can_shortcuts=True,
category=UiStrings().File,
- triggers=self.serviceManagerContents.on_load_service_clicked)
- self.fileSaveItem = create_action(main_window, u'fileSaveItem',
+ triggers=self.service_manager_contents.on_load_service_clicked)
+ self.file_save_item = create_action(main_window, u'fileSaveItem',
icon=u':/general/general_save.png',
can_shortcuts=True,
category=UiStrings().File,
- triggers=self.serviceManagerContents.save_file)
- self.fileSaveAsItem = create_action(main_window, u'fileSaveAsItem',
+ triggers=self.service_manager_contents.save_file)
+ self.file_save_as_item = create_action(main_window, u'fileSaveAsItem',
can_shortcuts=True,
category=UiStrings().File,
- triggers=self.serviceManagerContents.save_file_as)
- self.printServiceOrderItem = create_action(main_window,
+ triggers=self.service_manager_contents.save_file_as)
+ self.print_service_order_item = create_action(main_window,
u'printServiceItem', can_shortcuts=True,
category=UiStrings().File,
- triggers=self.serviceManagerContents.print_service_order)
- self.fileExitItem = create_action(main_window, u'fileExitItem',
+ triggers=self.service_manager_contents.print_service_order)
+ self.file_exit_item = create_action(main_window, u'fileExitItem',
icon=u':/system/system_exit.png',
can_shortcuts=True,
category=UiStrings().File, triggers=main_window.close)
# Give QT Extra Hint that this is the Exit Menu Item
- self.fileExitItem.setMenuRole(QtGui.QAction.QuitRole)
+ self.file_exit_item.setMenuRole(QtGui.QAction.QuitRole)
action_list.add_category(UiStrings().Import, CategoryOrder.standard_menu)
- self.importThemeItem = create_action(
+ self.import_theme_item = create_action(
main_window, u'importThemeItem', category=UiStrings().Import, can_shortcuts=True)
- self.importLanguageItem = create_action(main_window, u'importLanguageItem')
+ self.import_language_item = create_action(main_window, u'importLanguageItem')
action_list.add_category(UiStrings().Export, CategoryOrder.standard_menu)
- self.exportThemeItem = create_action(
+ self.export_theme_item = create_action(
main_window, u'exportThemeItem', category=UiStrings().Export, can_shortcuts=True)
- self.exportLanguageItem = create_action(main_window, u'exportLanguageItem')
+ self.export_language_item = create_action(main_window, u'exportLanguageItem')
action_list.add_category(UiStrings().View, CategoryOrder.standard_menu)
- self.viewMediaManagerItem = create_action(main_window,
+ self.view_media_manager_item = create_action(main_window,
u'viewMediaManagerItem',
icon=u':/system/system_mediamanager.png',
- checked=self.mediaManagerDock.isVisible(),
+ checked=self.media_manager_dock.isVisible(),
can_shortcuts=True,
- category=UiStrings().View, triggers=self.toggleMediaManager)
- self.viewThemeManagerItem = create_action(main_window,
+ category=UiStrings().View, triggers=self.toggle_media_manager)
+ self.view_theme_manager_item = create_action(main_window,
u'viewThemeManagerItem', can_shortcuts=True,
icon=u':/system/system_thememanager.png',
- checked=self.themeManagerDock.isVisible(),
- category=UiStrings().View, triggers=self.toggleThemeManager)
- self.viewServiceManagerItem = create_action(main_window,
+ checked=self.theme_manager_dock.isVisible(),
+ category=UiStrings().View, triggers=self.toggle_theme_manager)
+ self.view_service_manager_item = create_action(main_window,
u'viewServiceManagerItem', can_shortcuts=True,
icon=u':/system/system_servicemanager.png',
- checked=self.serviceManagerDock.isVisible(),
- category=UiStrings().View, triggers=self.toggleServiceManager)
- self.viewPreviewPanel = create_action(main_window, u'viewPreviewPanel',
- can_shortcuts=True, checked=previewVisible,
- category=UiStrings().View, triggers=self.setPreviewPanelVisibility)
- self.viewLivePanel = create_action(main_window, u'viewLivePanel',
- can_shortcuts=True, checked=liveVisible,
- category=UiStrings().View, triggers=self.setLivePanelVisibility)
+ checked=self.service_manager_dock.isVisible(),
+ category=UiStrings().View, triggers=self.toggle_service_manager)
+ self.view_preview_panel = create_action(main_window, u'viewPreviewPanel',
+ can_shortcuts=True, checked=preview_visible,
+ category=UiStrings().View, triggers=self.set_preview_panel_visibility)
+ self.view_live_panel = create_action(main_window, u'viewLivePanel',
+ can_shortcuts=True, checked=live_visible,
+ category=UiStrings().View, triggers=self.set_live_panel_visibility)
self.lockPanel = create_action(main_window, u'lockPanel',
- can_shortcuts=True, checked=panelLocked,
+ can_shortcuts=True, checked=panel_locked,
category=UiStrings().View,
- triggers=self.setLockPanel)
+ triggers=self.set_lock_panel)
action_list.add_category(UiStrings().ViewMode, CategoryOrder.standard_menu)
- self.modeDefaultItem = create_action(
+ self.mode_default_Item = create_action(
main_window, u'modeDefaultItem', checked=False, category=UiStrings().ViewMode, can_shortcuts=True)
- self.modeSetupItem = create_action(
+ self.mode_setup_item = create_action(
main_window, u'modeSetupItem', checked=False, category=UiStrings().ViewMode, can_shortcuts=True)
- self.modeLiveItem = create_action(
+ self.mode_live_item = create_action(
main_window, u'modeLiveItem', checked=True, category=UiStrings().ViewMode, can_shortcuts=True)
self.modeGroup = QtGui.QActionGroup(main_window)
- self.modeGroup.addAction(self.modeDefaultItem)
- self.modeGroup.addAction(self.modeSetupItem)
- self.modeGroup.addAction(self.modeLiveItem)
- self.modeDefaultItem.setChecked(True)
+ self.modeGroup.addAction(self.mode_default_Item)
+ self.modeGroup.addAction(self.mode_setup_item)
+ self.modeGroup.addAction(self.mode_live_item)
+ self.mode_default_Item.setChecked(True)
action_list.add_category(UiStrings().Tools, CategoryOrder.standard_menu)
- self.toolsAddToolItem = create_action(main_window,
+ self.tools_add_Tool_Item = create_action(main_window,
u'toolsAddToolItem', icon=u':/tools/tools_add.png', category=UiStrings().Tools, can_shortcuts=True)
- self.toolsOpenDataFolder = create_action(main_window,
+ self.tools_open_data_folder = create_action(main_window,
u'toolsOpenDataFolder', icon=u':/general/general_open.png', category=UiStrings().Tools, can_shortcuts=True)
- self.toolsFirstTimeWizard = create_action(main_window,
+ self.tools_first_time_wizard = create_action(main_window,
u'toolsFirstTimeWizard', icon=u':/general/general_revert.png',
category=UiStrings().Tools, can_shortcuts=True)
- self.updateThemeImages = create_action(main_window,
+ self.update_theme_images = create_action(main_window,
u'updateThemeImages', category=UiStrings().Tools, can_shortcuts=True)
action_list.add_category(UiStrings().Settings, CategoryOrder.standard_menu)
self.settingsPluginListItem = create_action(main_window,
u'settingsPluginListItem',
icon=u':/system/settings_plugin_list.png',
can_shortcuts=True,
- category=UiStrings().Settings, triggers=self.onPluginItemClicked)
+ category=UiStrings().Settings, triggers=self.on_plugin_item_clicked)
# i18n Language Items
- self.autoLanguageItem = create_action(main_window, u'autoLanguageItem', checked=LanguageManager.auto_language)
- self.languageGroup = QtGui.QActionGroup(main_window)
- self.languageGroup.setExclusive(True)
- self.languageGroup.setObjectName(u'languageGroup')
- add_actions(self.languageGroup, [self.autoLanguageItem])
- qmList = LanguageManager.get_qm_list()
- savedLanguage = LanguageManager.get_language()
- for key in sorted(qmList.keys()):
- languageItem = create_action(main_window, key, checked=qmList[key] == savedLanguage)
- add_actions(self.languageGroup, [languageItem])
- self.settingsShortcutsItem = create_action(main_window, u'settingsShortcutsItem',
+ self.auto_language_item = create_action(main_window, u'autoLanguageItem', checked=LanguageManager.auto_language)
+ self.language_group = QtGui.QActionGroup(main_window)
+ self.language_group.setExclusive(True)
+ self.language_group.setObjectName(u'languageGroup')
+ add_actions(self.language_group, [self.auto_language_item])
+ qm_list = LanguageManager.get_qm_list()
+ saved_language = LanguageManager.get_language()
+ for key in sorted(qm_list.keys()):
+ language_item = create_action(main_window, key, checked=qm_list[key] == saved_language)
+ add_actions(self.language_group, [language_item])
+ self.settings_shortcuts_item = create_action(main_window, u'settingsShortcutsItem',
icon=u':/system/system_configure_shortcuts.png', category=UiStrings().Settings, can_shortcuts=True)
# Formatting Tags were also known as display tags.
- self.formattingTagItem = create_action(main_window, u'displayTagItem',
+ self.formatting_tag_item = create_action(main_window, u'displayTagItem',
icon=u':/system/tag_editor.png', category=UiStrings().Settings, can_shortcuts=True)
- self.settingsConfigureItem = create_action(main_window, u'settingsConfigureItem',
+ self.settings_configure_item = create_action(main_window, u'settingsConfigureItem',
icon=u':/system/system_settings.png', can_shortcuts=True, category=UiStrings().Settings)
# Give QT Extra Hint that this is the Preferences Menu Item
- self.settingsConfigureItem.setMenuRole(QtGui.QAction.PreferencesRole)
- self.settingsImportItem = create_action(
+ self.settings_configure_item.setMenuRole(QtGui.QAction.PreferencesRole)
+ self.settings_import_item = create_action(
main_window, u'settingsImportItem', category=UiStrings().Import, can_shortcuts=True)
- self.settingsExportItem = create_action(
+ self.settings_export_item = create_action(
main_window, u'settingsExportItem', category=UiStrings().Export, can_shortcuts=True)
action_list.add_category(UiStrings().Help, CategoryOrder.standard_menu)
- self.aboutItem = create_action(main_window, u'aboutItem', icon=u':/system/system_about.png',
+ self.about_item = create_action(main_window, u'aboutItem', icon=u':/system/system_about.png',
can_shortcuts=True, category=UiStrings().Help, triggers=self.onAboutItemClicked)
# Give QT Extra Hint that this is an About Menu Item
- self.aboutItem.setMenuRole(QtGui.QAction.AboutRole)
+ self.about_item.setMenuRole(QtGui.QAction.AboutRole)
if os.name == u'nt':
self.localHelpFile = os.path.join(
AppLocation.get_directory(AppLocation.AppDir), 'OpenLP.chm')
@@ -303,55 +305,55 @@
icon=u':/system/system_help_contents.png',
can_shortcuts=True,
category=UiStrings().Help, triggers=self.onOfflineHelpClicked)
- self.onlineHelpItem = create_action(main_window, u'onlineHelpItem',
+ self.on_line_help_item = create_action(main_window, u'onlineHelpItem',
icon=u':/system/system_online_help.png',
can_shortcuts=True,
category=UiStrings().Help, triggers=self.onOnlineHelpClicked)
- self.webSiteItem = create_action(main_window, u'webSiteItem', can_shortcuts=True, category=UiStrings().Help)
- add_actions(self.file_import_menu, (self.settingsImportItem, None, self.importThemeItem,
- self.importLanguageItem))
- add_actions(self.file_export_menu, (self.settingsExportItem, None, self.exportThemeItem,
- self.exportLanguageItem))
- add_actions(self.fileMenu, (self.fileNewItem, self.fileOpenItem,
- self.fileSaveItem, self.fileSaveAsItem, self.recentFilesMenu.menuAction(), None,
- self.file_import_menu.menuAction(), self.file_export_menu.menuAction(), None, self.printServiceOrderItem,
- self.fileExitItem))
- add_actions(self.viewModeMenu, (self.modeDefaultItem, self.modeSetupItem, self.modeLiveItem))
- add_actions(self.viewMenu, (self.viewModeMenu.menuAction(), None, self.viewMediaManagerItem,
- self.viewServiceManagerItem, self.viewThemeManagerItem, None, self.viewPreviewPanel,
- self.viewLivePanel, None, self.lockPanel))
+ self.web_site_item = create_action(main_window, u'webSiteItem', can_shortcuts=True, category=UiStrings().Help)
+ add_actions(self.file_import_menu, (self.settings_import_item, None, self.import_theme_item,
+ self.import_language_item))
+ add_actions(self.file_export_menu, (self.settings_export_item, None, self.export_theme_item,
+ self.export_language_item))
+ add_actions(self.file_menu, (self.file_new_item, self.file_open_item,
+ self.file_save_item, self.file_save_as_item, self.recent_files_menu.menuAction(), None,
+ self.file_import_menu.menuAction(), self.file_export_menu.menuAction(), None, self.print_service_order_item,
+ self.file_exit_item))
+ add_actions(self.view_modeMenu, (self.mode_default_Item, self.mode_setup_item, self.mode_live_item))
+ add_actions(self.view_menu, (self.view_modeMenu.menuAction(), None, self.view_media_manager_item,
+ self.view_service_manager_item, self.view_theme_manager_item, None, self.view_preview_panel,
+ self.view_live_panel, None, self.lockPanel))
# i18n add Language Actions
- add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None))
- add_actions(self.settingsLanguageMenu, self.languageGroup.actions())
+ add_actions(self.settings_language_menu, (self.auto_language_item, None))
+ add_actions(self.settings_language_menu, self.language_group.actions())
# Order things differently in OS X so that Preferences menu item in the
# app menu is correct (this gets picked up automatically by Qt).
if sys.platform == u'darwin':
- add_actions(self.settingsMenu, (self.settingsPluginListItem, self.settingsLanguageMenu.menuAction(), None,
- self.settingsConfigureItem, self.settingsShortcutsItem, self.formattingTagItem))
+ add_actions(self.settings_menu, (self.settingsPluginListItem, self.settings_language_menu.menuAction(),
+ None, self.settings_configure_item, self.settings_shortcuts_item, self.formatting_tag_item))
else:
- add_actions(self.settingsMenu, (self.settingsPluginListItem, self.settingsLanguageMenu.menuAction(), None,
- self.formattingTagItem, self.settingsShortcutsItem, self.settingsConfigureItem))
- add_actions(self.tools_menu, (self.toolsAddToolItem, None))
- add_actions(self.tools_menu, (self.toolsOpenDataFolder, None))
- add_actions(self.tools_menu, (self.toolsFirstTimeWizard, None))
- add_actions(self.tools_menu, [self.updateThemeImages])
+ add_actions(self.settings_menu, (self.settingsPluginListItem, self.settings_language_menu.menuAction(),
+ None, self.formatting_tag_item, self.settings_shortcuts_item, self.settings_configure_item))
+ add_actions(self.tools_menu, (self.tools_add_Tool_Item, None))
+ add_actions(self.tools_menu, (self.tools_open_data_folder, None))
+ add_actions(self.tools_menu, (self.tools_first_time_wizard, None))
+ add_actions(self.tools_menu, [self.update_theme_images])
if os.name == u'nt':
- add_actions(self.helpMenu, (self.offlineHelpItem, self.onlineHelpItem, None, self.webSiteItem,
- self.aboutItem))
+ add_actions(self.help_menu, (self.offlineHelpItem, self.on_line_help_item, None, self.web_site_item,
+ self.about_item))
else:
- add_actions(self.helpMenu, (self.onlineHelpItem, None, self.webSiteItem, self.aboutItem))
- add_actions(self.menuBar, (self.fileMenu.menuAction(), self.viewMenu.menuAction(), self.tools_menu.menuAction(),
- self.settingsMenu.menuAction(), self.helpMenu.menuAction()))
+ add_actions(self.help_menu, (self.on_line_help_item, None, self.web_site_item, self.about_item))
+ add_actions(self.menuBar, (self.file_menu.menuAction(), self.view_menu.menuAction(),
+ self.tools_menu.menuAction(), self.settings_menu.menuAction(), self.help_menu.menuAction()))
# Initialise the translation
self.retranslateUi(main_window)
- self.mediaToolBox.setCurrentIndex(0)
+ self.media_tool_box.setCurrentIndex(0)
# Connect up some signals and slots
- self.fileMenu.aboutToShow.connect(self.updateRecentFilesMenu)
+ self.file_menu.aboutToShow.connect(self.update_recent_files_menu)
# Hide the entry, as it does not have any functionality yet.
- self.toolsAddToolItem.setVisible(False)
- self.importLanguageItem.setVisible(False)
- self.exportLanguageItem.setVisible(False)
- self.setLockPanel(panelLocked)
+ self.tools_add_Tool_Item.setVisible(False)
+ self.import_language_item.setVisible(False)
+ self.export_language_item.setVisible(False)
+ self.set_lock_panel(panel_locked)
self.settingsImported = False
def retranslateUi(self, mainWindow):
@@ -360,98 +362,101 @@
"""
mainWindow.mainTitle = UiStrings().OLPV2x
mainWindow.setWindowTitle(mainWindow.mainTitle)
- self.fileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
+ self.file_menu.setTitle(translate('OpenLP.MainWindow', '&File'))
self.file_import_menu.setTitle(translate('OpenLP.MainWindow', '&Import'))
self.file_export_menu.setTitle(translate('OpenLP.MainWindow', '&Export'))
- self.recentFilesMenu.setTitle(translate('OpenLP.MainWindow', '&Recent Files'))
- self.viewMenu.setTitle(translate('OpenLP.MainWindow', '&View'))
- self.viewModeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode'))
+ self.recent_files_menu.setTitle(translate('OpenLP.MainWindow', '&Recent Files'))
+ self.view_menu.setTitle(translate('OpenLP.MainWindow', '&View'))
+ self.view_modeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode'))
self.tools_menu.setTitle(translate('OpenLP.MainWindow', '&Tools'))
- self.settingsMenu.setTitle(translate('OpenLP.MainWindow', '&Settings'))
- self.settingsLanguageMenu.setTitle(translate('OpenLP.MainWindow', '&Language'))
- self.helpMenu.setTitle(translate('OpenLP.MainWindow', '&Help'))
- self.mediaManagerDock.setWindowTitle(translate('OpenLP.MainWindow', 'Media Manager'))
- self.serviceManagerDock.setWindowTitle(translate('OpenLP.MainWindow', 'Service Manager'))
- self.themeManagerDock.setWindowTitle(translate('OpenLP.MainWindow', 'Theme Manager'))
- self.fileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
- self.fileNewItem.setToolTip(UiStrings().NewService)
- self.fileNewItem.setStatusTip(UiStrings().CreateService)
- self.fileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
- self.fileOpenItem.setToolTip(UiStrings().OpenService)
- self.fileOpenItem.setStatusTip(translate('OpenLP.MainWindow', 'Open an existing service.'))
- self.fileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
- self.fileSaveItem.setToolTip(UiStrings().SaveService)
- self.fileSaveItem.setStatusTip(translate('OpenLP.MainWindow', 'Save the current service to disk.'))
- self.fileSaveAsItem.setText(translate('OpenLP.MainWindow', 'Save &As...'))
- self.fileSaveAsItem.setToolTip(translate('OpenLP.MainWindow', 'Save Service As'))
- self.fileSaveAsItem.setStatusTip(translate('OpenLP.MainWindow', 'Save the current service under a new name.'))
- self.printServiceOrderItem.setText(UiStrings().PrintService)
- self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow', 'Print the current service.'))
- self.fileExitItem.setText(translate('OpenLP.MainWindow', 'E&xit'))
- self.fileExitItem.setStatusTip(translate('OpenLP.MainWindow', 'Quit OpenLP'))
- self.importThemeItem.setText(translate('OpenLP.MainWindow', '&Theme'))
- self.importLanguageItem.setText(translate('OpenLP.MainWindow', '&Language'))
- self.exportThemeItem.setText(translate('OpenLP.MainWindow', '&Theme'))
- self.exportLanguageItem.setText(translate('OpenLP.MainWindow', '&Language'))
- self.settingsShortcutsItem.setText(translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
- self.formattingTagItem.setText(translate('OpenLP.MainWindow', 'Configure &Formatting Tags...'))
- self.settingsConfigureItem.setText(translate('OpenLP.MainWindow', '&Configure OpenLP...'))
- self.settingsExportItem.setStatusTip(translate('OpenLP.MainWindow',
+ self.settings_menu.setTitle(translate('OpenLP.MainWindow', '&Settings'))
+ self.settings_language_menu.setTitle(translate('OpenLP.MainWindow', '&Language'))
+ self.help_menu.setTitle(translate('OpenLP.MainWindow', '&Help'))
+ self.media_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Media Manager'))
+ self.service_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Service Manager'))
+ self.theme_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Theme Manager'))
+ self.file_new_item.setText(translate('OpenLP.MainWindow', '&New'))
+ self.file_new_item.setToolTip(UiStrings().NewService)
+ self.file_new_item.setStatusTip(UiStrings().CreateService)
+ self.file_open_item.setText(translate('OpenLP.MainWindow', '&Open'))
+ self.file_open_item.setToolTip(UiStrings().OpenService)
+ self.file_open_item.setStatusTip(translate('OpenLP.MainWindow', 'Open an existing service.'))
+ self.file_save_item.setText(translate('OpenLP.MainWindow', '&Save'))
+ self.file_save_item.setToolTip(UiStrings().SaveService)
+ self.file_save_item.setStatusTip(translate('OpenLP.MainWindow', 'Save the current service to disk.'))
+ self.file_save_as_item.setText(translate('OpenLP.MainWindow', 'Save &As...'))
+ self.file_save_as_item.setToolTip(translate('OpenLP.MainWindow', 'Save Service As'))
+ self.file_save_as_item.setStatusTip(translate('OpenLP.MainWindow',
+ 'Save the current service under a new name.'))
+ self.print_service_order_item.setText(UiStrings().PrintService)
+ self.print_service_order_item.setStatusTip(translate('OpenLP.MainWindow', 'Print the current service.'))
+ self.file_exit_item.setText(translate('OpenLP.MainWindow', 'E&xit'))
+ self.file_exit_item.setStatusTip(translate('OpenLP.MainWindow', 'Quit OpenLP'))
+ self.import_theme_item.setText(translate('OpenLP.MainWindow', '&Theme'))
+ self.import_language_item.setText(translate('OpenLP.MainWindow', '&Language'))
+ self.export_theme_item.setText(translate('OpenLP.MainWindow', '&Theme'))
+ self.export_language_item.setText(translate('OpenLP.MainWindow', '&Language'))
+ self.settings_shortcuts_item.setText(translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
+ self.formatting_tag_item.setText(translate('OpenLP.MainWindow', 'Configure &Formatting Tags...'))
+ self.settings_configure_item.setText(translate('OpenLP.MainWindow', '&Configure OpenLP...'))
+ self.settings_export_item.setStatusTip(translate('OpenLP.MainWindow',
'Export OpenLP settings to a specified *.config file'))
- self.settingsExportItem.setText(translate('OpenLP.MainWindow', 'Settings'))
- self.settingsImportItem.setStatusTip(translate('OpenLP.MainWindow',
+ self.settings_export_item.setText(translate('OpenLP.MainWindow', 'Settings'))
+ self.settings_import_item.setStatusTip(translate('OpenLP.MainWindow',
'Import OpenLP settings from a specified *.config file previously exported on this or another machine'))
- self.settingsImportItem.setText(translate('OpenLP.MainWindow', 'Settings'))
- self.viewMediaManagerItem.setText(translate('OpenLP.MainWindow', '&Media Manager'))
- self.viewMediaManagerItem.setToolTip(translate('OpenLP.MainWindow', 'Toggle Media Manager'))
- self.viewMediaManagerItem.setStatusTip(translate('OpenLP.MainWindow',
+ self.settings_import_item.setText(translate('OpenLP.MainWindow', 'Settings'))
+ self.view_media_manager_item.setText(translate('OpenLP.MainWindow', '&Media Manager'))
+ self.view_media_manager_item.setToolTip(translate('OpenLP.MainWindow', 'Toggle Media Manager'))
+ self.view_media_manager_item.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the media manager.'))
- self.viewThemeManagerItem.setText(translate('OpenLP.MainWindow', '&Theme Manager'))
- self.viewThemeManagerItem.setToolTip(translate('OpenLP.MainWindow', 'Toggle Theme Manager'))
- self.viewThemeManagerItem.setStatusTip(translate('OpenLP.MainWindow',
+ self.view_theme_manager_item.setText(translate('OpenLP.MainWindow', '&Theme Manager'))
+ self.view_theme_manager_item.setToolTip(translate('OpenLP.MainWindow', 'Toggle Theme Manager'))
+ self.view_theme_manager_item.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the theme manager.'))
- self.viewServiceManagerItem.setText(translate('OpenLP.MainWindow', '&Service Manager'))
- self.viewServiceManagerItem.setToolTip(translate('OpenLP.MainWindow', 'Toggle Service Manager'))
- self.viewServiceManagerItem.setStatusTip(translate('OpenLP.MainWindow',
+ self.view_service_manager_item.setText(translate('OpenLP.MainWindow', '&Service Manager'))
+ self.view_service_manager_item.setToolTip(translate('OpenLP.MainWindow', 'Toggle Service Manager'))
+ self.view_service_manager_item.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the service manager.'))
- self.viewPreviewPanel.setText(translate('OpenLP.MainWindow', '&Preview Panel'))
- self.viewPreviewPanel.setToolTip(translate('OpenLP.MainWindow', 'Toggle Preview Panel'))
- self.viewPreviewPanel.setStatusTip(
+ self.view_preview_panel.setText(translate('OpenLP.MainWindow', '&Preview Panel'))
+ self.view_preview_panel.setToolTip(translate('OpenLP.MainWindow', 'Toggle Preview Panel'))
+ self.view_preview_panel.setStatusTip(
translate('OpenLP.MainWindow', 'Toggle the visibility of the preview panel.'))
- self.viewLivePanel.setText(translate('OpenLP.MainWindow', '&Live Panel'))
- self.viewLivePanel.setToolTip(translate('OpenLP.MainWindow', 'Toggle Live Panel'))
+ self.view_live_panel.setText(translate('OpenLP.MainWindow', '&Live Panel'))
+ self.view_live_panel.setToolTip(translate('OpenLP.MainWindow', 'Toggle Live Panel'))
self.lockPanel.setText(translate('OpenLP.MainWindow', 'L&ock Panels'))
self.lockPanel.setStatusTip(translate('OpenLP.MainWindow', 'Prevent the panels being moved.'))
- self.viewLivePanel.setStatusTip(translate('OpenLP.MainWindow', 'Toggle the visibility of the live panel.'))
+ self.view_live_panel.setStatusTip(translate('OpenLP.MainWindow', 'Toggle the visibility of the live panel.'))
self.settingsPluginListItem.setText(translate('OpenLP.MainWindow', '&Plugin List'))
self.settingsPluginListItem.setStatusTip(translate('OpenLP.MainWindow', 'List the Plugins'))
- self.aboutItem.setText(translate('OpenLP.MainWindow', '&About'))
- self.aboutItem.setStatusTip(translate('OpenLP.MainWindow', 'More information about OpenLP'))
+ self.about_item.setText(translate('OpenLP.MainWindow', '&About'))
+ self.about_item.setStatusTip(translate('OpenLP.MainWindow', 'More information about OpenLP'))
if os.name == u'nt':
self.offlineHelpItem.setText(translate('OpenLP.MainWindow', '&User Guide'))
- self.onlineHelpItem.setText(translate('OpenLP.MainWindow', '&Online Help'))
- self.webSiteItem.setText(translate('OpenLP.MainWindow', '&Web Site'))
- for item in self.languageGroup.actions():
+ self.on_line_help_item.setText(translate('OpenLP.MainWindow', '&Online Help'))
+ self.web_site_item.setText(translate('OpenLP.MainWindow', '&Web Site'))
+ for item in self.language_group.actions():
item.setText(item.objectName())
item.setStatusTip(translate('OpenLP.MainWindow', 'Set the interface language to %s') % item.objectName())
- self.autoLanguageItem.setText(translate('OpenLP.MainWindow', '&Autodetect'))
- self.autoLanguageItem.setStatusTip(translate('OpenLP.MainWindow', 'Use the system language, if available.'))
- self.toolsAddToolItem.setText(translate('OpenLP.MainWindow', 'Add &Tool...'))
- self.toolsAddToolItem.setStatusTip(translate('OpenLP.MainWindow', 'Add an application to the list of tools.'))
- self.toolsOpenDataFolder.setText(translate('OpenLP.MainWindow', 'Open &Data Folder...'))
- self.toolsOpenDataFolder.setStatusTip(translate('OpenLP.MainWindow',
+ self.auto_language_item.setText(translate('OpenLP.MainWindow', '&Autodetect'))
+ self.auto_language_item.setStatusTip(translate('OpenLP.MainWindow', 'Use the system language, if available.'))
+ self.tools_add_Tool_Item.setText(translate('OpenLP.MainWindow', 'Add &Tool...'))
+ self.tools_add_Tool_Item.setStatusTip(translate('OpenLP.MainWindow',
+ 'Add an application to the list of tools.'))
+ self.tools_open_data_folder.setText(translate('OpenLP.MainWindow', 'Open &Data Folder...'))
+ self.tools_open_data_folder.setStatusTip(translate('OpenLP.MainWindow',
'Open the folder where songs, bibles and other data resides.'))
- self.toolsFirstTimeWizard.setText(translate('OpenLP.MainWindow', 'Re-run First Time Wizard'))
- self.toolsFirstTimeWizard.setStatusTip(translate('OpenLP.MainWindow',
+ self.tools_first_time_wizard.setText(translate('OpenLP.MainWindow', 'Re-run First Time Wizard'))
+ self.tools_first_time_wizard.setStatusTip(translate('OpenLP.MainWindow',
'Re-run the First Time Wizard, importing songs, Bibles and themes.'))
- self.updateThemeImages.setText(translate('OpenLP.MainWindow', 'Update Theme Images'))
- self.updateThemeImages.setStatusTip(translate('OpenLP.MainWindow', 'Update the preview images for all themes.'))
- self.modeDefaultItem.setText(translate('OpenLP.MainWindow', '&Default'))
- self.modeDefaultItem.setStatusTip(translate('OpenLP.MainWindow', 'Set the view mode back to the default.'))
- self.modeSetupItem.setText(translate('OpenLP.MainWindow', '&Setup'))
- self.modeSetupItem.setStatusTip(translate('OpenLP.MainWindow', 'Set the view mode to Setup.'))
- self.modeLiveItem.setText(translate('OpenLP.MainWindow', '&Live'))
- self.modeLiveItem.setStatusTip(translate('OpenLP.MainWindow', 'Set the view mode to Live.'))
+ self.update_theme_images.setText(translate('OpenLP.MainWindow', 'Update Theme Images'))
+ self.update_theme_images.setStatusTip(translate('OpenLP.MainWindow',
+ 'Update the preview images for all themes.'))
+ self.mode_default_Item.setText(translate('OpenLP.MainWindow', '&Default'))
+ self.mode_default_Item.setStatusTip(translate('OpenLP.MainWindow', 'Set the view mode back to the default.'))
+ self.mode_setup_item.setText(translate('OpenLP.MainWindow', '&Setup'))
+ self.mode_setup_item.setStatusTip(translate('OpenLP.MainWindow', 'Set the view mode to Setup.'))
+ self.mode_live_item.setText(translate('OpenLP.MainWindow', '&Live'))
+ self.mode_live_item.setStatusTip(translate('OpenLP.MainWindow', 'Set the view mode to Live.'))
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
@@ -470,63 +475,63 @@
self.clipboard = self.application.clipboard()
self.arguments = self.application.args
# Set up settings sections for the main application (not for use by plugins).
- self.uiSettingsSection = u'user interface'
- self.generalSettingsSection = u'general'
- self.advancedSettingsSection = u'advanced'
- self.shortcutsSettingsSection = u'shortcuts'
- self.serviceManagerSettingsSection = u'servicemanager'
- self.songsSettingsSection = u'songs'
- self.themesSettingsSection = u'themes'
- self.playersSettingsSection = u'players'
- self.displayTagsSection = u'displayTags'
- self.headerSection = u'SettingsImport'
- self.recentFiles = []
+ self.ui_settings_section = u'user interface'
+ self.general_settings_section = u'general'
+ self.advanced_settings_section = u'advanced'
+ self.shortcuts_settings_section = u'shortcuts'
+ self.service_manager_settings_section = u'servicemanager'
+ self.songs_settings_section = u'songs'
+ self.themes_settings_section = u'themes'
+ self.players_settings_section = u'players'
+ self.display_tags_section = u'displayTags'
+ self.header_section = u'SettingsImport'
+ self.recent_files = []
self.timer_id = 0
self.timer_version_id = 0
self.new_data_path = None
self.copy_data = False
Settings().set_up_default_values()
Settings().remove_obsolete_settings()
- self.serviceNotSaved = False
- self.aboutForm = AboutForm(self)
+ self.service_not_saved = False
+ self.about_form = AboutForm(self)
self.media_controller = MediaController()
- self.settingsForm = SettingsForm(self)
- self.formattingTagForm = FormattingTagForm(self)
- self.shortcutForm = ShortcutListForm(self)
+ self.settings_form = SettingsForm(self)
+ self.formatting_tag_form = FormattingTagForm(self)
+ self.shortcut_form = ShortcutListForm(self)
# Set up the path with plugins
self.plugin_manager = PluginManager()
self.image_manager = ImageManager()
# Set up the interface
self.setupUi(self)
# Define the media Dock Manager
- self.mediaDockManager = MediaDockManager(self.mediaToolBox)
+ self.media_dock_manager = MediaDockManager(self.media_tool_box)
# Load settings after setupUi so default UI sizes are overwritten
- self.loadSettings()
+ self.load_settings()
# Once settings are loaded update the menu with the recent files.
- self.updateRecentFilesMenu()
- self.pluginForm = PluginForm(self)
+ self.update_recent_files_menu()
+ self.plugin_form = PluginForm(self)
# Set up signals and slots
- self.mediaManagerDock.visibilityChanged.connect(self.viewMediaManagerItem.setChecked)
- self.serviceManagerDock.visibilityChanged.connect(self.viewServiceManagerItem.setChecked)
- self.themeManagerDock.visibilityChanged.connect(self.viewThemeManagerItem.setChecked)
- self.importThemeItem.triggered.connect(self.themeManagerContents.on_import_theme)
- self.exportThemeItem.triggered.connect(self.themeManagerContents.on_export_theme)
- self.webSiteItem.triggered.connect(self.onHelpWebSiteClicked)
- self.toolsOpenDataFolder.triggered.connect(self.onToolsOpenDataFolderClicked)
- self.toolsFirstTimeWizard.triggered.connect(self.onFirstTimeWizardClicked)
- self.updateThemeImages.triggered.connect(self.onUpdateThemeImages)
- self.formattingTagItem.triggered.connect(self.onFormattingTagItemClicked)
- self.settingsConfigureItem.triggered.connect(self.onSettingsConfigureItemClicked)
- self.settingsShortcutsItem.triggered.connect(self.onSettingsShortcutsItemClicked)
- self.settingsImportItem.triggered.connect(self.onSettingsImportItemClicked)
- self.settingsExportItem.triggered.connect(self.onSettingsExportItemClicked)
+ self.media_manager_dock.visibilityChanged.connect(self.view_media_manager_item.setChecked)
+ self.service_manager_dock.visibilityChanged.connect(self.view_service_manager_item.setChecked)
+ self.theme_manager_dock.visibilityChanged.connect(self.view_theme_manager_item.setChecked)
+ self.import_theme_item.triggered.connect(self.theme_manager_contents.on_import_theme)
+ self.export_theme_item.triggered.connect(self.theme_manager_contents.on_export_theme)
+ self.web_site_item.triggered.connect(self.onHelpWebSiteClicked)
+ self.tools_open_data_folder.triggered.connect(self.onToolsOpenDataFolderClicked)
+ self.tools_first_time_wizard.triggered.connect(self.onFirstTimeWizardClicked)
+ self.update_theme_images.triggered.connect(self.onUpdateThemeImages)
+ self.formatting_tag_item.triggered.connect(self.onFormattingTagItemClicked)
+ self.settings_configure_item.triggered.connect(self.onSettingsConfigureItemClicked)
+ self.settings_shortcuts_item.triggered.connect(self.onSettingsShortcutsItemClicked)
+ self.settings_import_item.triggered.connect(self.onSettingsImportItemClicked)
+ self.settings_export_item.triggered.connect(self.onSettingsExportItemClicked)
# i18n set signals for languages
- self.languageGroup.triggered.connect(LanguageManager.set_language)
- self.modeDefaultItem.triggered.connect(self.onModeDefaultItemClicked)
- self.modeSetupItem.triggered.connect(self.onModeSetupItemClicked)
- self.modeLiveItem.triggered.connect(self.onModeLiveItemClicked)
+ self.language_group.triggered.connect(LanguageManager.set_language)
+ self.mode_default_Item.triggered.connect(self.onModeDefaultItemClicked)
+ self.mode_setup_item.triggered.connect(self.onModeSetupItemClicked)
+ self.mode_live_item.triggered.connect(self.onModeLiveItemClicked)
# Media Manager
- self.mediaToolBox.currentChanged.connect(self.onMediaToolBoxChanged)
+ self.media_tool_box.currentChanged.connect(self.onMediaToolBoxChanged)
self.application.set_busy_cursor()
# Simple message boxes
Registry().register_function(u'theme_update_global', self.default_theme_changed)
@@ -537,7 +542,7 @@
if Settings().value(u'advanced/save current plugin'):
savedPlugin = Settings().value(u'advanced/current media plugin')
if savedPlugin != -1:
- self.mediaToolBox.setCurrentIndex(savedPlugin)
+ self.media_tool_box.setCurrentIndex(savedPlugin)
# Reset the cursor
self.application.set_normal_cursor()
@@ -545,15 +550,15 @@
"""
Set the language to automatic.
"""
- self.languageGroup.setDisabled(value)
+ self.language_group.setDisabled(value)
LanguageManager.auto_language = value
- LanguageManager.set_language(self.languageGroup.checkedAction())
+ LanguageManager.set_language(self.language_group.checkedAction())
def onMediaToolBoxChanged(self, index):
"""
Focus a widget when the media toolbox changes.
"""
- widget = self.mediaToolBox.widget(index)
+ widget = self.media_tool_box.widget(index)
if widget:
widget.onFocus()
@@ -582,19 +587,19 @@
filename = args[0]
if not isinstance(filename, unicode):
filename = unicode(filename, sys.getfilesystemencoding())
- self.serviceManagerContents.load_file(filename)
- elif Settings().value(self.generalSettingsSection + u'/auto open'):
- self.serviceManagerContents.load_Last_file()
+ self.service_manager_contents.load_file(filename)
+ elif Settings().value(self.general_settings_section + u'/auto open'):
+ self.service_manager_contents.load_Last_file()
self.timer_version_id = self.startTimer(1000)
- view_mode = Settings().value(u'%s/view mode' % self.generalSettingsSection)
+ view_mode = Settings().value(u'%s/view mode' % self.general_settings_section)
if view_mode == u'default':
- self.modeDefaultItem.setChecked(True)
+ self.mode_default_Item.setChecked(True)
elif view_mode == u'setup':
self.setViewMode(True, True, False, True, False)
- self.modeSetupItem.setChecked(True)
+ self.mode_setup_item.setChecked(True)
elif view_mode == u'live':
self.setViewMode(False, True, False, False, True)
- self.modeLiveItem.setChecked(True)
+ self.mode_live_item.setChecked(True)
def app_startup(self):
"""
@@ -654,8 +659,8 @@
else:
self.activePlugin.toggleStatus(PluginStatus.Inactive)
# Set global theme and
- Registry().execute(u'theme_update_global', self.themeManagerContents.global_theme)
- self.themeManagerContents.load_first_time_themes()
+ Registry().execute(u'theme_update_global', self.theme_manager_contents.global_theme)
+ self.theme_manager_contents.load_first_time_themes()
# Check if any Bibles downloaded. If there are, they will be processed.
Registry().execute(u'bibles_load_list', True)
self.application.set_normal_cursor()
@@ -666,8 +671,8 @@
"""
settings = Settings()
self.live_controller.mainDisplaySetBackground()
- if settings.value(u'%s/screen blank' % self.generalSettingsSection):
- if settings.value(u'%s/blank warning' % self.generalSettingsSection):
+ if settings.value(u'%s/screen blank' % self.general_settings_section):
+ if settings.value(u'%s/blank warning' % self.general_settings_section):
QtGui.QMessageBox.question(self, translate('OpenLP.MainWindow', 'OpenLP Main Display Blanked'),
translate('OpenLP.MainWindow', 'The Main Display has been blanked out'))
@@ -734,14 +739,14 @@
"""
Show the About form
"""
- self.aboutForm.exec_()
+ self.about_form.exec_()
- def onPluginItemClicked(self):
+ def on_plugin_item_clicked(self):
"""
Show the Plugin form
"""
- self.pluginForm.load()
- self.pluginForm.exec_()
+ self.plugin_form.load()
+ self.plugin_form.exec_()
def onToolsOpenDataFolderClicked(self):
"""
@@ -754,19 +759,19 @@
"""
Updates the new theme preview images.
"""
- self.themeManagerContents.update_preview_images()
+ self.theme_manager_contents.update_preview_images()
def onFormattingTagItemClicked(self):
"""
Show the Settings dialog
"""
- self.formattingTagForm.exec_()
+ self.formatting_tag_form.exec_()
def onSettingsConfigureItemClicked(self):
"""
Show the Settings dialog
"""
- self.settingsForm.exec_()
+ self.settings_form.exec_()
def paintEvent(self, event):
"""
@@ -779,8 +784,8 @@
"""
Show the shortcuts dialog
"""
- if self.shortcutForm.exec_():
- self.shortcutForm.save()
+ if self.shortcut_form.exec_():
+ self.shortcut_form.save()
def onSettingsImportItemClicked(self):
"""
@@ -800,15 +805,15 @@
return
setting_sections = []
# Add main sections.
- setting_sections.extend([self.generalSettingsSection])
- setting_sections.extend([self.advancedSettingsSection])
- setting_sections.extend([self.uiSettingsSection])
- setting_sections.extend([self.shortcutsSettingsSection])
- setting_sections.extend([self.serviceManagerSettingsSection])
- setting_sections.extend([self.themesSettingsSection])
- setting_sections.extend([self.playersSettingsSection])
- setting_sections.extend([self.displayTagsSection])
- setting_sections.extend([self.headerSection])
+ setting_sections.extend([self.general_settings_section])
+ setting_sections.extend([self.advanced_settings_section])
+ setting_sections.extend([self.ui_settings_section])
+ setting_sections.extend([self.shortcuts_settings_section])
+ setting_sections.extend([self.service_manager_settings_section])
+ setting_sections.extend([self.themes_settings_section])
+ setting_sections.extend([self.players_settings_section])
+ setting_sections.extend([self.display_tags_section])
+ setting_sections.extend([self.header_section])
setting_sections.extend([u'crashreport'])
# Add plugin sections.
for plugin in self.plugin_manager.plugins:
@@ -854,7 +859,7 @@
if value is not None:
settings.setValue(u'%s' % (section_key), value)
now = datetime.now()
- settings.beginGroup(self.headerSection)
+ settings.beginGroup(self.header_section)
settings.setValue(u'file_imported', import_file_name)
settings.setValue(u'file_date_imported', now.strftime("%Y-%m-%d %H:%M"))
settings.endGroup()
@@ -887,13 +892,13 @@
self.save_settings()
setting_sections = []
# Add main sections.
- setting_sections.extend([self.generalSettingsSection])
- setting_sections.extend([self.advancedSettingsSection])
- setting_sections.extend([self.uiSettingsSection])
- setting_sections.extend([self.shortcutsSettingsSection])
- setting_sections.extend([self.serviceManagerSettingsSection])
- setting_sections.extend([self.themesSettingsSection])
- setting_sections.extend([self.displayTagsSection])
+ setting_sections.extend([self.general_settings_section])
+ setting_sections.extend([self.advanced_settings_section])
+ setting_sections.extend([self.ui_settings_section])
+ setting_sections.extend([self.shortcuts_settings_section])
+ setting_sections.extend([self.service_manager_settings_section])
+ setting_sections.extend([self.themes_settings_section])
+ setting_sections.extend([self.display_tags_section])
# Add plugin sections.
for plugin in self.plugin_manager.plugins:
setting_sections.extend([plugin.name])
@@ -903,7 +908,7 @@
if os.path.exists(export_file_name):
os.remove(export_file_name)
settings = Settings()
- settings.remove(self.headerSection)
+ settings.remove(self.header_section)
# Get the settings.
keys = settings.allKeys()
export_settings = Settings(temp_file, Settings.IniFormat)
@@ -913,7 +918,7 @@
application_version = get_application_version()
# Write INI format using Qsettings.
# Write our header.
- export_settings.beginGroup(self.headerSection)
+ export_settings.beginGroup(self.header_section)
export_settings.setValue(u'Make_Changes', u'At_Own_RISK')
export_settings.setValue(u'type', u'OpenLP_settings_export')
export_settings.setValue(u'file_date_created', now.strftime("%Y-%m-%d %H:%M"))
@@ -967,12 +972,12 @@
"""
if mode:
settings = Settings()
- settings.setValue(u'%s/view mode' % self.generalSettingsSection, mode)
- self.mediaManagerDock.setVisible(media)
- self.serviceManagerDock.setVisible(service)
- self.themeManagerDock.setVisible(theme)
- self.setPreviewPanelVisibility(preview)
- self.setLivePanelVisibility(live)
+ settings.setValue(u'%s/view mode' % self.general_settings_section, mode)
+ self.media_manager_dock.setVisible(media)
+ self.service_manager_dock.setVisible(service)
+ self.theme_manager_dock.setVisible(theme)
+ self.set_preview_panel_visibility(preview)
+ self.set_live_panel_visibility(live)
def screen_changed(self):
"""
@@ -1002,10 +1007,10 @@
if self.settingsImported:
self.clean_up(False)
event.accept()
- if self.serviceManagerContents.is_modified():
- ret = self.serviceManagerContents.save_modified_service()
+ if self.service_manager_contents.is_modified():
+ ret = self.service_manager_contents.save_modified_service()
if ret == QtGui.QMessageBox.Save:
- if self.serviceManagerContents.decide_save_method():
+ if self.service_manager_contents.decide_save_method():
self.clean_up()
event.accept()
else:
@@ -1041,10 +1046,10 @@
while self.image_manager.image_thread.isRunning():
time.sleep(0.1)
# Clean temporary files used by services
- self.serviceManagerContents.clean_up()
+ self.service_manager_contents.clean_up()
if save_settings:
if Settings().value(u'advanced/save current plugin'):
- Settings().setValue(u'advanced/current media plugin', self.mediaToolBox.currentIndex())
+ Settings().setValue(u'advanced/current media plugin', self.media_tool_box.currentIndex())
# Call the cleanup method to shutdown plugins.
log.info(u'cleanup plugins')
self.plugin_manager.finalise_plugins()
@@ -1053,13 +1058,13 @@
self.save_settings()
# Check if we need to change the data directory
if self.new_data_path:
- self.changeDataDirectory()
+ self.change_data_directory()
# Close down the display
if self.live_controller.display:
self.live_controller.display.close()
self.live_controller.display = None
- def serviceChanged(self, reset=False, serviceName=None):
+ def service_changed(self, reset=False, serviceName=None):
"""
Hook to change the main window title when the service changes
@@ -1074,14 +1079,14 @@
else:
service_name = serviceName
if reset:
- self.serviceNotSaved = False
+ self.service_not_saved = False
title = u'%s - %s' % (self.mainTitle, service_name)
else:
- self.serviceNotSaved = True
+ self.service_not_saved = True
title = u'%s - %s*' % (self.mainTitle, service_name)
self.setWindowTitle(title)
- def setServiceModified(self, modified, fileName):
+ def set_service_modified(self, modified, fileName):
"""
This method is called from the ServiceManager to set the title of the
main window.
@@ -1102,34 +1107,34 @@
"""
Show a message in the status bar
"""
- self.statusBar.showMessage(message)
+ self.status_bar.showMessage(message)
def default_theme_changed(self):
"""
Update the default theme indicator in the status bar
"""
- self.defaultThemeLabel.setText(translate('OpenLP.MainWindow', 'Default Theme: %s') %
+ self.default_theme_label.setText(translate('OpenLP.MainWindow', 'Default Theme: %s') %
Settings().value(u'themes/global theme'))
- def toggleMediaManager(self):
+ def toggle_media_manager(self):
"""
Toggle the visibility of the media manager
"""
- self.mediaManagerDock.setVisible(not self.mediaManagerDock.isVisible())
+ self.media_manager_dock.setVisible(not self.media_manager_dock.isVisible())
- def toggleServiceManager(self):
+ def toggle_service_manager(self):
"""
Toggle the visibility of the service manager
"""
- self.serviceManagerDock.setVisible(not self.serviceManagerDock.isVisible())
+ self.service_manager_dock.setVisible(not self.service_manager_dock.isVisible())
- def toggleThemeManager(self):
+ def toggle_theme_manager(self):
"""
Toggle the visibility of the theme manager
"""
- self.themeManagerDock.setVisible(not self.themeManagerDock.isVisible())
+ self.theme_manager_dock.setVisible(not self.theme_manager_dock.isVisible())
- def setPreviewPanelVisibility(self, visible):
+ def set_preview_panel_visibility(self, visible):
"""
Sets the visibility of the preview panel including saving the setting
and updating the menu.
@@ -1141,33 +1146,33 @@
"""
self.preview_controller.panel.setVisible(visible)
Settings().setValue(u'user interface/preview panel', visible)
- self.viewPreviewPanel.setChecked(visible)
+ self.view_preview_panel.setChecked(visible)
- def setLockPanel(self, lock):
+ def set_lock_panel(self, lock):
"""
Sets the ability to stop the toolbars being changed.
"""
if lock:
- self.themeManagerDock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
- self.serviceManagerDock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
- self.mediaManagerDock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
- self.viewMediaManagerItem.setEnabled(False)
- self.viewServiceManagerItem.setEnabled(False)
- self.viewThemeManagerItem.setEnabled(False)
- self.viewPreviewPanel.setEnabled(False)
- self.viewLivePanel.setEnabled(False)
+ self.theme_manager_dock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
+ self.service_manager_dock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
+ self.media_manager_dock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
+ self.view_media_manager_item.setEnabled(False)
+ self.view_service_manager_item.setEnabled(False)
+ self.view_theme_manager_item.setEnabled(False)
+ self.view_preview_panel.setEnabled(False)
+ self.view_live_panel.setEnabled(False)
else:
- self.themeManagerDock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
- self.serviceManagerDock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
- self.mediaManagerDock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
- self.viewMediaManagerItem.setEnabled(True)
- self.viewServiceManagerItem.setEnabled(True)
- self.viewThemeManagerItem.setEnabled(True)
- self.viewPreviewPanel.setEnabled(True)
- self.viewLivePanel.setEnabled(True)
+ self.theme_manager_dock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
+ self.service_manager_dock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
+ self.media_manager_dock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
+ self.view_media_manager_item.setEnabled(True)
+ self.view_service_manager_item.setEnabled(True)
+ self.view_theme_manager_item.setEnabled(True)
+ self.view_preview_panel.setEnabled(True)
+ self.view_live_panel.setEnabled(True)
Settings().setValue(u'user interface/lock panel', lock)
- def setLivePanelVisibility(self, visible):
+ def set_live_panel_visibility(self, visible):
"""
Sets the visibility of the live panel including saving the setting and
updating the menu.
@@ -1179,9 +1184,9 @@
"""
self.live_controller.panel.setVisible(visible)
Settings().setValue(u'user interface/live panel', visible)
- self.viewLivePanel.setChecked(visible)
+ self.view_live_panel.setChecked(visible)
- def loadSettings(self):
+ def load_settings(self):
"""
Load the main window settings.
"""
@@ -1190,10 +1195,10 @@
# Remove obsolete entries.
settings.remove(u'custom slide')
settings.remove(u'service')
- settings.beginGroup(self.generalSettingsSection)
- self.recentFiles = settings.value(u'recent files')
+ settings.beginGroup(self.general_settings_section)
+ self.recent_files = settings.value(u'recent files')
settings.endGroup()
- settings.beginGroup(self.uiSettingsSection)
+ settings.beginGroup(self.ui_settings_section)
self.move(settings.value(u'main window position'))
self.restoreGeometry(settings.value(u'main window geometry'))
self.restoreState(settings.value(u'main window state'))
@@ -1211,10 +1216,10 @@
return
log.debug(u'Saving QSettings')
settings = Settings()
- settings.beginGroup(self.generalSettingsSection)
- settings.setValue(u'recent files', self.recentFiles)
+ settings.beginGroup(self.general_settings_section)
+ settings.setValue(u'recent files', self.recent_files)
settings.endGroup()
- settings.beginGroup(self.uiSettingsSection)
+ settings.beginGroup(self.ui_settings_section)
settings.setValue(u'main window position', self.pos())
settings.setValue(u'main window state', self.saveState())
settings.setValue(u'main window geometry', self.saveGeometry())
@@ -1223,42 +1228,42 @@
settings.setValue(u'main window splitter geometry', self.controlSplitter.saveState())
settings.endGroup()
- def updateRecentFilesMenu(self):
+ def update_recent_files_menu(self):
"""
Updates the recent file menu with the latest list of service files
accessed.
"""
- recentFileCount = Settings().value(u'advanced/recent file count')
- existingRecentFiles = [recentFile for recentFile in self.recentFiles
+ recent_file_count = Settings().value(u'advanced/recent file count')
+ existing_recent_files = [recentFile for recentFile in self.recent_files
if os.path.isfile(unicode(recentFile))]
- recentFilesToDisplay = existingRecentFiles[0:recentFileCount]
- self.recentFilesMenu.clear()
- for fileId, filename in enumerate(recentFilesToDisplay):
+ recent_files_to_display = existing_recent_files[0:recent_file_count]
+ self.recent_files_menu.clear()
+ for file_id, filename in enumerate(recent_files_to_display):
log.debug('Recent file name: %s', filename)
action = create_action(self, u'',
- text=u'&%d %s' % (fileId + 1, os.path.splitext(os.path.basename(
+ text=u'&%d %s' % (file_id + 1, os.path.splitext(os.path.basename(
unicode(filename)))[0]), data=filename,
- triggers=self.serviceManagerContents.on_recent_service_clicked)
- self.recentFilesMenu.addAction(action)
- clearRecentFilesAction = create_action(self, u'',
+ triggers=self.service_manager_contents.on_recent_service_clicked)
+ self.recent_files_menu.addAction(action)
+ clear_recent_files_action = create_action(self, u'',
text=translate('OpenLP.MainWindow', 'Clear List', 'Clear List of recent files'),
statustip=translate('OpenLP.MainWindow', 'Clear the list of recent files.'),
- enabled=bool(self.recentFiles),
- triggers=self.clearRecentFileMenu)
- add_actions(self.recentFilesMenu, (None, clearRecentFilesAction))
- clearRecentFilesAction.setEnabled(bool(self.recentFiles))
+ enabled=bool(self.recent_files),
+ triggers=self.clear_recent_file_menu)
+ add_actions(self.recent_files_menu, (None, clear_recent_files_action))
+ clear_recent_files_action.setEnabled(bool(self.recent_files))
- def addRecentFile(self, filename):
+ def add_recent_file(self, filename):
"""
Adds a service to the list of recently used files.
``filename``
The service filename to add
"""
- # The maxRecentFiles value does not have an interface and so never gets
+ # The max_recent_files value does not have an interface and so never gets
# actually stored in the settings therefore the default value of 20 will
# always be used.
- maxRecentFiles = Settings().value(u'advanced/max recent files')
+ max_recent_files = Settings().value(u'advanced/max recent files')
if filename:
# Add some cleanup to reduce duplication in the recent file list
filename = os.path.abspath(filename)
@@ -1266,35 +1271,35 @@
# in the given filename which then causes duplication.
if filename[1:3] == ':\\':
filename = filename[0].upper() + filename[1:]
- if filename in self.recentFiles:
- self.recentFiles.remove(filename)
- self.recentFiles.insert(0, filename)
- while len(self.recentFiles) > maxRecentFiles:
- self.recentFiles.pop()
+ if filename in self.recent_files:
+ self.recent_files.remove(filename)
+ self.recent_files.insert(0, filename)
+ while len(self.recent_files) > max_recent_files:
+ self.recent_files.pop()
- def clearRecentFileMenu(self):
+ def clear_recent_file_menu(self):
"""
Clears the recent files.
"""
- self.recentFiles = []
+ self.recent_files = []
- def displayProgressBar(self, size):
+ def display_progress_bar(self, size):
"""
Make Progress bar visible and set size
"""
- self.loadProgressBar.show()
- self.loadProgressBar.setMaximum(size)
- self.loadProgressBar.setValue(0)
+ self.load_progress_bar.show()
+ self.load_progress_bar.setMaximum(size)
+ self.load_progress_bar.setValue(0)
self.application.process_events()
def increment_progress_bar(self):
"""
Increase the Progress Bar value by 1
"""
- self.loadProgressBar.setValue(self.loadProgressBar.value() + 1)
+ self.load_progress_bar.setValue(self.load_progress_bar.value() + 1)
self.application.process_events()
- def finishedProgressBar(self):
+ def finished_progress_bar(self):
"""
Trigger it's removal after 2.5 second
"""
@@ -1306,7 +1311,7 @@
"""
if event.timerId() == self.timer_id:
self.timer_id = 0
- self.loadProgressBar.hide()
+ self.load_progress_bar.hide()
self.application.process_events()
if event.timerId() == self.timer_version_id:
self.timer_version_id = 0
@@ -1332,7 +1337,7 @@
"""
self.copy_data = copy_data
- def changeDataDirectory(self):
+ def change_data_directory(self):
"""
Change the data directory.
"""
=== modified file 'openlp/core/ui/media/playertab.py'
--- openlp/core/ui/media/playertab.py 2013-03-10 20:19:42 +0000
+++ openlp/core/ui/media/playertab.py 2013-03-16 20:56:21 +0000
@@ -36,9 +36,9 @@
from openlp.core.ui.media import get_media_players, set_media_players
-class MediaQCheckBox(QtGui.QCheckBox):
+class MediaQ_check_box(QtGui.QCheckBox):
"""
- MediaQCheckBox adds an extra property, playerName to the QCheckBox class.
+ MediaQ_check_box adds an extra property, playerName to the Q_check_box class.
"""
def setPlayerName(self, name):
"""
@@ -56,7 +56,7 @@
Constructor
"""
self.media_players = self.media_controller.media_players
- self.savedUsedPlayers = None
+ self.saved_used_players = None
self.iconPath = u':/media/multimedia-player.png'
player_translated = translate('OpenLP.PlayerTab', 'Players')
SettingsTab.__init__(self, parent, u'Players', player_translated)
@@ -67,150 +67,151 @@
"""
self.setObjectName(u'MediaTab')
SettingsTab.setupUi(self)
- self.bgColorGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.bgColorGroupBox.setObjectName(u'FontGroupBox')
- self.formLayout = QtGui.QFormLayout(self.bgColorGroupBox)
- self.formLayout.setObjectName(u'FormLayout')
- self.colorLayout = QtGui.QHBoxLayout()
- self.backgroundColorLabel = QtGui.QLabel(self.bgColorGroupBox)
- self.backgroundColorLabel.setObjectName(u'BackgroundColorLabel')
- self.colorLayout.addWidget(self.backgroundColorLabel)
- self.backgroundColorButton = QtGui.QPushButton(self.bgColorGroupBox)
- self.backgroundColorButton.setObjectName(u'BackgroundColorButton')
- self.colorLayout.addWidget(self.backgroundColorButton)
- self.formLayout.addRow(self.colorLayout)
- self.information_label = QtGui.QLabel(self.bgColorGroupBox)
+ self.background_Color_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.background_Color_group_box.setObjectName(u'Font_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.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.color_layout.addWidget(self.background_color_button)
+ self.form_layout.addRow(self.color_layout)
+ self.information_label = QtGui.QLabel(self.background_Color_group_box)
self.information_label.setObjectName(u'information_label')
self.information_label.setWordWrap(True)
- self.formLayout.addRow(self.information_label)
- self.leftLayout.addWidget(self.bgColorGroupBox)
- self.leftLayout.addStretch()
+ self.form_layout.addRow(self.information_label)
+ self.left_layout.addWidget(self.background_Color_group_box)
+ self.left_layout.addStretch()
self.rightColumn.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
- self.rightLayout.addStretch()
- self.mediaPlayerGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.mediaPlayerGroupBox.setObjectName(u'mediaPlayerGroupBox')
- self.mediaPlayerLayout = QtGui.QVBoxLayout(self.mediaPlayerGroupBox)
- self.mediaPlayerLayout.setObjectName(u'mediaPlayerLayout')
- self.playerCheckBoxes = {}
- self.leftLayout.addWidget(self.mediaPlayerGroupBox)
- self.playerOrderGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.playerOrderGroupBox.setObjectName(u'playerOrderGroupBox')
- self.playerOrderLayout = QtGui.QHBoxLayout(self.playerOrderGroupBox)
- self.playerOrderLayout.setObjectName(u'playerOrderLayout')
- self.playerOrderlistWidget = QtGui.QListWidget(self.playerOrderGroupBox)
+ self.right_layout.addStretch()
+ self.media_player_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.media_player_group_box.setObjectName(u'media_player_group_box')
+ self.media_player_layout = QtGui.QVBoxLayout(self.media_player_group_box)
+ self.media_player_layout.setObjectName(u'media_player_layout')
+ self.player_check_boxes = {}
+ self.left_layout.addWidget(self.media_player_group_box)
+ self.player_order_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.player_order_group_box.setObjectName(u'player_order_group_box')
+ self.player_order_layout = QtGui.QHBoxLayout(self.player_order_group_box)
+ self.player_order_layout.setObjectName(u'player_order_layout')
+ self.player_order_list_widget = QtGui.QListWidget(self.player_order_group_box)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.playerOrderlistWidget.sizePolicy().hasHeightForWidth())
- self.playerOrderlistWidget.setSizePolicy(sizePolicy)
- self.playerOrderlistWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.playerOrderlistWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.playerOrderlistWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
- self.playerOrderlistWidget.setObjectName(u'playerOrderlistWidget')
- self.playerOrderLayout.addWidget(self.playerOrderlistWidget)
- self.orderingButtonLayout = QtGui.QVBoxLayout()
- self.orderingButtonLayout.setObjectName(u'orderingButtonLayout')
- self.orderingButtonLayout.addStretch(1)
- self.orderingUpButton = create_button(self, u'orderingUpButton', role=u'up', click=self.onUpButtonClicked)
- self.orderingDownButton = create_button(self, u'orderingDownButton', role=u'down',
- click=self.onDownButtonClicked)
- self.orderingButtonLayout.addWidget(self.orderingUpButton)
- self.orderingButtonLayout.addWidget(self.orderingDownButton)
- self.orderingButtonLayout.addStretch(1)
- self.playerOrderLayout.addLayout(self.orderingButtonLayout)
- self.leftLayout.addWidget(self.playerOrderGroupBox)
- self.leftLayout.addStretch()
- self.rightLayout.addStretch()
+ sizePolicy.setHeightForWidth(self.player_order_list_widget.sizePolicy().hasHeightForWidth())
+ self.player_order_list_widget.setSizePolicy(sizePolicy)
+ self.player_order_list_widget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
+ self.player_order_list_widget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ self.player_order_list_widget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
+ self.player_order_list_widget.setObjectName(u'player_order_list_widget')
+ self.player_order_layout.addWidget(self.player_order_list_widget)
+ self.ordering_button_layout = QtGui.QVBoxLayout()
+ self.ordering_button_layout.setObjectName(u'ordering_button_layout')
+ self.ordering_button_layout.addStretch(1)
+ self.ordering_up_button = create_button(self, u'ordering_up_button', role=u'up',
+ click=self.on_up_button_clicked)
+ self.ordering_down_button = create_button(self, u'ordering_down_button', role=u'down',
+ click=self.on_down_button_clicked)
+ self.ordering_button_layout.addWidget(self.ordering_up_button)
+ self.ordering_button_layout.addWidget(self.ordering_down_button)
+ self.ordering_button_layout.addStretch(1)
+ self.player_order_layout.add_layout(self.ordering_button_layout)
+ self.left_layout.addWidget(self.player_order_group_box)
+ self.left_layout.addStretch()
+ self.right_layout.addStretch()
# Signals and slots
- self.backgroundColorButton.clicked.connect(self.onbackgroundColorButtonClicked)
+ self.background_color_button.clicked.connect(self.on_background_color_button_Clicked)
def retranslateUi(self):
"""
Translate the UI on the fly
"""
- self.mediaPlayerGroupBox.setTitle(translate('OpenLP.PlayerTab', 'Available Media Players'))
- self.playerOrderGroupBox.setTitle(translate('OpenLP.PlayerTab', 'Player Search Order'))
- self.bgColorGroupBox.setTitle(UiStrings().BackgroundColor)
- self.backgroundColorLabel.setText(UiStrings().DefaultColor)
+ self.media_player_group_box.setTitle(translate('OpenLP.PlayerTab', 'Available Media Players'))
+ self.player_order_group_box.setTitle(translate('OpenLP.PlayerTab', 'Player Search Order'))
+ self.background_Color_group_box.setTitle(UiStrings().BackgroundColor)
+ self.background_color_label.setText(UiStrings().DefaultColor)
self.information_label.setText(translate('OpenLP.PlayerTab',
'Visible background for videos with aspect ratio different to screen.'))
self.retranslatePlayers()
- def onbackgroundColorButtonClicked(self):
+ def on_background_color_button_clicked(self):
"""
Set the background color
"""
- new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.bg_color), self)
+ new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.background_color), self)
if new_color.isValid():
- self.bg_color = new_color.name()
- self.backgroundColorButton.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 onPlayerCheckBoxChanged(self, check_state):
+ def on_player_check_box_changed(self, check_state):
"""
Add or remove players depending on their status
"""
player = self.sender().playerName
if check_state == QtCore.Qt.Checked:
- if player not in self.usedPlayers:
- self.usedPlayers.append(player)
+ if player not in self.used_players:
+ self.used_players.append(player)
else:
- if player in self.usedPlayers:
- self.usedPlayers.remove(player)
- self.updatePlayerList()
+ if player in self.used_players:
+ self.used_players.remove(player)
+ self.update_player_list()
- def updatePlayerList(self):
+ def update_player_list(self):
"""
Update the list of media players
"""
- self.playerOrderlistWidget.clear()
- for player in self.usedPlayers:
- if player in self.playerCheckBoxes.keys():
- if len(self.usedPlayers) == 1:
+ self.player_order_list_widget.clear()
+ for player in self.used_players:
+ if player in self.player_check_boxes.keys():
+ if len(self.used_players) == 1:
# At least one media player has to stay active
- self.playerCheckBoxes[u'%s' % player].setEnabled(False)
+ self.player_check_boxes[u'%s' % player].setEnabled(False)
else:
- self.playerCheckBoxes[u'%s' % player].setEnabled(True)
- self.playerOrderlistWidget.addItem(self.media_players[unicode(player)].original_name)
+ self.player_check_boxes[u'%s' % player].setEnabled(True)
+ self.player_order_list_widget.addItem(self.media_players[unicode(player)].original_name)
- def onUpButtonClicked(self):
+ def on_up_button_clicked(self):
"""
Move a media player up in the order
"""
- row = self.playerOrderlistWidget.currentRow()
+ row = self.player_order_list_widget.currentRow()
if row <= 0:
return
- item = self.playerOrderlistWidget.takeItem(row)
- self.playerOrderlistWidget.insertItem(row - 1, item)
- self.playerOrderlistWidget.setCurrentRow(row - 1)
- self.usedPlayers.insert(row - 1, self.usedPlayers.pop(row))
+ item = self.player_order_list_widget.takeItem(row)
+ self.player_order_list_widget.insertItem(row - 1, item)
+ self.player_order_list_widget.setCurrentRow(row - 1)
+ self.used_players.insert(row - 1, self.used_players.pop(row))
- def onDownButtonClicked(self):
+ def on_down_button_clicked(self):
"""
Move a media player down in the order
"""
- row = self.playerOrderlistWidget.currentRow()
- if row == -1 or row > self.playerOrderlistWidget.count() - 1:
+ row = self.player_order_list_widget.currentRow()
+ if row == -1 or row > self.player_order_list_widget.count() - 1:
return
- item = self.playerOrderlistWidget.takeItem(row)
- self.playerOrderlistWidget.insertItem(row + 1, item)
- self.playerOrderlistWidget.setCurrentRow(row + 1)
- self.usedPlayers.insert(row + 1, self.usedPlayers.pop(row))
+ item = self.player_order_list_widget.takeItem(row)
+ self.player_order_list_widget.insertItem(row + 1, item)
+ self.player_order_list_widget.setCurrentRow(row + 1)
+ self.used_players.insert(row + 1, self.used_players.pop(row))
def load(self):
"""
Load the settings
"""
- if self.savedUsedPlayers:
- self.usedPlayers = self.savedUsedPlayers
- self.usedPlayers = get_media_players()[0]
- self.savedUsedPlayers = self.usedPlayers
+ if self.saved_used_players:
+ self.used_players = self.saved_used_players
+ self.used_players = get_media_players()[0]
+ self.saved_used_players = self.used_players
settings = Settings()
settings.beginGroup(self.settingsSection)
- self.updatePlayerList()
- self.bg_color = settings.value(u'background color')
- self.initial_color = self.bg_color
+ self.update_player_list()
+ self.background_color = settings.value(u'background color')
+ self.initial_color = self.background_color
settings.endGroup()
- self.backgroundColorButton.setStyleSheet(u'background-color: %s' % self.bg_color)
+ self.background_color_button.setStyleSheet(u'background-color: %s' % self.background_color)
def save(self):
"""
@@ -218,12 +219,12 @@
"""
settings = Settings()
settings.beginGroup(self.settingsSection)
- settings.setValue(u'background color', self.bg_color)
+ settings.setValue(u'background color', self.background_color)
settings.endGroup()
old_players, override_player = get_media_players()
- if self.usedPlayers != old_players:
+ if self.used_players != old_players:
# clean old Media stuff
- set_media_players(self.usedPlayers, override_player)
+ set_media_players(self.used_players, override_player)
self.settings_form.register_post_process(u'mediaitem_suffix_reset')
self.settings_form.register_post_process(u'mediaitem_media_rebuild')
self.settings_form.register_post_process(u'config_screen_changed')
@@ -234,28 +235,28 @@
"""
for key, player in self.media_players.iteritems():
player = self.media_players[key]
- checkbox = MediaQCheckBox(self.mediaPlayerGroupBox)
+ checkbox = MediaQ_check_box(self.media_player_group_box)
checkbox.setEnabled(player.available)
- checkbox.setObjectName(player.name + u'CheckBox')
+ checkbox.setObjectName(player.name + u'_check_box')
checkbox.setToolTip(player.get_info())
checkbox.setPlayerName(player.name)
- self.playerCheckBoxes[player.name] = checkbox
- checkbox.stateChanged.connect(self.onPlayerCheckBoxChanged)
- self.mediaPlayerLayout.addWidget(checkbox)
- if player.available and player.name in self.usedPlayers:
+ self.player_check_boxes[player.name] = checkbox
+ checkbox.stateChanged.connect(self.on_player_check_box_changed)
+ self.media_player_layout.addWidget(checkbox)
+ if player.available and player.name in self.used_players:
checkbox.setChecked(True)
else:
checkbox.setChecked(False)
- self.updatePlayerList()
+ self.update_player_list()
self.retranslatePlayers()
def retranslatePlayers(self):
"""
Translations for players is dependent on their setup as well
"""
- for key in self.media_players and self.playerCheckBoxes:
+ for key in self.media_players and self.player_check_boxes:
player = self.media_players[key]
- checkbox = self.playerCheckBoxes[player.name]
+ checkbox = self.player_check_boxes[player.name]
checkbox.setPlayerName(player.name)
if player.available:
checkbox.setText(player.display_name)
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2013-03-14 20:21:04 +0000
+++ openlp/core/ui/servicemanager.py 2013-03-16 20:56:21 +0000
@@ -208,7 +208,7 @@
self.service_manager_list.itemCollapsed.connect(self.collapsed)
self.service_manager_list.itemExpanded.connect(self.expanded)
# Last little bits of setting up
- self.service_theme = Settings().value(self.main_window.serviceManagerSettingsSection + u'/service theme')
+ self.service_theme = Settings().value(self.main_window.service_manager_settings_section + u'/service theme')
self.servicePath = AppLocation.get_section_data_path(u'servicemanager')
# build the drag and drop context menu
self.dndMenu = QtGui.QMenu()
@@ -323,7 +323,7 @@
self.service_id += 1
self._modified = modified
service_file = self.short_file_name() or translate('OpenLP.ServiceManager', 'Untitled Service')
- self.main_window.setServiceModified(modified, service_file)
+ self.main_window.set_service_modified(modified, service_file)
def is_modified(self):
"""
@@ -336,7 +336,7 @@
Setter for service file.
"""
self._file_name = unicode(file_name)
- self.main_window.setServiceModified(self.is_modified(), self.short_file_name())
+ self.main_window.set_service_modified(self.is_modified(), self.short_file_name())
Settings().setValue(u'servicemanager/last file', file_name)
self._save_lite = self._file_name.endswith(u'.oszl')
@@ -401,14 +401,14 @@
file_name = QtGui.QFileDialog.getOpenFileName(
self.main_window,
translate('OpenLP.ServiceManager', 'Open File'),
- Settings().value(self.main_window.serviceManagerSettingsSection + u'/last directory'),
+ Settings().value(self.main_window.service_manager_settings_section + u'/last directory'),
translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz *.oszl)')
)
if not file_name:
return False
else:
file_name = load_file
- Settings().setValue(self.main_window.serviceManagerSettingsSection + u'/last directory',
+ Settings().setValue(self.main_window.service_manager_settings_section + u'/last directory',
split_filename(file_name)[0])
self.load_file(file_name)
@@ -461,7 +461,7 @@
base_name = os.path.splitext(file_name)[0]
service_file_name = '%s.osd' % base_name
log.debug(u'ServiceManager.save_file - %s', path_file_name)
- Settings().setValue(self.main_window.serviceManagerSettingsSection + u'/last directory', path)
+ Settings().setValue(self.main_window.service_manager_settings_section + u'/last directory', path)
service = []
write_list = []
missing_list = []
@@ -469,7 +469,7 @@
total_size = 0
self.application.set_busy_cursor()
# Number of items + 1 to zip it
- self.main_window.displayProgressBar(len(self.service_items) + 1)
+ self.main_window.display_progress_bar(len(self.service_items) + 1)
# Get list of missing files, and list of files to write
for item in self.service_items:
if not item[u'service_item'].uses_file():
@@ -491,7 +491,7 @@
answer = QtGui.QMessageBox.critical(self, title, message,
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel))
if answer == QtGui.QMessageBox.Cancel:
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
return False
# Check if item contains a missing file.
for item in list(self.service_items):
@@ -551,14 +551,14 @@
finally:
if zip_file:
zip_file.close()
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_normal_cursor()
if success:
try:
shutil.copy(temp_file_name, path_file_name)
except shutil.Error:
return self.save_file_as()
- self.main_window.addRecentFile(path_file_name)
+ self.main_window.add_recent_file(path_file_name)
self.set_modified(False)
delete_file(temp_file_name)
return success
@@ -579,11 +579,11 @@
base_name = os.path.splitext(file_name)[0]
service_file_name = '%s.osd' % base_name
log.debug(u'ServiceManager.save_file - %s', path_file_name)
- Settings().setValue(self.main_window.serviceManagerSettingsSection + u'/last directory', path)
+ Settings().setValue(self.main_window.service_manager_settings_section + u'/last directory', path)
service = []
self.application.set_busy_cursor()
# Number of items + 1 to zip it
- self.main_window.displayProgressBar(len(self.service_items) + 1)
+ self.main_window.display_progress_bar(len(self.service_items) + 1)
for item in self.service_items:
self.main_window.increment_progress_bar()
service_item = item[u'service_item'].get_service_repr(self._save_lite)
@@ -608,14 +608,14 @@
finally:
if zip_file:
zip_file.close()
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_normal_cursor()
if success:
try:
shutil.copy(temp_file_name, path_file_name)
except shutil.Error:
return self.save_file_as()
- self.main_window.addRecentFile(path_file_name)
+ self.main_window.add_recent_file(path_file_name)
self.set_modified(False)
delete_file(temp_file_name)
return success
@@ -643,7 +643,7 @@
default_file_name = format_time(default_pattern, local_time)
else:
default_file_name = u''
- directory = Settings().value(self.main_window.serviceManagerSettingsSection + u'/last directory')
+ directory = Settings().value(self.main_window.service_manager_settings_section + u'/last directory')
path = os.path.join(directory, default_file_name)
# SaveAs from osz to oszl is not valid as the files will be deleted
# on exit which is not sensible or usable in the long term.
@@ -712,7 +712,7 @@
file_to.close()
self.new_file()
self.set_file_name(file_name)
- self.main_window.displayProgressBar(len(items))
+ self.main_window.display_progress_bar(len(items))
for item in items:
self.main_window.increment_progress_bar()
service_item = ServiceItem()
@@ -730,7 +730,7 @@
service_item.temporary_edit = self.load_item_temporary
self.add_service_item(service_item, repaint=False)
delete_file(p_file)
- self.main_window.addRecentFile(file_name)
+ self.main_window.add_recent_file(file_name)
self.set_modified(False)
Settings().setValue('servicemanager/last file', file_name)
else:
@@ -758,7 +758,7 @@
file_to.close()
if zip_file:
zip_file.close()
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_normal_cursor()
self.repaint_service_list(-1, -1)
@@ -871,7 +871,7 @@
self.auto_play_slides_loop.setChecked(False)
if service_item.auto_play_slides_once and service_item.timed_slide_interval == 0:
service_item.timed_slide_interval = Settings().value(
- self.main_window.generalSettingsSection + u'/loop delay')
+ self.main_window.general_settings_section + u'/loop delay')
self.set_modified()
def toggle_auto_play_slides_loop(self):
@@ -886,7 +886,7 @@
self.auto_play_slides_once.setChecked(False)
if service_item.auto_play_slides_loop and service_item.timed_slide_interval == 0:
service_item.timed_slide_interval = Settings().value(
- self.main_window.generalSettingsSection + u'/loop delay')
+ self.main_window.general_settings_section + u'/loop delay')
self.set_modified()
def on_timed_slide_interval(self):
@@ -1228,7 +1228,7 @@
log.debug(u'on_theme_combo_box_selected')
self.service_theme = self.theme_combo_box.currentText()
self.renderer.set_service_theme(self.service_theme)
- Settings().setValue(self.main_window.serviceManagerSettingsSection + u'/service theme', self.service_theme)
+ Settings().setValue(self.main_window.service_manager_settings_section + u'/service theme', self.service_theme)
self.regenerate_service_Items(True)
def theme_change(self):
@@ -1397,7 +1397,7 @@
self.application.set_busy_cursor()
if self.service_items[item][u'service_item'].is_valid:
self.live_controller.addServiceManagerItem(self.service_items[item][u'service_item'], child)
- if Settings().value(self.main_window.generalSettingsSection + u'/auto preview'):
+ if Settings().value(self.main_window.general_settings_section + u'/auto preview'):
item += 1
if self.service_items and item < len(self.service_items) and \
self.service_items[item][u'service_item'].is_capable(ItemCapabilities.CanPreview):
=== modified file 'openlp/core/ui/settingsdialog.py'
--- openlp/core/ui/settingsdialog.py 2013-03-07 11:01:06 +0000
+++ openlp/core/ui/settingsdialog.py 2013-03-16 20:56:21 +0000
@@ -39,32 +39,32 @@
"""
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'))
=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py 2013-03-10 20:19:42 +0000
+++ openlp/core/ui/settingsform.py 2013-03-16 20:56:21 +0000
@@ -60,46 +60,45 @@
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 @@
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 @@
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)
- # Advanced tab
- self.advancedTab = 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.themes_tab = ThemesTab(self)
+ # Advanced tab
+ self.advanced_tab = AdvancedTab(self)
+ # Advanced tab
+ 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):
"""
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2013-03-14 20:21:04 +0000
+++ openlp/core/ui/slidecontroller.py 2013-03-16 20:56:21 +0000
@@ -238,7 +238,7 @@
self.play_slides_once = create_action(self, u'playSlidesOnce', text=UiStrings().PlaySlidesToEnd,
icon=u':/media/media_time.png', checked=False, can_shortcuts=True,
category=self.category, triggers=self.onPlaySlidesOnce)
- if Settings().value(self.main_window.advancedSettingsSection + u'/slide limits') == SlideLimits.Wrap:
+ if Settings().value(self.main_window.advanced_settings_section + u'/slide limits') == SlideLimits.Wrap:
self.play_slides_menu.setDefaultAction(self.play_slides_loop)
else:
self.play_slides_menu.setDefaultAction(self.play_slides_once)
@@ -615,7 +615,7 @@
"""
Updates the Slide Limits variable from the settings.
"""
- self.slide_limits = Settings().value(self.main_window.advancedSettingsSection + u'/slide limits')
+ self.slide_limits = Settings().value(self.main_window.advanced_settings_section + u'/slide limits')
def enableToolBar(self, item):
"""
@@ -874,7 +874,7 @@
Allow the main display to blank the main display at startup time
"""
log.debug(u'mainDisplaySetBackground live = %s' % self.is_live)
- display_type = Settings().value(self.main_window.generalSettingsSection + u'/screen blank')
+ display_type = Settings().value(self.main_window.general_settings_section + u'/screen blank')
if self.screens.which_screen(self.window()) != self.screens.which_screen(self.display):
# Order done to handle initial conversion
if display_type == u'themed':
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2013-03-12 09:09:42 +0000
+++ openlp/core/ui/thememanager.py 2013-03-16 20:56:21 +0000
@@ -62,8 +62,8 @@
Registry().register_function(u'bootstrap_initialise', self.load_first_time_themes)
Registry().register_function(u'bootstrap_post_set_up', self._push_themes)
self.settingsSection = u'themes'
- self.themeForm = ThemeForm(self)
- self.fileRenameForm = FileRenameForm()
+ self.theme_form = ThemeForm(self)
+ self.file_rename_form = FileRenameForm()
# start with the layout
self.layout = QtGui.QVBoxLayout(self)
self.layout.setSpacing(0)
@@ -74,13 +74,13 @@
self.toolbar.add_toolbar_action(u'newTheme',
text=UiStrings().NewTheme, icon=u':/themes/theme_new.png',
tooltip=translate('OpenLP.ThemeManager', 'Create a new theme.'),
- triggers=self.onAddTheme)
+ triggers=self.on_add_theme)
self.toolbar.add_toolbar_action(u'editTheme',
text=translate('OpenLP.ThemeManager', 'Edit Theme'),
icon=u':/themes/theme_edit.png',
tooltip=translate('OpenLP.ThemeManager', 'Edit a theme.'),
triggers=self.on_edit_theme)
- self.deleteToolbarAction = self.toolbar.add_toolbar_action(u'delete_theme',
+ self.delete_toolbar_action = self.toolbar.add_toolbar_action(u'delete_theme',
text=translate('OpenLP.ThemeManager', 'Delete Theme'),
icon=u':/general/general_delete.png',
tooltip=translate('OpenLP.ThemeManager', 'Delete a theme.'),
@@ -137,11 +137,11 @@
self.theme_list = []
self.path = AppLocation.get_section_data_path(self.settingsSection)
check_directory_exists(self.path)
- self.thumbPath = os.path.join(self.path, u'thumbnails')
- check_directory_exists(self.thumbPath)
- self.themeForm.path = self.path
- self.oldBackgroundImage = None
- self.badV1NameChars = re.compile(r'[%+\[\]]')
+ self.thumb_path = os.path.join(self.path, u'thumbnails')
+ check_directory_exists(self.thumb_path)
+ self.theme_form.path = self.path
+ self.old_background_image = None
+ self.bad_v1_name_chars = re.compile(r'[%+\[\]]')
# Last little bits of setting up
self.global_theme = Settings().value(self.settingsSection + u'/global theme')
@@ -155,9 +155,9 @@
theme_name = item.text()
# If default theme restrict actions
if real_theme_name == theme_name:
- self.deleteToolbarAction.setVisible(True)
+ self.delete_toolbar_action.setVisible(True)
else:
- self.deleteToolbarAction.setVisible(False)
+ self.delete_toolbar_action.setVisible(False)
def context_menu(self, point):
"""
@@ -192,7 +192,7 @@
if self.global_theme == new_name:
name = translate('OpenLP.ThemeManager', '%s (default)') % new_name
self.theme_list_widget.item(count).setText(name)
- self.deleteToolbarAction.setVisible(item not in self.theme_list_widget.selectedItems())
+ self.delete_toolbar_action.setVisible(item not in self.theme_list_widget.selectedItems())
def change_global_from_screen(self, index=-1):
"""
@@ -216,15 +216,15 @@
Registry().execute(u'theme_update_global')
self._push_themes()
- def onAddTheme(self):
+ def on_add_theme(self):
"""
Loads a new theme with the default settings and then launches the theme
editing form for the user to make their customisations.
"""
theme = ThemeXML()
theme.set_default_header_footer()
- self.themeForm.theme = theme
- self.themeForm.exec_()
+ self.theme_form.theme = theme
+ self.theme_form.exec_()
self.load_themes()
def on_rename_theme(self):
@@ -236,14 +236,14 @@
translate('OpenLP.ThemeManager', 'Rename %s theme?'), False, False):
item = self.theme_list_widget.currentItem()
old_theme_name = item.data(QtCore.Qt.UserRole)
- self.fileRenameForm.file_name_edit.setText(old_theme_name)
- if self.fileRenameForm.exec_():
- new_theme_name = self.fileRenameForm.file_name_edit.text()
+ self.file_rename_form.file_name_edit.setText(old_theme_name)
+ if self.file_rename_form.exec_():
+ new_theme_name = self.file_rename_form.file_name_edit.text()
if old_theme_name == new_theme_name:
return
if self.check_if_theme_exists(new_theme_name):
old_theme_data = self.get_theme_data(old_theme_name)
- self.cloneThemeData(old_theme_data, new_theme_name)
+ self.clone_theme_data(old_theme_data, new_theme_name)
self.delete_theme(old_theme_name)
for plugin in self.plugin_manager.plugins:
if plugin.uses_theme(old_theme_name):
@@ -257,19 +257,19 @@
"""
item = self.theme_list_widget.currentItem()
old_theme_name = item.data(QtCore.Qt.UserRole)
- self.fileRenameForm.file_name_edit.setText(translate('OpenLP.ThemeManager',
+ self.file_rename_form.file_name_edit.setText(translate('OpenLP.ThemeManager',
'Copy of %s', 'Copy of <theme name>') % old_theme_name)
- if self.fileRenameForm.exec_(True):
- new_theme_name = self.fileRenameForm.file_name_edit.text()
+ if self.file_rename_form.exec_(True):
+ new_theme_name = self.file_rename_form.file_name_edit.text()
if self.check_if_theme_exists(new_theme_name):
theme_data = self.get_theme_data(old_theme_name)
- self.cloneThemeData(theme_data, new_theme_name)
+ self.clone_theme_data(theme_data, new_theme_name)
- def cloneThemeData(self, theme_data, new_theme_name):
+ def clone_theme_data(self, theme_data, new_theme_name):
"""
Takes a theme and makes a new copy of it as well as saving it.
"""
- log.debug(u'cloneThemeData')
+ log.debug(u'clone_theme_data')
save_to = None
save_from = None
if theme_data.background_type == u'image':
@@ -290,10 +290,10 @@
item = self.theme_list_widget.currentItem()
theme = self.get_theme_data(item.data(QtCore.Qt.UserRole))
if theme.background_type == u'image':
- self.oldBackgroundImage = theme.background_filename
- self.themeForm.theme = theme
- self.themeForm.exec_(True)
- self.oldBackgroundImage = None
+ self.old_background_image = theme.background_filename
+ self.theme_form.theme = theme
+ self.theme_form.exec_(True)
+ self.old_background_image = None
self.renderer.update_theme(theme.theme_name)
self.load_themes()
@@ -324,7 +324,7 @@
self.theme_list.remove(theme)
thumb = u'%s.png' % theme
delete_file(os.path.join(self.path, thumb))
- delete_file(os.path.join(self.thumbPath, thumb))
+ delete_file(os.path.join(self.thumb_path, thumb))
try:
encoding = get_filesystem_encoding()
shutil.rmtree(os.path.join(self.path, theme).encode(encoding))
@@ -370,9 +370,8 @@
def on_import_theme(self):
"""
- Opens a file dialog to select the theme file(s) to import before
- attempting to extract OpenLP themes from those files. This process
- will load both OpenLP version 1 and version 2 themes.
+ Opens a file dialog to select the theme file(s) to import before attempting to extract OpenLP themes from
+ those files. This process will load both OpenLP version 1 and version 2 themes.
"""
files = QtGui.QFileDialog.getOpenFileNames(self,
translate('OpenLP.ThemeManager', 'Select Theme Import File'),
@@ -431,7 +430,7 @@
name = translate('OpenLP.ThemeManager', '%s (default)') % text_name
else:
name = text_name
- thumb = os.path.join(self.thumbPath, u'%s.png' % text_name)
+ thumb = os.path.join(self.thumb_path, u'%s.png' % text_name)
item_name = QtGui.QListWidgetItem(name)
if validate_thumb(theme, thumb):
icon = build_icon(thumb)
@@ -504,8 +503,8 @@
xml_tree = ElementTree(element=XML(theme_zip.read(xml_file[0]))).getroot()
v1_background = xml_tree.find(u'BackgroundType')
if v1_background is not None:
- theme_name, file_xml, out_file, abort_import = self.unzip_version_122(
- directory, theme_zip, xml_file[0], xml_tree, v1_background, out_file)
+ theme_name, file_xml, out_file, abort_import = \
+ self.unzip_version_122(directory, theme_zip, xml_file[0], xml_tree, v1_background, out_file)
else:
theme_name = xml_tree.find(u'name').text.strip()
theme_folder = os.path.join(directory, theme_name)
@@ -571,7 +570,7 @@
this method, please keep in mind, that some parameters are redundant.
"""
theme_name = xml_tree.find(u'Name').text.strip()
- theme_name = self.badV1NameChars.sub(u'', theme_name)
+ theme_name = self.bad_v1_name_chars.sub(u'', theme_name)
theme_folder = os.path.join(dir_name, theme_name)
theme_exists = os.path.exists(theme_folder)
if theme_exists and not self.over_write_message_box(theme_name):
@@ -634,8 +633,8 @@
theme_dir = os.path.join(self.path, name)
check_directory_exists(theme_dir)
theme_file = os.path.join(theme_dir, name + u'.xml')
- if self.oldBackgroundImage and image_to != self.oldBackgroundImage:
- delete_file(self.oldBackgroundImage)
+ if self.old_background_image and image_to != self.old_background_image:
+ delete_file(self.old_background_image)
out_file = None
try:
out_file = open(theme_file, u'w')
@@ -663,7 +662,7 @@
if os.path.exists(sample_path_name):
os.unlink(sample_path_name)
frame.save(sample_path_name, u'png')
- thumb = os.path.join(self.thumbPath, u'%s.png' % name)
+ thumb = os.path.join(self.thumb_path, u'%s.png' % name)
create_thumb(sample_path_name, thumb, False)
log.debug(u'Theme image written to %s', sample_path_name)
@@ -672,11 +671,11 @@
Called to update the themes' preview images.
"""
log.debug('update_preview_images')
- self.main_window.displayProgressBar(len(self.theme_list))
+ self.main_window.display_progress_bar(len(self.theme_list))
for theme in self.theme_list:
self.main_window.increment_progress_bar()
self.generate_and_save_image(self.path, theme, self.get_theme_data(theme))
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.load_themes()
def generate_image(self, theme_data, forcePage=False):
@@ -759,7 +758,7 @@
"""
theme = Theme(xml_data)
new_theme = ThemeXML()
- new_theme.theme_name = self.badV1NameChars.sub(u'', theme.Name)
+ new_theme.theme_name = self.bad_v1_name_chars.sub(u'', theme.Name)
if theme.BackgroundType == BackgroundType.Solid:
new_theme.background_type = BackgroundType.to_string(BackgroundType.Solid)
new_theme.background_color = unicode(theme.BackgroundParameter1.name())
=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py 2013-03-14 20:21:04 +0000
+++ openlp/core/ui/themestab.py 2013-03-16 20:56:21 +0000
@@ -40,13 +40,13 @@
"""
ThemesTab is the theme settings tab in the settings dialog.
"""
- def __init__(self, parent):
+ def _init_(self, parent):
"""
Constructor
"""
- generalTranslated = translate('OpenLP.ThemesTab', 'Themes')
- SettingsTab.__init__(self, parent, u'Themes', generalTranslated)
- self.iconPath = u':/themes/theme_new.png'
+ self.icon_path = u':/themes/theme_new.png'
+ theme_translated = translate('OpenLP.ThemesTab', 'Themes')
+ SettingsTab._init_(self, parent, u'Themes', theme_translated)
def setupUi(self):
"""
@@ -54,74 +54,74 @@
"""
self.setObjectName(u'ThemesTab')
SettingsTab.setupUi(self)
- self.GlobalGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.GlobalGroupBox.setObjectName(u'GlobalGroupBox')
- self.GlobalGroupBoxLayout = QtGui.QVBoxLayout(self.GlobalGroupBox)
- self.GlobalGroupBoxLayout.setObjectName(u'GlobalGroupBoxLayout')
- self.DefaultComboBox = QtGui.QComboBox(self.GlobalGroupBox)
- self.DefaultComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
- self.DefaultComboBox.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
- self.DefaultComboBox.setObjectName(u'DefaultComboBox')
- self.GlobalGroupBoxLayout.addWidget(self.DefaultComboBox)
- self.DefaultListView = QtGui.QLabel(self.GlobalGroupBox)
- self.DefaultListView.setObjectName(u'DefaultListView')
- self.GlobalGroupBoxLayout.addWidget(self.DefaultListView)
- self.leftLayout.addWidget(self.GlobalGroupBox)
- self.leftLayout.addStretch()
- self.LevelGroupBox = QtGui.QGroupBox(self.rightColumn)
- self.LevelGroupBox.setObjectName(u'LevelGroupBox')
- self.LevelLayout = QtGui.QFormLayout(self.LevelGroupBox)
- self.LevelLayout.setLabelAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
- self.LevelLayout.setFormAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
- self.LevelLayout.setObjectName(u'LevelLayout')
- self.SongLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
- self.SongLevelRadioButton.setObjectName(u'SongLevelRadioButton')
- self.SongLevelLabel = QtGui.QLabel(self.LevelGroupBox)
- self.SongLevelLabel.setObjectName(u'SongLevelLabel')
- self.LevelLayout.addRow(self.SongLevelRadioButton, self.SongLevelLabel)
- self.ServiceLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
- self.ServiceLevelRadioButton.setObjectName(u'ServiceLevelRadioButton')
- self.ServiceLevelLabel = QtGui.QLabel(self.LevelGroupBox)
- self.ServiceLevelLabel.setObjectName(u'ServiceLevelLabel')
- self.LevelLayout.addRow(self.ServiceLevelRadioButton, self.ServiceLevelLabel)
- self.GlobalLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
- self.GlobalLevelRadioButton.setObjectName(u'GlobalLevelRadioButton')
- self.GlobalLevelLabel = QtGui.QLabel(self.LevelGroupBox)
- self.GlobalLevelLabel.setObjectName(u'GlobalLevelLabel')
- self.LevelLayout.addRow(self.GlobalLevelRadioButton, self.GlobalLevelLabel)
- label_top_margin = (self.SongLevelRadioButton.sizeHint().height() -
- self.SongLevelLabel.sizeHint().height()) / 2
- for label in [self.SongLevelLabel, self.ServiceLevelLabel, self.GlobalLevelLabel]:
+ self.global_group_box = QtGui.QGroupBox(self.left_column)
+ self.global_group_box.setObjectName(u'global_group_box')
+ self.global_group_box_layout = QtGui.QVBoxLayout(self.global_group_box)
+ self.global_group_box_layout.setObjectName(u'global_group_box_layout')
+ self.default_combo_box = QtGui.QComboBox(self.global_group_box)
+ self.default_combo_box.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
+ self.default_combo_box.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
+ self.default_combo_box.setObjectName(u'default_combo_box')
+ self.global_group_box_layout.addWidget(self.default_combo_box)
+ self.default_list_view = QtGui.QLabel(self.global_group_box)
+ self.default_list_view.setObjectName(u'default_list_view')
+ self.global_group_box_layout.addWidget(self.default_list_view)
+ self.left_layout.addWidget(self.global_group_box)
+ self.left_layout.addStretch()
+ self.level_group_box = QtGui.QGroupBox(self.right_column)
+ self.level_group_box.setObjectName(u'level_group_box')
+ self.level_layout = QtGui.QFormLayout(self.level_group_box)
+ self.level_layout.set_labelAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
+ self.level_layout.setFormAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
+ self.level_layout.setObjectName(u'level_layout')
+ self.song_level_radio_button = QtGui.Q_radio_button(self.level_group_box)
+ self.song_level_radio_button.setObjectName(u'song_level_radio_button')
+ self.song_level_label = QtGui.QLabel(self.level_group_box)
+ self.song_level_label.setObjectName(u'song_level_label')
+ self.level_layout.addRow(self.song_level_radio_button, self.song_level_label)
+ self.service_level_radio_button = QtGui.Q_radio_button(self.level_group_box)
+ self.service_level_radio_button.setObjectName(u'service_level_radio_button')
+ self.service_level_label = QtGui.QLabel(self.level_group_box)
+ self.service_level_label.setObjectName(u'service_level_label')
+ self.level_layout.addRow(self.service_level_radio_button, self.service_level_label)
+ self.global_level_radio_button = QtGui.Q_radio_button(self.level_group_box)
+ self.global_level_radio_button.setObjectName(u'global_level_radio_button')
+ self.global_level_label = QtGui.QLabel(self.level_group_box)
+ self.global_level_label.setObjectName(u'global_level_label')
+ self.level_layout.addRow(self.global_level_radio_button, self.global_level_label)
+ label_top_margin = (self.song_level_radio_button.sizeHint().height() -
+ self.song_level_label.sizeHint().height()) / 2
+ for label in [self.song_level_label, self.service_level_label, self.global_level_label]:
rect = label.rect()
rect.setTop(rect.top() + label_top_margin)
label.setFrameRect(rect)
label.setWordWrap(True)
- self.rightLayout.addWidget(self.LevelGroupBox)
- self.rightLayout.addStretch()
- self.SongLevelRadioButton.clicked.connect(self.onSongLevelButtonClicked)
- self.ServiceLevelRadioButton.clicked.connect(self.onServiceLevelButtonClicked)
- self.GlobalLevelRadioButton.clicked.connect(self.onGlobalLevelButtonClicked)
- self.DefaultComboBox.activated.connect(self.onDefaultComboBoxChanged)
+ self.right_layout.addWidget(self.level_group_box)
+ self.right_layout.addStretch()
+ self.song_level_radio_button.clicked.connect(self.on_song_level_button_clicked)
+ self.service_level_radio_button.clicked.connect(self.on_service_level_button_Clicked)
+ self.global_level_radio_button.clicked.connect(self.on_global_level_buttonClicked)
+ self.default_combo_box.activated.connect(self.on_default_combo_box_changed)
Registry().register_function(u'theme_update_list', self.update_theme_list)
def retranslateUi(self):
"""
Translate the UI on the fly
"""
- self.tabTitleVisible = UiStrings().Themes
- self.GlobalGroupBox.setTitle(translate('OpenLP.ThemesTab', 'Global Theme'))
- self.LevelGroupBox.setTitle(translate('OpenLP.ThemesTab', 'Theme Level'))
- self.SongLevelRadioButton.setText(translate('OpenLP.ThemesTab', 'S&ong Level'))
- self.SongLevelLabel.setText(translate('OpenLP.ThemesTab', 'Use the theme from each song '
+ self.tab_title_visible = UiStrings().Themes
+ self.global_group_box.setTitle(translate('OpenLP.ThemesTab', 'Global Theme'))
+ self.level_group_box.setTitle(translate('OpenLP.ThemesTab', 'Theme Level'))
+ self.song_level_radio_button.setText(translate('OpenLP.ThemesTab', 'S&ong Level'))
+ self.song_level_label.setText(translate('OpenLP.ThemesTab', 'Use the theme from each song '
'in the database. If a song doesn\'t have a theme associated with '
'it, then use the service\'s theme. If the service doesn\'t have '
'a theme, then use the global theme.'))
- self.ServiceLevelRadioButton.setText(translate('OpenLP.ThemesTab', '&Service Level'))
- self.ServiceLevelLabel.setText(translate('OpenLP.ThemesTab', 'Use the theme from the service, '
+ self.service_level_radio_button.setText(translate('OpenLP.ThemesTab', '&Service Level'))
+ self.service_level_label.setText(translate('OpenLP.ThemesTab', 'Use the theme from the service, '
'overriding any of the individual songs\' themes. If the '
'service doesn\'t have a theme, then use the global theme.'))
- self.GlobalLevelRadioButton.setText(translate('OpenLP.ThemesTab', '&Global Level'))
- self.GlobalLevelLabel.setText(translate('OpenLP.ThemesTab', 'Use the global theme, overriding '
+ self.global_level_radio_button.setText(translate('OpenLP.ThemesTab', '&Global Level'))
+ self.global_level_label.setText(translate('OpenLP.ThemesTab', 'Use the global theme, overriding '
'any themes associated with either the service or the songs.'))
def load(self):
@@ -134,11 +134,11 @@
self.global_theme = settings.value(u'global theme')
settings.endGroup()
if self.theme_level == ThemeLevel.Global:
- self.GlobalLevelRadioButton.setChecked(True)
+ self.global_level_radio_button.setChecked(True)
elif self.theme_level == ThemeLevel.Service:
- self.ServiceLevelRadioButton.setChecked(True)
+ self.service_level_radio_button.setChecked(True)
else:
- self.SongLevelRadioButton.setChecked(True)
+ self.song_level_radio_button.setChecked(True)
def save(self):
"""
@@ -158,31 +158,31 @@
"""
Registry().execute(u'theme_update_global')
- def onSongLevelButtonClicked(self):
+ def on_song_level_Button_clicked(self):
"""
Set the theme level
"""
self.theme_level = ThemeLevel.Song
- def onServiceLevelButtonClicked(self):
+ def on_service_levelButton_clicked(self):
"""
Set the theme level
"""
self.theme_level = ThemeLevel.Service
- def onGlobalLevelButtonClicked(self):
+ def on_global_levelButton_clicked(self):
"""
Set the theme level
"""
self.theme_level = ThemeLevel.Global
- def onDefaultComboBoxChanged(self, value):
+ def on_default_combo_box_changed(self, value):
"""
Set the global default theme
"""
- self.global_theme = self.DefaultComboBox.currentText()
+ self.global_theme = self.default_combo_box.currentText()
self.renderer.set_global_theme()
- self.__previewGlobalTheme()
+ self._previewGlobalTheme()
def update_theme_list(self, theme_list):
"""
@@ -194,16 +194,16 @@
[u'Bible Theme', u'Song Theme']
"""
# Reload as may have been triggered by the ThemeManager.
- self.global_theme = Settings().value(self.settingsSection + u'/global theme')
- self.DefaultComboBox.clear()
- self.DefaultComboBox.addItems(theme_list)
- find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme)
+ self.global_theme = Settings().value(self.settings_section + u'/global theme')
+ self.default_combo_box.clear()
+ self.default_combo_box.addItems(theme_list)
+ find_and_set_in_combo_box(self.default_combo_box, self.global_theme)
self.renderer.set_global_theme()
self.renderer.set_theme_level(self.theme_level)
if self.global_theme is not u'':
- self.__previewGlobalTheme()
+ self._preview_global_theme()
- def __previewGlobalTheme(self):
+ def _preview_global_theme(self):
"""
Utility method to update the global theme preview image.
"""
@@ -211,4 +211,4 @@
preview = QtGui.QPixmap(unicode(image))
if not preview.isNull():
preview = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
- self.DefaultListView.setPixmap(preview)
+ self.default_list_view.setPixmap(preview)
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2013-03-11 19:11:46 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2013-03-16 20:56:21 +0000
@@ -210,7 +210,7 @@
"""
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 @@
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))
=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
--- openlp/plugins/alerts/lib/alertstab.py 2013-03-10 20:19:42 +0000
+++ openlp/plugins/alerts/lib/alertstab.py 2013-03-16 20:56:21 +0000
@@ -43,145 +43,145 @@
def setupUi(self):
self.setObjectName(u'AlertsTab')
SettingsTab.setupUi(self)
- self.fontGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.fontGroupBox.setObjectName(u'fontGroupBox')
- self.fontLayout = QtGui.QFormLayout(self.fontGroupBox)
- self.fontLayout.setObjectName(u'fontLayout')
- self.fontLabel = QtGui.QLabel(self.fontGroupBox)
- self.fontLabel.setObjectName(u'fontLabel')
- self.fontComboBox = QtGui.QFontComboBox(self.fontGroupBox)
- self.fontComboBox.setObjectName(u'fontComboBox')
- self.fontLayout.addRow(self.fontLabel, self.fontComboBox)
- self.fontColorLabel = QtGui.QLabel(self.fontGroupBox)
- self.fontColorLabel.setObjectName(u'fontColorLabel')
- self.colorLayout = QtGui.QHBoxLayout()
- self.colorLayout.setObjectName(u'colorLayout')
- self.fontColorButton = QtGui.QPushButton(self.fontGroupBox)
- self.fontColorButton.setObjectName(u'fontColorButton')
- self.colorLayout.addWidget(self.fontColorButton)
- self.colorLayout.addSpacing(20)
- self.backgroundColorLabel = QtGui.QLabel(self.fontGroupBox)
- self.backgroundColorLabel.setObjectName(u'backgroundColorLabel')
- self.colorLayout.addWidget(self.backgroundColorLabel)
- self.backgroundColorButton = QtGui.QPushButton(self.fontGroupBox)
- self.backgroundColorButton.setObjectName(u'backgroundColorButton')
- self.colorLayout.addWidget(self.backgroundColorButton)
- self.fontLayout.addRow(self.fontColorLabel, self.colorLayout)
- self.fontSizeLabel = QtGui.QLabel(self.fontGroupBox)
- self.fontSizeLabel.setObjectName(u'fontSizeLabel')
- self.fontSizeSpinBox = QtGui.QSpinBox(self.fontGroupBox)
- self.fontSizeSpinBox.setObjectName(u'fontSizeSpinBox')
- self.fontLayout.addRow(self.fontSizeLabel, self.fontSizeSpinBox)
- self.timeoutLabel = QtGui.QLabel(self.fontGroupBox)
- self.timeoutLabel.setObjectName(u'timeoutLabel')
- self.timeoutSpinBox = QtGui.QSpinBox(self.fontGroupBox)
- self.timeoutSpinBox.setMaximum(180)
- self.timeoutSpinBox.setObjectName(u'timeoutSpinBox')
- self.fontLayout.addRow(self.timeoutLabel, self.timeoutSpinBox)
- self.verticalLabel, self.verticalComboBox = create_valign_selection_widgets(self.fontGroupBox)
- self.verticalLabel.setObjectName(u'verticalLabel')
- self.verticalComboBox.setObjectName(u'verticalComboBox')
- self.fontLayout.addRow(self.verticalLabel, self.verticalComboBox)
- self.leftLayout.addWidget(self.fontGroupBox)
- self.leftLayout.addStretch()
- self.previewGroupBox = QtGui.QGroupBox(self.rightColumn)
- self.previewGroupBox.setObjectName(u'previewGroupBox')
- self.previewLayout = QtGui.QVBoxLayout(self.previewGroupBox)
- self.previewLayout.setObjectName(u'previewLayout')
- self.fontPreview = QtGui.QLineEdit(self.previewGroupBox)
- self.fontPreview.setObjectName(u'fontPreview')
- self.previewLayout.addWidget(self.fontPreview)
- self.rightLayout.addWidget(self.previewGroupBox)
- self.rightLayout.addStretch()
+ 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')
+ self.font_label = QtGui.QLabel(self.font_group_box)
+ self.font_label.setObjectName(u'font_label')
+ self.font_combo_box = QtGui.QFontComboBox(self.font_group_box)
+ self.font_combo_box.setObjectName(u'font_combo_box')
+ self.font_layout.addRow(self.font_label, self.font_combo_box)
+ self.font_color_label = QtGui.QLabel(self.font_group_box)
+ self.font_color_label.setObjectName(u'font_color_label')
+ self.color_layout = QtGui.QHBoxLayout()
+ self.color_layout.setObjectName(u'color_layout')
+ self.font_color_button = QtGui.QPushButton(self.font_group_box)
+ self.font_color_button.setObjectName(u'font_color_button')
+ self.color_layout.addWidget(self.font_color_button)
+ self.color_layout.addSpacing(20)
+ self.background_color_label = QtGui.QLabel(self.font_group_box)
+ self.background_color_label.setObjectName(u'background_color_label')
+ self.color_layout.addWidget(self.background_color_label)
+ self.background_color_button = QtGui.QPushButton(self.font_group_box)
+ self.background_color_button.setObjectName(u'background_color_button')
+ self.color_layout.addWidget(self.background_color_button)
+ self.font_layout.addRow(self.font_color_label, self.color_layout)
+ self.font_size_label = QtGui.QLabel(self.font_group_box)
+ self.font_size_label.setObjectName(u'font_size_label')
+ self.font_size_spin_box = QtGui.QSpinBox(self.font_group_box)
+ self.font_size_spin_box.setObjectName(u'font_size_spin_box')
+ self.font_layout.addRow(self.font_size_label, self.font_size_spin_box)
+ self.timeout_label = QtGui.QLabel(self.font_group_box)
+ self.timeout_label.setObjectName(u'timeout_label')
+ self.timeout_spin_box = QtGui.QSpinBox(self.font_group_box)
+ self.timeout_spin_box.setMaximum(180)
+ self.timeout_spin_box.setObjectName(u'timeout_spin_box')
+ self.font_layout.addRow(self.timeout_label, self.timeout_spin_box)
+ self.vertical_label, self.vertical_combo_box = create_valign_selection_widgets(self.font_group_box)
+ self.vertical_label.setObjectName(u'vertical_label')
+ self.vertical_combo_box.setObjectName(u'vertical_combo_box')
+ 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.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')
+ self.font_preview = QtGui.QLineEdit(self.preview_group_box)
+ self.font_preview.setObjectName(u'font_preview')
+ self.preview_layout.addWidget(self.font_preview)
+ self.right_layout.addWidget(self.preview_group_box)
+ self.right_layout.addStretch()
# Signals and slots
- self.backgroundColorButton.clicked.connect(self.onBackgroundColorButtonClicked)
- self.fontColorButton.clicked.connect(self.onFontColorButtonClicked)
- self.fontComboBox.activated.connect(self.onFontComboBoxClicked)
- self.timeoutSpinBox.valueChanged.connect(self.onTimeoutSpinBoxChanged)
- self.fontSizeSpinBox.valueChanged.connect(self.onFontSizeSpinBoxChanged)
+ self.background_color_button.clicked.connect(self.on_background_color_button_clicked)
+ 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.fontGroupBox.setTitle(translate('AlertsPlugin.AlertsTab', 'Font'))
- self.fontLabel.setText(translate('AlertsPlugin.AlertsTab', 'Font name:'))
- self.fontColorLabel.setText(translate('AlertsPlugin.AlertsTab', 'Font color:'))
- self.backgroundColorLabel.setText(translate('AlertsPlugin.AlertsTab', 'Background color:'))
- self.fontSizeLabel.setText(translate('AlertsPlugin.AlertsTab', 'Font size:'))
- self.fontSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
- self.timeoutLabel.setText(translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
- self.timeoutSpinBox.setSuffix(UiStrings().Seconds)
- self.previewGroupBox.setTitle(UiStrings().Preview)
- self.fontPreview.setText(UiStrings().OLPV2x)
+ self.font_group_box.setTitle(translate('AlertsPlugin.AlertsTab', 'Font'))
+ self.font_label.setText(translate('AlertsPlugin.AlertsTab', 'Font name:'))
+ 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().FontSizePtUnit)
+ self.timeout_label.setText(translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
+ self.timeout_spin_box.setSuffix(UiStrings().Seconds)
+ self.preview_group_box.setTitle(UiStrings().Preview)
+ self.font_preview.setText(UiStrings().OLPV2x)
- def onBackgroundColorButtonClicked(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.backgroundColorButton.setStyleSheet(u'background-color: %s' % self.bg_color)
- self.updateDisplay()
-
- def onFontComboBoxClicked(self):
- self.updateDisplay()
-
- def onFontColorButtonClicked(self):
+ self.background_color = new_color.name()
+ self.background_color_button.setStyleSheet(u'background-color: %s' % self.background_color)
+ self.update_display()
+
+ def on_font_combo_box_clicked(self):
+ self.update_display()
+
+ def on_font_color_button_clicked(self):
new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.font_color), self)
if new_color.isValid():
self.font_color = new_color.name()
- self.fontColorButton.setStyleSheet(u'background-color: %s' % self.font_color)
- self.updateDisplay()
+ self.font_color_button.setStyleSheet(u'background-color: %s' % self.font_color)
+ self.update_display()
- def onTimeoutSpinBoxChanged(self):
- self.timeout = self.timeoutSpinBox.value()
+ def on_timeout_spin_box_changed(self):
+ self.timeout = self.timeout_spin_box.value()
self.changed = True
- def onFontSizeSpinBoxChanged(self):
- self.font_size = self.fontSizeSpinBox.value()
- self.updateDisplay()
+ def on_font_size_spin_box_changed(self):
+ self.font_size = self.font_size_spin_box.value()
+ self.update_display()
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')
- self.bg_color = settings.value(u'background color')
+ self.background_color = settings.value(u'background color')
self.font_face = settings.value(u'font face')
self.location = settings.value(u'location')
settings.endGroup()
- self.fontSizeSpinBox.setValue(self.font_size)
- self.timeoutSpinBox.setValue(self.timeout)
- self.fontColorButton.setStyleSheet(u'background-color: %s' % self.font_color)
- self.backgroundColorButton.setStyleSheet(u'background-color: %s' % self.bg_color)
- self.verticalComboBox.setCurrentIndex(self.location)
+ self.font_size_spin_box.setValue(self.font_size)
+ self.timeout_spin_box.setValue(self.timeout)
+ self.font_color_button.setStyleSheet(u'background-color: %s' % self.font_color)
+ self.background_color_button.setStyleSheet(u'background-color: %s' % self.background_color)
+ self.vertical_combo_box.setCurrentIndex(self.location)
font = QtGui.QFont()
font.setFamily(self.font_face)
- self.fontComboBox.setCurrentFont(font)
- self.updateDisplay()
+ self.font_combo_box.setCurrentFont(font)
+ self.update_display()
self.changed = False
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.verticalComboBox.currentIndex():
+ if settings.value(u'location') != self.vertical_combo_box.currentIndex():
self.changed = True
- settings.setValue(u'background color', self.bg_color)
+ settings.setValue(u'background color', self.background_color)
settings.setValue(u'font color', self.font_color)
settings.setValue(u'font size', self.font_size)
- self.font_face = self.fontComboBox.currentFont().family()
+ self.font_face = self.font_combo_box.currentFont().family()
settings.setValue(u'font face', self.font_face)
settings.setValue(u'timeout', self.timeout)
- self.location = self.verticalComboBox.currentIndex()
+ self.location = self.vertical_combo_box.currentIndex()
settings.setValue(u'location', self.location)
settings.endGroup()
if self.changed:
self.settings_form.register_post_process(u'update_display_css')
self.changed = False
- def updateDisplay(self):
+ def update_display(self):
font = QtGui.QFont()
- font.setFamily(self.fontComboBox.currentFont().family())
+ font.setFamily(self.font_combo_box.currentFont().family())
font.setBold(True)
font.setPointSize(self.font_size)
- self.fontPreview.setFont(font)
- self.fontPreview.setStyleSheet(u'background-color: %s; color: %s' % (self.bg_color, self.font_color))
+ self.font_preview.setFont(font)
+ self.font_preview.setStyleSheet(u'background-color: %s; color: %s' % (self.background_color, self.font_color))
self.changed = True
=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
--- openlp/plugins/bibles/lib/biblestab.py 2013-03-10 20:19:42 +0000
+++ openlp/plugins/bibles/lib/biblestab.py 2013-03-16 20:56:21 +0000
@@ -38,13 +38,14 @@
log = logging.getLogger(__name__)
+
class BiblesTab(SettingsTab):
"""
BiblesTab is the Bibles settings tab in the settings dialog.
"""
log.info(u'Bible Tab loaded')
- def __init__(self, parent, title, visible_title, icon_path):
+ def _init_(self, parent, title, visible_title, icon_path):
self.paragraph_style = True
self.show_new_chapters = False
self.display_style = 0
@@ -53,299 +54,298 @@
def setupUi(self):
self.setObjectName(u'BiblesTab')
SettingsTab.setupUi(self)
- self.verseDisplayGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.verseDisplayGroupBox.setObjectName(u'verseDisplayGroupBox')
- self.verseDisplayLayout = QtGui.QFormLayout(self.verseDisplayGroupBox)
- self.verseDisplayLayout.setObjectName(u'verseDisplayLayout')
- self.newChaptersCheckBox = QtGui.QCheckBox(self.verseDisplayGroupBox)
- self.newChaptersCheckBox.setObjectName(u'newChaptersCheckBox')
- self.verseDisplayLayout.addRow(self.newChaptersCheckBox)
- self.displayStyleLabel = QtGui.QLabel(self.verseDisplayGroupBox)
- self.displayStyleLabel.setObjectName(u'displayStyleLabel')
- self.displayStyleComboBox = QtGui.QComboBox(self.verseDisplayGroupBox)
- self.displayStyleComboBox.addItems([u'', u'', u'', u''])
- self.displayStyleComboBox.setObjectName(u'displayStyleComboBox')
- self.verseDisplayLayout.addRow(self.displayStyleLabel, self.displayStyleComboBox)
- self.layoutStyleLabel = QtGui.QLabel(self.verseDisplayGroupBox)
- self.layoutStyleLabel.setObjectName(u'layoutStyleLabel')
- self.layoutStyleComboBox = QtGui.QComboBox(self.verseDisplayGroupBox)
- self.layoutStyleComboBox.setObjectName(u'layoutStyleComboBox')
- self.layoutStyleComboBox.addItems([u'', u'', u''])
- self.verseDisplayLayout.addRow(self.layoutStyleLabel, self.layoutStyleComboBox)
- self.bibleSecondCheckBox = QtGui.QCheckBox(self.verseDisplayGroupBox)
- self.bibleSecondCheckBox.setObjectName(u'bibleSecondCheckBox')
- self.verseDisplayLayout.addRow(self.bibleSecondCheckBox)
- self.bibleThemeLabel = QtGui.QLabel(self.verseDisplayGroupBox)
- self.bibleThemeLabel.setObjectName(u'BibleThemeLabel')
- self.bibleThemeComboBox = QtGui.QComboBox(self.verseDisplayGroupBox)
- self.bibleThemeComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
- self.bibleThemeComboBox.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
- self.bibleThemeComboBox.addItem(u'')
- self.bibleThemeComboBox.setObjectName(u'BibleThemeComboBox')
- self.verseDisplayLayout.addRow(self.bibleThemeLabel, self.bibleThemeComboBox)
- self.changeNoteLabel = QtGui.QLabel(self.verseDisplayGroupBox)
- self.changeNoteLabel.setWordWrap(True)
- self.changeNoteLabel.setObjectName(u'changeNoteLabel')
- self.verseDisplayLayout.addRow(self.changeNoteLabel)
- self.leftLayout.addWidget(self.verseDisplayGroupBox)
- self.scriptureReferenceGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.scriptureReferenceGroupBox.setObjectName(u'scriptureReferenceGroupBox')
- self.scriptureReferenceLayout = QtGui.QGridLayout(self.scriptureReferenceGroupBox)
- self.verseSeparatorCheckBox = QtGui.QCheckBox(self.scriptureReferenceGroupBox)
- self.verseSeparatorCheckBox.setObjectName(u'verseSeparatorCheckBox')
- self.scriptureReferenceLayout.addWidget(self.verseSeparatorCheckBox, 0, 0)
- self.verseSeparatorLineEdit = QtGui.QLineEdit(self.scriptureReferenceGroupBox)
-# self.verseSeparatorLineEdit.setPalette
- self.verseSeparatorLineEdit.setObjectName(u'verseSeparatorLineEdit')
- self.scriptureReferenceLayout.addWidget(self.verseSeparatorLineEdit, 0, 1)
- self.rangeSeparatorCheckBox = QtGui.QCheckBox(self.scriptureReferenceGroupBox)
- self.rangeSeparatorCheckBox.setObjectName(u'rangeSeparatorCheckBox')
- self.scriptureReferenceLayout.addWidget(self.rangeSeparatorCheckBox, 1, 0)
- self.rangeSeparatorLineEdit = QtGui.QLineEdit(self.scriptureReferenceGroupBox)
- self.rangeSeparatorLineEdit.setObjectName(u'rangeSeparatorLineEdit')
- self.scriptureReferenceLayout.addWidget(self.rangeSeparatorLineEdit, 1, 1)
- self.listSeparatorCheckBox = QtGui.QCheckBox(self.scriptureReferenceGroupBox)
- self.listSeparatorCheckBox.setObjectName(u'listSeparatorCheckBox')
- self.scriptureReferenceLayout.addWidget(self.listSeparatorCheckBox, 2, 0)
- self.listSeparatorLineEdit = QtGui.QLineEdit(self.scriptureReferenceGroupBox)
- self.listSeparatorLineEdit.setObjectName(u'listSeparatorLineEdit')
- self.scriptureReferenceLayout.addWidget(self.listSeparatorLineEdit, 2, 1)
- self.endSeparatorCheckBox = QtGui.QCheckBox(self.scriptureReferenceGroupBox)
- self.endSeparatorCheckBox.setObjectName(u'endSeparatorCheckBox')
- self.scriptureReferenceLayout.addWidget(self.endSeparatorCheckBox, 3, 0)
- self.endSeparatorLineEdit = QtGui.QLineEdit(self.scriptureReferenceGroupBox)
- self.endSeparatorLineEdit.setObjectName(u'endSeparatorLineEdit')
- self.endSeparatorLineEdit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^0-9]*'),
- self.endSeparatorLineEdit))
- self.scriptureReferenceLayout.addWidget(self.endSeparatorLineEdit, 3, 1)
- self.leftLayout.addWidget(self.scriptureReferenceGroupBox)
- self.rightColumn.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
- self.languageSelectionGroupBox = QtGui.QGroupBox(self.rightColumn)
- self.languageSelectionGroupBox.setObjectName(u'languageSelectionGroupBox')
- self.languageSelectionLayout = QtGui.QVBoxLayout(self.languageSelectionGroupBox)
- self.languageSelectionLabel = QtGui.QLabel(self.languageSelectionGroupBox)
- self.languageSelectionLabel.setObjectName(u'languageSelectionLabel')
- self.languageSelectionComboBox = QtGui.QComboBox(self.languageSelectionGroupBox)
- self.languageSelectionComboBox.setObjectName(u'languageSelectionComboBox')
- self.languageSelectionComboBox.addItems([u'', u'', u''])
- self.languageSelectionLayout.addWidget(self.languageSelectionLabel)
- self.languageSelectionLayout.addWidget(self.languageSelectionComboBox)
- self.rightLayout.addWidget(self.languageSelectionGroupBox)
- self.leftLayout.addStretch()
- self.rightLayout.addStretch()
+ self.verse_display_group_box = QtGui.QGroupBox(self.left_column)
+ self.verse_display_group_box.setObjectName(u'verse_display_group_box')
+ self.verse_display_layout = QtGui.QFormLayout(self.verse_display_group_box)
+ self.verse_display_layout.setObjectName(u'verse_display_layout')
+ self.new_chapters_check_box = QtGui.QCheckBox(self.verse_display_group_box)
+ self.new_chapters_check_box.setObjectName(u'new_chapters_check_box')
+ self.verse_display_layout.addRow(self.new_chapters_check_box)
+ self.display_style_label = QtGui.QLabel(self.verse_display_group_box)
+ self.display_style_label.setObjectName(u'display_style_label')
+ self.display_style_combo_box = QtGui.QComboBox(self.verse_display_group_box)
+ self.display_style_combo_box.addItems([u'', u'', u'', u''])
+ self.display_style_combo_box.setObjectName(u'display_style_combo_box')
+ self.verse_display_layout.addRow(self.display_style_label, self.display_style_combo_box)
+ self.layout_style_label = QtGui.QLabel(self.verse_display_group_box)
+ self.layout_style_label.setObjectName(u'layout_style_label')
+ self.layout_style_combo_box = QtGui.QComboBox(self.verse_display_group_box)
+ self.layout_style_combo_box.setObjectName(u'layout_style_combo_box')
+ self.layout_style_combo_box.addItems([u'', u'', u''])
+ self.verse_display_layout.addRow(self.layout_style_label, self.layout_style_combo_box)
+ self.bible_second_check_box = QtGui.QCheckBox(self.verse_display_group_box)
+ self.bible_second_check_box.setObjectName(u'bible_second_check_box')
+ self.verse_display_layout.addRow(self.bible_second_check_box)
+ self.bible_theme_label = QtGui.QLabel(self.verse_display_group_box)
+ self.bible_theme_label.setObjectName(u'BibleTheme_label')
+ self.bible_theme_combo_box = QtGui.QComboBox(self.verse_display_group_box)
+ self.bible_theme_combo_box.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
+ self.bible_theme_combo_box.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
+ self.bible_theme_combo_box.addItem(u'')
+ self.bible_theme_combo_box.setObjectName(u'BibleThemecombo_box')
+ self.verse_display_layout.addRow(self.bible_theme_label, self.bible_theme_combo_box)
+ self.change_note_label = QtGui.QLabel(self.verse_display_group_box)
+ self.change_note_label.setWordWrap(True)
+ self.change_note_label.setObjectName(u'change_note_label')
+ self.verse_display_layout.addRow(self.change_note_label)
+ self.left_layout.addWidget(self.verse_display_group_box)
+ self.scripture_reference_group_box = QtGui.QGroupBox(self.left_column)
+ self.scripture_reference_group_box.setObjectName(u'scripture_reference_group_box')
+ self.scripture_reference_layout = QtGui.QGridLayout(self.scripture_reference_group_box)
+ self.verse_separator_check_box = QtGui.QCheckBox(self.scripture_reference_group_box)
+ self.verse_separator_check_box.setObjectName(u'verse_separator_check_box')
+ self.scripture_reference_layout.addWidget(self.verse_separator_check_box, 0, 0)
+ self.verse_separator_line_edit = QtGui.QLineEdit(self.scripture_reference_group_box)
+ self.verse_separator_line_edit.setObjectName(u'verse_separator_line_edit')
+ self.scripture_reference_layout.addWidget(self.verse_separator_line_edit, 0, 1)
+ self.range_separator_check_box = QtGui.QCheckBox(self.scripture_reference_group_box)
+ self.range_separator_check_box.setObjectName(u'range_separator_check_box')
+ self.scripture_reference_layout.addWidget(self.range_separator_check_box, 1, 0)
+ self.range_separator_line_edit = QtGui.QLineEdit(self.scripture_reference_group_box)
+ self.range_separator_line_edit.setObjectName(u'range_separator_line_edit')
+ self.scripture_reference_layout.addWidget(self.range_separator_line_edit, 1, 1)
+ self.list_separator_check_box = QtGui.QCheckBox(self.scripture_reference_group_box)
+ self.list_separator_check_box.setObjectName(u'list_separator_check_box')
+ self.scripture_reference_layout.addWidget(self.list_separator_check_box, 2, 0)
+ self.list_separator_line_edit = QtGui.QLineEdit(self.scripture_reference_group_box)
+ self.list_separator_line_edit.setObjectName(u'list_separator_line_edit')
+ self.scripture_reference_layout.addWidget(self.list_separator_line_edit, 2, 1)
+ self.end_separator_check_box = QtGui.QCheckBox(self.scripture_reference_group_box)
+ self.end_separator_check_box.setObjectName(u'end_separator_check_box')
+ self.scripture_reference_layout.addWidget(self.end_separator_check_box, 3, 0)
+ self.end_separator_line_edit = QtGui.QLineEdit(self.scripture_reference_group_box)
+ self.end_separator_line_edit.setObjectName(u'end_separator_line_edit')
+ self.end_separator_line_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^0-9]*'),
+ self.end_separator_line_edit))
+ self.scripture_reference_layout.addWidget(self.end_separator_line_edit, 3, 1)
+ self.left_layout.addWidget(self.scripture_reference_group_box)
+ self.right_column.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
+ 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_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_selection_group_box)
+ self.left_layout.addStretch()
+ self.right_layout.addStretch()
# Signals and slots
- self.newChaptersCheckBox.stateChanged.connect(self.onNewChaptersCheckBoxChanged)
- self.displayStyleComboBox.activated.connect(self.onDisplayStyleComboBoxChanged)
- self.bibleThemeComboBox.activated.connect(self.onBibleThemeComboBoxChanged)
- self.layoutStyleComboBox.activated.connect(self.onLayoutStyleComboBoxChanged)
- self.bibleSecondCheckBox.stateChanged.connect(self.onBibleSecondCheckBox)
- self.verseSeparatorCheckBox.clicked.connect(self.onVerseSeparatorCheckBoxClicked)
- self.verseSeparatorLineEdit.textEdited.connect(self.onVerseSeparatorLineEditEdited)
- self.verseSeparatorLineEdit.editingFinished.connect(self.onVerseSeparatorLineEditFinished)
- self.rangeSeparatorCheckBox.clicked.connect(self.onRangeSeparatorCheckBoxClicked)
- self.rangeSeparatorLineEdit.textEdited.connect(self.onRangeSeparatorLineEditEdited)
- self.rangeSeparatorLineEdit.editingFinished.connect(self.onRangeSeparatorLineEditFinished)
- self.listSeparatorCheckBox.clicked.connect(self.onListSeparatorCheckBoxClicked)
- self.listSeparatorLineEdit.textEdited.connect(self.onListSeparatorLineEditEdited)
- self.listSeparatorLineEdit.editingFinished.connect(self.onListSeparatorLineEditFinished)
- self.endSeparatorCheckBox.clicked.connect(self.onEndSeparatorCheckBoxClicked)
- self.endSeparatorLineEdit.textEdited.connect(self.onEndSeparatorLineEditEdited)
- self.endSeparatorLineEdit.editingFinished.connect(self.onEndSeparatorLineEditFinished)
+ self.new_chapters_check_box.stateChanged.connect(self.on_new_chapters_check_box_changed)
+ self.display_style_combo_box.activated.connect(self.on_display_style_combo_box_changed)
+ self.bible_theme_combo_box.activated.connect(self.on_bible_theme_combo_box_changed)
+ self.layout_style_combo_box.activated.connect(self.on_layout_style_combo_boxChanged)
+ self.bible_second_check_box.stateChanged.connect(self.on_bible_second_check_box)
+ self.verse_separator_check_box.clicked.connect(self.on_verse_separator_check_box_clicked)
+ self.verse_separator_line_edit.textEdited.connect(self.on_verse_separator_line_edit_edited)
+ self.verse_separator_line_edit.editingFinished.connect(self.on_verse_separator_line_edit_finished)
+ self.range_separator_check_box.clicked.connect(self.on_range_separator_check_box_clicked)
+ self.range_separator_line_edit.textEdited.connect(self.on_range_separator_line_edit_edited)
+ self.range_separator_line_edit.editingFinished.connect(self.on_range_separator_line_edit_finished)
+ self.list_separator_check_box.clicked.connect(self.on_list_separator_check_box_clicked)
+ self.list_separator_line_edit.textEdited.connect(self.on_list_separator_line_edit_edited)
+ self.list_separator_line_edit.editingFinished.connect(self.on_list_separator_line_edit_finished)
+ self.end_separator_check_box.clicked.connect(self.on_end_separator_check_box_clicked)
+ 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.languageSelectionComboBox.activated.connect(self.onLanguageSelectionComboBoxChanged)
+ self.language_selection_combo_box.activated.connect(self.on_language_selection_combo_box_changed)
def retranslateUi(self):
- self.verseDisplayGroupBox.setTitle(translate('BiblesPlugin.BiblesTab', 'Verse Display'))
- self.newChaptersCheckBox.setText(translate('BiblesPlugin.BiblesTab', 'Only show new chapter numbers'))
- self.layoutStyleLabel.setText(UiStrings().LayoutStyle)
- self.displayStyleLabel.setText(UiStrings().DisplayStyle)
- self.bibleThemeLabel.setText(translate('BiblesPlugin.BiblesTab', 'Bible theme:'))
- self.layoutStyleComboBox.setItemText(LayoutStyle.VersePerSlide, UiStrings().VersePerSlide)
- self.layoutStyleComboBox.setItemText(LayoutStyle.VersePerLine, UiStrings().VersePerLine)
- self.layoutStyleComboBox.setItemText(LayoutStyle.Continuous, UiStrings().Continuous)
- self.displayStyleComboBox.setItemText(DisplayStyle.NoBrackets,
+ 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().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)
+ self.layout_style_combo_box.setItemText(LayoutStyle.VersePerLine, UiStrings().VersePerLine)
+ self.layout_style_combo_box.setItemText(LayoutStyle.Continuous, UiStrings().Continuous)
+ self.display_style_combo_box.setItemText(DisplayStyle.NoBrackets,
translate('BiblesPlugin.BiblesTab', 'No Brackets'))
- self.displayStyleComboBox.setItemText(DisplayStyle.Round,
+ self.display_style_combo_box.setItemText(DisplayStyle.Round,
translate('BiblesPlugin.BiblesTab', '( And )'))
- self.displayStyleComboBox.setItemText(DisplayStyle.Curly,
+ self.display_style_combo_box.setItemText(DisplayStyle.Curly,
translate('BiblesPlugin.BiblesTab', '{ And }'))
- self.displayStyleComboBox.setItemText(DisplayStyle.Square,
+ self.display_style_combo_box.setItemText(DisplayStyle.Square,
translate('BiblesPlugin.BiblesTab', '[ And ]'))
- self.changeNoteLabel.setText(translate('BiblesPlugin.BiblesTab',
+ self.change_note_label.setText(translate('BiblesPlugin.BiblesTab',
'Note:\nChanges do not affect verses already in the service.'))
- self.bibleSecondCheckBox.setText(translate('BiblesPlugin.BiblesTab', 'Display second Bible verses'))
- self.scriptureReferenceGroupBox.setTitle(translate('BiblesPlugin.BiblesTab', 'Custom Scripture References'))
- self.verseSeparatorCheckBox.setText(translate('BiblesPlugin.BiblesTab', 'Verse Separator:'))
- self.rangeSeparatorCheckBox.setText(translate('BiblesPlugin.BiblesTab', 'Range Separator:'))
- self.listSeparatorCheckBox.setText(translate('BiblesPlugin.BiblesTab', 'List Separator:'))
- self.endSeparatorCheckBox.setText(translate('BiblesPlugin.BiblesTab', 'End Mark:'))
+ self.bible_second_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Display second Bible verses'))
+ self.scripture_reference_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Custom Scripture References'))
+ self.verse_separator_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Verse Separator:'))
+ self.range_separator_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Range Separator:'))
+ self.list_separator_check_box.setText(translate('BiblesPlugin.BiblesTab', 'List Separator:'))
+ self.end_separator_check_box.setText(translate('BiblesPlugin.BiblesTab', 'End Mark:'))
tip_text = translate('BiblesPlugin.BiblesTab',
'Multiple alternative verse separators may be defined.\nThey have to be separated by a vertical bar "|".'
'\nPlease clear this edit line to use the default value.')
- self.verseSeparatorLineEdit.setToolTip(tip_text)
- self.rangeSeparatorLineEdit.setToolTip(tip_text)
- self.listSeparatorLineEdit.setToolTip(tip_text)
- self.endSeparatorLineEdit.setToolTip(tip_text)
- self.languageSelectionGroupBox.setTitle(translate('BiblesPlugin.BiblesTab', 'Default Bible Language'))
- self.languageSelectionLabel.setText(translate('BiblesPlugin.BiblesTab',
+ self.verse_separator_line_edit.setToolTip(tip_text)
+ 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_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.languageSelectionComboBox.setItemText(LanguageSelection.Bible,
+ self.language_selection_combo_box.setItemText(LanguageSelection.Bible,
translate('BiblesPlugin.BiblesTab', 'Bible Language'))
- self.languageSelectionComboBox.setItemText(LanguageSelection.Application,
+ self.language_selection_combo_box.setItemText(LanguageSelection.Application,
translate('BiblesPlugin.BiblesTab', 'Application Language'))
- self.languageSelectionComboBox.setItemText(LanguageSelection.English,
+ self.language_selection_combo_box.setItemText(LanguageSelection.English,
translate('BiblesPlugin.BiblesTab', 'English'))
- def onBibleThemeComboBoxChanged(self):
- self.bible_theme = self.bibleThemeComboBox.currentText()
-
- def onDisplayStyleComboBoxChanged(self):
- self.display_style = self.displayStyleComboBox.currentIndex()
-
- def onLayoutStyleComboBoxChanged(self):
- self.layout_style = self.layoutStyleComboBox.currentIndex()
-
- def onLanguageSelectionComboBoxChanged(self):
- self.language_selection = self.languageSelectionComboBox.currentIndex()
-
- def onNewChaptersCheckBoxChanged(self, check_state):
+ def on_bible_theme_combo_box_changed(self):
+ self.bible_theme = self.bible_theme_combo_box.currentText()
+
+ def on_display_style_combo_box_changed(self):
+ self.display_style = self.display_style_combo_box.currentIndex()
+
+ def on_layout_style_combo_boxChanged(self):
+ self.layout_style = self.layout_style_combo_box.currentIndex()
+
+ def on_language_selection_combo_box_changed(self):
+ self.language_selection = self.language_selectioncombo_box.currentIndex()
+
+ def on_new_chapters_check_box_changed(self, check_state):
self.show_new_chapters = False
# We have a set value convert to True/False.
if check_state == QtCore.Qt.Checked:
self.show_new_chapters = True
- def onBibleSecondCheckBox(self, check_state):
+ def on_bible_second_check_box(self, check_state):
self.second_bibles = False
# We have a set value convert to True/False.
if check_state == QtCore.Qt.Checked:
self.second_bibles = True
- def onVerseSeparatorCheckBoxClicked(self, checked):
+ def on_verse_separator_check_box_clicked(self, checked):
if checked:
- self.verseSeparatorLineEdit.setFocus()
+ self.verse_separator_line_edit.setFocus()
else:
- self.verseSeparatorLineEdit.setText(get_reference_separator(u'sep_v_default'))
- self.verseSeparatorLineEdit.setPalette(self.getGreyTextPalette(not checked))
-
- def onVerseSeparatorLineEditEdited(self, text):
- self.verseSeparatorCheckBox.setChecked(True)
- self.verseSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
-
- def onVerseSeparatorLineEditFinished(self):
- if self.verseSeparatorLineEdit.isModified():
- text = self.verseSeparatorLineEdit.text()
+ self.verse_separator_line_edit.setText(get_reference_separator(u'sep_v_default'))
+ self.verse_separator_line_edit.setPalette(self.getGreyTextPalette(not checked))
+
+ def on_verse_separator_line_edit_edited(self, text):
+ self.verse_separator_check_box.setChecked(True)
+ self.verse_separator_line_edit.setPalette(self.getGreyTextPalette(False))
+
+ def on_verse_separator_line_edit_finished(self):
+ if self.verse_separator_line_edit.isModified():
+ text = self.verse_separator_line_edit.text()
if text == get_reference_separator(u'sep_v_default') or not text.replace(u'|', u''):
- self.verseSeparatorCheckBox.setChecked(False)
- self.verseSeparatorLineEdit.setText(get_reference_separator(u'sep_v_default'))
- self.verseSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
+ self.verse_separator_check_box.setChecked(False)
+ self.verse_separator_line_edit.setText(get_reference_separator(u'sep_v_default'))
+ self.verse_separator_line_edit.setPalette(self.getGreyTextPalette(True))
- def onRangeSeparatorCheckBoxClicked(self, checked):
+ def on_range_separator_check_box_clicked(self, checked):
if checked:
- self.rangeSeparatorLineEdit.setFocus()
+ self.range_separator_line_edit.setFocus()
else:
- self.rangeSeparatorLineEdit.setText(get_reference_separator(u'sep_r_default'))
- self.rangeSeparatorLineEdit.setPalette(self.getGreyTextPalette(not checked))
-
- def onRangeSeparatorLineEditEdited(self, text):
- self.rangeSeparatorCheckBox.setChecked(True)
- self.rangeSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
-
- def onRangeSeparatorLineEditFinished(self):
- if self.rangeSeparatorLineEdit.isModified():
- text = self.rangeSeparatorLineEdit.text()
+ self.range_separator_line_edit.setText(get_reference_separator(u'sep_r_default'))
+ self.range_separator_line_edit.setPalette(self.getGreyTextPalette(not checked))
+
+ def on_range_separator_line_edit_edited(self, text):
+ self.range_separator_check_box.setChecked(True)
+ self.range_separator_line_edit.setPalette(self.getGreyTextPalette(False))
+
+ def on_range_separator_line_edit_finished(self):
+ if self.range_separator_line_edit.isModified():
+ text = self.range_separator_line_edit.text()
if text == get_reference_separator(u'sep_r_default') or not text.replace(u'|', u''):
- self.rangeSeparatorCheckBox.setChecked(False)
- self.rangeSeparatorLineEdit.setText(get_reference_separator(u'sep_r_default'))
- self.rangeSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
+ self.range_separator_check_box.setChecked(False)
+ self.range_separator_line_edit.setText(get_reference_separator(u'sep_r_default'))
+ self.range_separator_line_edit.setPalette(self.getGreyTextPalette(True))
- def onListSeparatorCheckBoxClicked(self, checked):
+ def on_list_separator_check_box_clicked(self, checked):
if checked:
- self.listSeparatorLineEdit.setFocus()
+ self.list_separator_line_edit.setFocus()
else:
- self.listSeparatorLineEdit.setText(get_reference_separator(u'sep_l_default'))
- self.listSeparatorLineEdit.setPalette(self.getGreyTextPalette(not checked))
-
- def onListSeparatorLineEditEdited(self, text):
- self.listSeparatorCheckBox.setChecked(True)
- self.listSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
-
- def onListSeparatorLineEditFinished(self):
- if self.listSeparatorLineEdit.isModified():
- text = self.listSeparatorLineEdit.text()
+ self.list_separator_line_edit.setText(get_reference_separator(u'sep_l_default'))
+ self.list_separator_line_edit.setPalette(self.getGreyTextPalette(not checked))
+
+ def on_list_separator_line_edit_edited(self, text):
+ self.list_separator_check_box.setChecked(True)
+ self.list_separator_line_edit.setPalette(self.getGreyTextPalette(False))
+
+ def on_list_separator_line_edit_finished(self):
+ if self.list_separator_line_edit.isModified():
+ text = self.list_separator_line_edit.text()
if text == get_reference_separator(u'sep_l_default') or not text.replace(u'|', u''):
- self.listSeparatorCheckBox.setChecked(False)
- self.listSeparatorLineEdit.setText(get_reference_separator(u'sep_l_default'))
- self.listSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
+ self.list_separator_check_box.setChecked(False)
+ self.list_separator_line_edit.setText(get_reference_separator(u'sep_l_default'))
+ self.list_separator_line_edit.setPalette(self.getGreyTextPalette(True))
- def onEndSeparatorCheckBoxClicked(self, checked):
+ def on_end_separator_check_box_clicked(self, checked):
if checked:
- self.endSeparatorLineEdit.setFocus()
+ self.end_separator_line_edit.setFocus()
else:
- self.endSeparatorLineEdit.setText(get_reference_separator(u'sep_e_default'))
- self.endSeparatorLineEdit.setPalette(self.getGreyTextPalette(not checked))
-
- def onEndSeparatorLineEditEdited(self, text):
- self.endSeparatorCheckBox.setChecked(True)
- self.endSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
-
- def onEndSeparatorLineEditFinished(self):
- if self.endSeparatorLineEdit.isModified():
- text = self.endSeparatorLineEdit.text()
+ self.end_separator_line_edit.setText(get_reference_separator(u'sep_e_default'))
+ self.end_separator_line_edit.setPalette(self.getGreyTextPalette(not checked))
+
+ def on_end_separator_line_edit_edited(self, text):
+ self.end_separator_check_box.setChecked(True)
+ self.end_separator_line_edit.setPalette(self.getGreyTextPalette(False))
+
+ def on_end_separator_line_edit_finished(self):
+ if self.end_separator_line_edit.isModified():
+ text = self.end_separator_line_edit.text()
if text == get_reference_separator(u'sep_e_default') or not text.replace(u'|', u''):
- self.endSeparatorCheckBox.setChecked(False)
- self.endSeparatorLineEdit.setText(get_reference_separator(u'sep_e_default'))
- self.endSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
+ self.end_separator_check_box.setChecked(False)
+ self.end_separator_line_edit.setText(get_reference_separator(u'sep_e_default'))
+ self.end_separator_line_edit.setPalette(self.getGreyTextPalette(True))
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')
self.bible_theme = settings.value(u'bible theme')
self.second_bibles = settings.value(u'second bibles')
- self.newChaptersCheckBox.setChecked(self.show_new_chapters)
- self.displayStyleComboBox.setCurrentIndex(self.display_style)
- self.layoutStyleComboBox.setCurrentIndex(self.layout_style)
- self.bibleSecondCheckBox.setChecked(self.second_bibles)
+ self.new_chapters_check_box.setChecked(self.show_new_chapters)
+ self.display_style_combo_box.setCurrentIndex(self.display_style)
+ self.layout_style_combo_box.setCurrentIndex(self.layout_style)
+ self.bible_second_check_box.setChecked(self.second_bibles)
verse_separator = settings.value(u'verse separator')
if (verse_separator.strip(u'|') == u'') or (verse_separator == get_reference_separator(u'sep_v_default')):
- self.verseSeparatorLineEdit.setText(get_reference_separator(u'sep_v_default'))
- self.verseSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
- self.verseSeparatorCheckBox.setChecked(False)
+ self.verse_separator_line_edit.setText(get_reference_separator(u'sep_v_default'))
+ self.verse_separator_line_edit.setPalette(self.getGreyTextPalette(True))
+ self.verse_separator_check_box.setChecked(False)
else:
- self.verseSeparatorLineEdit.setText(verse_separator)
- self.verseSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
- self.verseSeparatorCheckBox.setChecked(True)
+ self.verse_separator_line_edit.setText(verse_separator)
+ self.verse_separator_line_edit.setPalette(self.getGreyTextPalette(False))
+ self.verse_separator_check_box.setChecked(True)
range_separator = settings.value(u'range separator')
if (range_separator.strip(u'|') == u'') or (range_separator == get_reference_separator(u'sep_r_default')):
- self.rangeSeparatorLineEdit.setText(get_reference_separator(u'sep_r_default'))
- self.rangeSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
- self.rangeSeparatorCheckBox.setChecked(False)
+ self.range_separator_line_edit.setText(get_reference_separator(u'sep_r_default'))
+ self.range_separator_line_edit.setPalette(self.getGreyTextPalette(True))
+ self.range_separator_check_box.setChecked(False)
else:
- self.rangeSeparatorLineEdit.setText(range_separator)
- self.rangeSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
- self.rangeSeparatorCheckBox.setChecked(True)
+ self.range_separator_line_edit.setText(range_separator)
+ self.range_separator_line_edit.setPalette(self.getGreyTextPalette(False))
+ self.range_separator_check_box.setChecked(True)
list_separator = settings.value(u'list separator')
if (list_separator.strip(u'|') == u'') or (list_separator == get_reference_separator(u'sep_l_default')):
- self.listSeparatorLineEdit.setText(get_reference_separator(u'sep_l_default'))
- self.listSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
- self.listSeparatorCheckBox.setChecked(False)
+ self.list_separator_line_edit.setText(get_reference_separator(u'sep_l_default'))
+ self.list_separator_line_edit.setPalette(self.getGreyTextPalette(True))
+ self.list_separator_check_box.setChecked(False)
else:
- self.listSeparatorLineEdit.setText(list_separator)
- self.listSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
- self.listSeparatorCheckBox.setChecked(True)
+ self.list_separator_line_edit.setText(list_separator)
+ self.list_separator_line_edit.setPalette(self.getGreyTextPalette(False))
+ self.list_separator_check_box.setChecked(True)
end_separator = settings.value(u'end separator')
if (end_separator.strip(u'|') == u'') or (end_separator == get_reference_separator(u'sep_e_default')):
- self.endSeparatorLineEdit.setText(get_reference_separator(u'sep_e_default'))
- self.endSeparatorLineEdit.setPalette(self.getGreyTextPalette(True))
- self.endSeparatorCheckBox.setChecked(False)
+ self.end_separator_line_edit.setText(get_reference_separator(u'sep_e_default'))
+ self.end_separator_line_edit.setPalette(self.getGreyTextPalette(True))
+ self.end_separator_check_box.setChecked(False)
else:
- self.endSeparatorLineEdit.setText(end_separator)
- self.endSeparatorLineEdit.setPalette(self.getGreyTextPalette(False))
- self.endSeparatorCheckBox.setChecked(True)
+ self.end_separator_line_edit.setText(end_separator)
+ 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.languageSelectionComboBox.setCurrentIndex(self.language_selection)
+ self.language_selection_combo_box.setCurrentIndex(self.language_selection)
settings.endGroup()
def save(self):
@@ -356,20 +356,20 @@
settings.setValue(u'verse layout style', self.layout_style)
settings.setValue(u'second bibles', self.second_bibles)
settings.setValue(u'bible theme', self.bible_theme)
- if self.verseSeparatorCheckBox.isChecked():
- settings.setValue(u'verse separator', self.verseSeparatorLineEdit.text())
+ if self.verse_separator_check_box.isChecked():
+ settings.setValue(u'verse separator', self.verse_separator_line_edit.text())
else:
settings.remove(u'verse separator')
- if self.rangeSeparatorCheckBox.isChecked():
- settings.setValue(u'range separator', self.rangeSeparatorLineEdit.text())
+ if self.range_separator_check_box.isChecked():
+ settings.setValue(u'range separator', self.range_separator_line_edit.text())
else:
settings.remove(u'range separator')
- if self.listSeparatorCheckBox.isChecked():
- settings.setValue(u'list separator', self.listSeparatorLineEdit.text())
+ if self.list_separator_check_box.isChecked():
+ settings.setValue(u'list separator', self.list_separator_line_edit.text())
else:
settings.remove(u'list separator')
- if self.endSeparatorCheckBox.isChecked():
- settings.setValue(u'end separator', self.endSeparatorLineEdit.text())
+ if self.end_separator_check_box.isChecked():
+ settings.setValue(u'end separator', self.end_separator_line_edit.text())
else:
settings.remove(u'end separator')
update_reference_separators()
@@ -388,10 +388,10 @@
[u'Bible Theme', u'Song Theme']
"""
- self.bibleThemeComboBox.clear()
- self.bibleThemeComboBox.addItem(u'')
- self.bibleThemeComboBox.addItems(theme_list)
- find_and_set_in_combo_box(self.bibleThemeComboBox, self.bible_theme)
+ self.bible_theme_combo_box.clear()
+ self.bible_theme_combo_box.addItem(u'')
+ self.bible_theme_combo_box.addItems(theme_list)
+ find_and_set_in_combo_box(self.bible_theme_combo_box, self.bible_theme)
def getGreyTextPalette(self, greyed):
"""
@@ -403,4 +403,3 @@
color.setAlpha(128)
palette.setColor(QtGui.QPalette.Active, QtGui.QPalette.Text, color)
return palette
-
=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py 2013-03-10 20:19:42 +0000
+++ openlp/plugins/bibles/lib/db.py 2013-03-16 20:56:21 +0000
@@ -353,8 +353,7 @@
book, book_id, language_id)
return book_id
- def get_book_ref_id_by_localised_name(self, book,
- language_selection):
+ def get_book_ref_id_by_localised_name(self, book, language_selection):
"""
Return the id of a named book.
@@ -362,8 +361,7 @@
The name of the book, according to the selected language.
``language_selection``
- The language selection the user has chosen in the settings
- section of the Bible.
+ The language selection the user has chosen in the settings section of the Bible.
"""
log.debug(u'get_book_ref_id_by_localised_name("%s", "%s")', book, language_selection)
from openlp.plugins.bibles.lib import LanguageSelection, BibleStrings
@@ -423,12 +421,12 @@
log.debug(u'Book name corrected to "%s"', db_book.name)
if end_verse == -1:
end_verse = self.get_verse_count(book_id, chapter)
- verses = self.session.query(Verse)\
- .filter_by(book_id=db_book.id)\
- .filter_by(chapter=chapter)\
- .filter(Verse.verse >= start_verse)\
- .filter(Verse.verse <= end_verse)\
- .order_by(Verse.verse)\
+ verses = self.session.query(Verse) \
+ .filter_by(book_id=db_book.id) \
+ .filter_by(chapter=chapter) \
+ .filter(Verse.verse >= start_verse) \
+ .filter(Verse.verse <= end_verse) \
+ .order_by(Verse.verse) \
.all()
verse_list.extend(verses)
else:
@@ -491,9 +489,9 @@
The chapter to get the verse count for.
"""
log.debug(u'BibleDB.get_verse_count("%s", "%s")', book_ref_id, chapter)
- count = self.session.query(func.max(Verse.verse)).join(Book)\
- .filter(Book.book_reference_id==book_ref_id)\
- .filter(Verse.chapter==chapter)\
+ count = self.session.query(func.max(Verse.verse)).join(Book) \
+ .filter(Book.book_reference_id == book_ref_id) \
+ .filter(Verse.chapter == chapter) \
.scalar()
if not count:
return 0
=== modified file 'openlp/plugins/bibles/lib/upgrade.py'
--- openlp/plugins/bibles/lib/upgrade.py 2013-01-01 16:33:41 +0000
+++ openlp/plugins/bibles/lib/upgrade.py 2013-03-16 20:56:21 +0000
@@ -37,6 +37,7 @@
__version__ = 1
log = logging.getLogger(__name__)
+
def upgrade_setup(metadata):
"""
Set up the latest revision all tables, with reflection, needed for the
@@ -56,7 +57,7 @@
"""
Version 1 upgrade.
- This upgrade renames a number of keys to a single naming convention..
+ This upgrade renames a number of keys to a single naming convention.
"""
metadata_table = metadata.tables[u'metadata']
# Copy "Version" to "name" ("version" used by upgrade system)
=== modified file 'openlp/plugins/custom/lib/customtab.py'
--- openlp/plugins/custom/lib/customtab.py 2013-02-19 21:23:56 +0000
+++ openlp/plugins/custom/lib/customtab.py 2013-03-16 20:56:21 +0000
@@ -45,7 +45,7 @@
def setupUi(self):
self.setObjectName(u'CustomTab')
SettingsTab.setupUi(self)
- self.custom_mode_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.custom_mode_group_box = QtGui.QGroupBox(self.left_column)
self.custom_mode_group_box.setObjectName(u'custom_mode_group_box')
self.custom_mode_layout = QtGui.QFormLayout(self.custom_mode_group_box)
self.custom_mode_layout.setObjectName(u'custom_mode_layout')
@@ -55,9 +55,9 @@
self.add_from_service_checkbox = QtGui.QCheckBox(self.custom_mode_group_box)
self.add_from_service_checkbox.setObjectName(u'add_from_service_checkbox')
self.custom_mode_layout.addRow(self.add_from_service_checkbox)
- self.leftLayout.addWidget(self.custom_mode_group_box)
- self.leftLayout.addStretch()
- self.rightLayout.addStretch()
+ self.left_layout.addWidget(self.custom_mode_group_box)
+ self.left_layout.addStretch()
+ self.right_layout.addStretch()
self.display_footer_check_box.stateChanged.connect(self.on_display_footer_check_box_changed)
self.add_from_service_checkbox.stateChanged.connect(self.on_add_from_service_check_box_changed)
@@ -81,7 +81,7 @@
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 @@
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()
=== modified file 'openlp/plugins/images/lib/imagetab.py'
--- openlp/plugins/images/lib/imagetab.py 2013-03-10 20:19:42 +0000
+++ openlp/plugins/images/lib/imagetab.py 2013-03-16 20:56:21 +0000
@@ -27,9 +27,10 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from PyQt4 import QtCore, QtGui
-
-from openlp.core.lib import SettingsTab, Registry, Settings, UiStrings, translate
+from PyQt4 import QtGui
+
+from openlp.core.lib import SettingsTab, Settings, UiStrings, translate
+
class ImageTab(SettingsTab):
"""
@@ -41,53 +42,53 @@
def setupUi(self):
self.setObjectName(u'ImagesTab')
SettingsTab.setupUi(self)
- self.bgColorGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.bgColorGroupBox.setObjectName(u'FontGroupBox')
- self.formLayout = QtGui.QFormLayout(self.bgColorGroupBox)
- self.formLayout.setObjectName(u'FormLayout')
- self.colorLayout = QtGui.QHBoxLayout()
- self.backgroundColorLabel = QtGui.QLabel(self.bgColorGroupBox)
- self.backgroundColorLabel.setObjectName(u'BackgroundColorLabel')
- self.colorLayout.addWidget(self.backgroundColorLabel)
- self.backgroundColorButton = QtGui.QPushButton(self.bgColorGroupBox)
- self.backgroundColorButton.setObjectName(u'BackgroundColorButton')
- self.colorLayout.addWidget(self.backgroundColorButton)
- self.formLayout.addRow(self.colorLayout)
- self.information_label = QtGui.QLabel(self.bgColorGroupBox)
+ self.background_color_group_box = QtGui.QGroupBox(self.left_column)
+ 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'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'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)
self.information_label.setObjectName(u'information_label')
self.information_label.setWordWrap(True)
- self.formLayout.addRow(self.information_label)
- self.leftLayout.addWidget(self.bgColorGroupBox)
- self.leftLayout.addStretch()
- self.rightColumn.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
- self.rightLayout.addStretch()
+ self.form_layout.addRow(self.information_label)
+ self.left_layout.addWidget(self.background_color_group_box)
+ self.left_layout.addStretch()
+ self.right_column.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
+ self.right_layout.addStretch()
# Signals and slots
- self.backgroundColorButton.clicked.connect(self.onbackgroundColorButtonClicked)
+ self.background_color_button.clicked.connect(self.on_background_color_button_clicked)
def retranslateUi(self):
- self.bgColorGroupBox.setTitle(UiStrings().BackgroundColor)
- self.backgroundColorLabel.setText(UiStrings().DefaultColor)
+ self.background_color_group_box.setTitle(UiStrings().BackgroundColor)
+ self.background_color_label.setText(UiStrings().DefaultColor)
self.information_label.setText(
translate('ImagesPlugin.ImageTab', 'Visible background for images with aspect ratio different to screen.'))
- def onbackgroundColorButtonClicked(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.backgroundColorButton.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.backgroundColorButton.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')
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py 2013-03-07 13:14:31 +0000
+++ openlp/plugins/images/lib/mediaitem.py 2013-03-16 20:56:21 +0000
@@ -99,7 +99,7 @@
row_list = [item.row() for item in self.listView.selectedIndexes()]
row_list.sort(reverse=True)
self.application.set_busy_cursor()
- self.main_window.displayProgressBar(len(row_list))
+ self.main_window.display_progress_bar(len(row_list))
for row in row_list:
text = self.listView.item(row)
if text:
@@ -107,14 +107,14 @@
self.listView.takeItem(row)
self.main_window.increment_progress_bar()
Settings.setValue(self.settingsSection + u'/images files', self.getFileList())
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_normal_cursor()
self.listView.blockSignals(False)
def loadList(self, images, initialLoad=False):
self.application.set_busy_cursor()
if not initialLoad:
- self.main_window.displayProgressBar(len(images))
+ self.main_window.display_progress_bar(len(images))
# Sort the images by its filename considering language specific
# characters.
images.sort(cmp=locale_compare, key=lambda filename: os.path.split(unicode(filename))[1])
@@ -136,7 +136,7 @@
if not initialLoad:
self.main_window.increment_progress_bar()
if not initialLoad:
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_normal_cursor()
def generateSlideData(self, service_item, item=None, xmlVersion=False,
=== modified file 'openlp/plugins/media/lib/mediatab.py'
--- openlp/plugins/media/lib/mediatab.py 2013-03-10 20:19:42 +0000
+++ openlp/plugins/media/lib/mediatab.py 2013-03-16 20:56:21 +0000
@@ -32,9 +32,9 @@
from openlp.core.lib import Settings, SettingsTab, UiStrings, translate
-class MediaQCheckBox(QtGui.QCheckBox):
+class MediaQ_check_box(QtGui.QCheckBox):
"""
- MediaQCheckBox adds an extra property, playerName to the QCheckBox class.
+ MediaQ_check_box adds an extra property, playerName to the Q_check_box class.
"""
def setPlayerName(self, name):
self.playerName = name
@@ -51,36 +51,36 @@
def setupUi(self):
self.setObjectName(u'MediaTab')
SettingsTab.setupUi(self)
- self.advancedGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.advancedGroupBox.setObjectName(u'advancedGroupBox')
- self.advancedLayout = QtGui.QVBoxLayout(self.advancedGroupBox)
- self.advancedLayout.setObjectName(u'advancedLayout')
- self.overridePlayerCheckBox = QtGui.QCheckBox(self.advancedGroupBox)
- self.overridePlayerCheckBox.setObjectName(u'overridePlayerCheckBox')
- self.advancedLayout.addWidget(self.overridePlayerCheckBox)
- self.autoStartCheckBox = QtGui.QCheckBox(self.advancedGroupBox)
- self.autoStartCheckBox.setObjectName(u'autoStartCheckBox')
- self.advancedLayout.addWidget(self.autoStartCheckBox)
- self.leftLayout.addWidget(self.advancedGroupBox)
- self.leftLayout.addStretch()
- self.rightLayout.addStretch()
+ 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')
+ self.override_player_check_box = QtGui.QCheckBox(self.advanced_group_box)
+ self.override_player_check_box.setObjectName(u'override_player_check_box')
+ self.advanced_layout.addWidget(self.override_player_check_box)
+ self.auto_start_check_box = QtGui.QCheckBox(self.advanced_group_box)
+ self.auto_start_check_box.setObjectName(u'auto_start_check_box')
+ self.advanced_layout.addWidget(self.auto_start_check_box)
+ self.left_layout.addWidget(self.advanced_group_box)
+ self.left_layout.addStretch()
+ self.right_layout.addStretch()
def retranslateUi(self):
- self.advancedGroupBox.setTitle(UiStrings().Advanced)
- self.overridePlayerCheckBox.setText(translate('MediaPlugin.MediaTab', 'Allow media player to be overridden'))
- self.autoStartCheckBox.setText(translate('MediaPlugin.MediaTab', 'Start Live items automatically'))
+ self.advanced_group_box.setTitle(UiStrings().Advanced)
+ self.override_player_check_box.setText(translate('MediaPlugin.MediaTab', 'Allow media player to be overridden'))
+ self.auto_start_check_box.setText(translate('MediaPlugin.MediaTab', 'Start Live items automatically'))
def load(self):
- self.overridePlayerCheckBox.setChecked(Settings().value(self.settingsSection + u'/override player'))
- self.autoStartCheckBox.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'
- if Settings().value(setting_key) != self.overridePlayerCheckBox.checkState():
- Settings().setValue(setting_key, self.overridePlayerCheckBox.checkState())
+ 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')
self.settings_form.register_post_process(u'mediaitem_media_rebuild')
self.settings_form.register_post_process(u'mediaitem_suffixes')
setting_key = self.settingsSection + u'/media auto start'
- if Settings().value(setting_key) != self.autoStartCheckBox.checkState():
- Settings().setValue(setting_key, self.autoStartCheckBox.checkState())
+ if Settings().value(setting_key) != self.auto_start_check_box.checkState():
+ Settings().setValue(setting_key, self.auto_start_check_box.checkState())
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py 2013-03-07 13:14:31 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py 2013-03-16 20:56:21 +0000
@@ -151,7 +151,7 @@
titles = [os.path.split(file)[1] for file in currlist]
self.application.set_busy_cursor()
if not initialLoad:
- self.main_window.displayProgressBar(len(files))
+ self.main_window.display_progress_bar(len(files))
# Sort the presentations by its filename considering language specific characters.
files.sort(cmp=locale_compare,
key=lambda filename: os.path.split(unicode(filename))[1])
@@ -205,7 +205,7 @@
item_name.setToolTip(file)
self.listView.addItem(item_name)
if not initialLoad:
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_normal_cursor()
def onDeleteClick(self):
@@ -217,7 +217,7 @@
row_list = [item.row() for item in items]
row_list.sort(reverse=True)
self.application.set_busy_cursor()
- self.main_window.displayProgressBar(len(row_list))
+ self.main_window.display_progress_bar(len(row_list))
for item in items:
filepath = unicode(item.data(QtCore.Qt.UserRole))
for cidx in self.controllers:
@@ -225,7 +225,7 @@
doc.presentation_deleted()
doc.close_presentation()
self.main_window.increment_progress_bar()
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_busy_cursor()
for row in row_list:
self.listView.takeItem(row)
=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py 2013-03-10 20:19:42 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py 2013-03-16 20:56:21 +0000
@@ -31,6 +31,7 @@
from openlp.core.lib import Settings, SettingsTab, UiStrings, translate
+
class PresentationTab(SettingsTab):
"""
PresentationsTab is the Presentations settings tab in the settings dialog.
@@ -50,43 +51,43 @@
"""
self.setObjectName(u'PresentationTab')
SettingsTab.setupUi(self)
- self.ControllersGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.ControllersGroupBox.setObjectName(u'ControllersGroupBox')
- self.ControllersLayout = QtGui.QVBoxLayout(self.ControllersGroupBox)
- self.ControllersLayout.setObjectName(u'ControllersLayout')
- self.PresenterCheckboxes = {}
+ self.controllers_group_box = QtGui.QGroupBox(self.left_column)
+ self.controllers_group_box.setObjectName(u'controllers_group_box')
+ self.controllers_layout = QtGui.QVBoxLayout(self.controllers_group_box)
+ self.controllers_layout.setObjectName(u'ccontrollers_layout')
+ self.presenter_check_boxes = {}
for key in self.controllers:
controller = self.controllers[key]
- checkbox = QtGui.QCheckBox(self.ControllersGroupBox)
+ checkbox = QtGui.QCheckBox(self.controllers_group_box)
checkbox.setObjectName(controller.name + u'CheckBox')
- self.PresenterCheckboxes[controller.name] = checkbox
- self.ControllersLayout.addWidget(checkbox)
- self.leftLayout.addWidget(self.ControllersGroupBox)
- self.AdvancedGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.AdvancedGroupBox.setObjectName(u'AdvancedGroupBox')
- self.AdvancedLayout = QtGui.QVBoxLayout(self.AdvancedGroupBox)
- self.AdvancedLayout.setObjectName(u'AdvancedLayout')
- self.OverrideAppCheckBox = QtGui.QCheckBox(self.AdvancedGroupBox)
- self.OverrideAppCheckBox.setObjectName(u'OverrideAppCheckBox')
- self.AdvancedLayout.addWidget(self.OverrideAppCheckBox)
- self.leftLayout.addWidget(self.AdvancedGroupBox)
- self.leftLayout.addStretch()
- self.rightLayout.addStretch()
+ 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.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')
+ self.override_app_check_box = QtGui.QCheckBox(self.advanced_group_box)
+ self.override_app_check_box.setObjectName(u'override_app_check_box')
+ self.advanced_layout.addWidget(self.override_app_check_box)
+ self.left_layout.addWidget(self.advanced_group_box)
+ self.left_layout.addStretch()
+ self.right_layout.addStretch()
def retranslateUi(self):
"""
Make any translation changes
"""
- self.ControllersGroupBox.setTitle(translate('PresentationPlugin.PresentationTab', 'Available Controllers'))
+ self.controllers_group_box.setTitle(translate('PresentationPlugin.PresentationTab', 'Available Controllers'))
for key in self.controllers:
controller = self.controllers[key]
- checkbox = self.PresenterCheckboxes[controller.name]
- self.setControllerText(checkbox, controller)
- self.AdvancedGroupBox.setTitle(UiStrings().Advanced)
- self.OverrideAppCheckBox.setText(
+ checkbox = self.presenter_check_boxes[controller.name]
+ self.set_controller_text(checkbox, controller)
+ self.advanced_group_box.setTitle(UiStrings().Advanced)
+ self.override_app_check_box.setText(
translate('PresentationPlugin.PresentationTab', 'Allow presentation application to be overridden'))
- def setControllerText(self, checkbox, controller):
+ def set_controller_text(self, checkbox, controller):
if checkbox.isEnabled():
checkbox.setText(controller.name)
else:
@@ -99,15 +100,14 @@
"""
for key in self.controllers:
controller = self.controllers[key]
- checkbox = self.PresenterCheckboxes[controller.name]
- checkbox.setChecked(Settings().value(self.settingsSection + u'/' + controller.name))
- self.OverrideAppCheckBox.setChecked(Settings().value(self.settingsSection + u'/override app'))
+ checkbox = self.presenter_check_boxes[controller.name]
+ checkbox.setChecked(Settings().value(self.settings_section + u'/' + controller.name))
+ self.override_app_check_box.setChecked(Settings().value(self.settings_section + u'/override app'))
def save(self):
"""
- Save the settings. If the tab hasn't been made visible to the user
- then there is nothing to do, so exit. This removes the need to
- start presentation applications unnecessarily.
+ Save the settings. If the tab hasn't been made visible to the user then there is nothing to do,
+ so exit. This removes the need to start presentation applications unnecessarily.
"""
if not self.activated:
return
@@ -115,8 +115,8 @@
for key in self.controllers:
controller = self.controllers[key]
if controller.is_available():
- checkbox = self.PresenterCheckboxes[controller.name]
- setting_key = self.settingsSection + u'/' + controller.name
+ checkbox = self.presenter_check_boxes[controller.name]
+ setting_key = self.settings_section + u'/' + controller.name
if Settings().value(setting_key) != checkbox.checkState():
changed = True
Settings().setValue(setting_key, checkbox.checkState())
@@ -124,22 +124,22 @@
controller.start_process()
else:
controller.kill()
- setting_key = self.settingsSection + u'/override app'
- if Settings().value(setting_key) != self.OverrideAppCheckBox.checkState():
- Settings().setValue(setting_key, self.OverrideAppCheckBox.checkState())
+ setting_key = self.settings_section + u'/override app'
+ if Settings().value(setting_key) != self.override_app_check_box.checkState():
+ Settings().setValue(setting_key, self.override_app_check_box.checkState())
changed = True
if changed:
self.settings_form.register_post_process(u'mediaitem_suffix_reset')
self.settings_form.register_post_process(u'mediaitem_presentation_rebuild')
self.settings_form.register_post_process(u'mediaitem_suffixes')
- def tabVisible(self):
+ def tab_visible(self):
"""
Tab has just been made visible to the user
"""
self.activated = True
for key in self.controllers:
controller = self.controllers[key]
- checkbox = self.PresenterCheckboxes[controller.name]
+ checkbox = self.presenter_check_boxes[controller.name]
checkbox.setEnabled(controller.is_available())
self.setControllerText(checkbox, controller)
=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py 2013-02-19 21:23:56 +0000
+++ openlp/plugins/presentations/presentationplugin.py 2013-03-16 20:56:21 +0000
@@ -110,7 +110,7 @@
Create the Media Manager List
"""
self.mediaItem = PresentationMediaItem(
- self.main_window.mediaDockManager.media_dock, self, self.icon, self.controllers)
+ self.main_window.media_dock_manager.media_dock, self, self.icon, self.controllers)
def registerControllers(self, controller):
"""
@@ -132,13 +132,12 @@
if filename.endswith(u'controller.py') and not filename == 'presentationcontroller.py':
path = os.path.join(controller_dir, filename)
if os.path.isfile(path):
- modulename = u'openlp.plugins.presentations.lib.' + os.path.splitext(filename)[0]
- log.debug(u'Importing controller %s', modulename)
+ module_name = u'openlp.plugins.presentations.lib.' + os.path.splitext(filename)[0]
+ log.debug(u'Importing controller %s', module_name)
try:
- __import__(modulename, globals(), locals(), [])
+ __import__(module_name, globals(), locals(), [])
except ImportError:
- log.warn(u'Failed to import %s on path %s',
- modulename, path)
+ log.warn(u'Failed to import %s on path %s', module_name, path)
controller_classes = PresentationController.__subclasses__()
for controller_class in controller_classes:
controller = controller_class(self)
=== modified file 'openlp/plugins/remotes/lib/remotetab.py'
--- openlp/plugins/remotes/lib/remotetab.py 2013-03-06 17:46:19 +0000
+++ openlp/plugins/remotes/lib/remotetab.py 2013-03-16 20:56:21 +0000
@@ -45,7 +45,7 @@
def setupUi(self):
self.setObjectName(u'RemoteTab')
SettingsTab.setupUi(self)
- self.server_settings_group_box = QtGui.QGroupBox(self.leftColumn)
+ self.server_settings_group_box = QtGui.QGroupBox(self.left_column)
self.server_settings_group_box.setObjectName(u'server_settings_group_box')
self.server_settings_layout = QtGui.QFormLayout(self.server_settings_group_box)
self.server_settings_layout.setObjectName(u'server_settings_layout')
@@ -78,10 +78,10 @@
self.stage_url.setObjectName(u'stage_url')
self.stage_url.setOpenExternalLinks(True)
self.server_settings_layout.addRow(self.stage_url_label, self.stage_url)
- self.leftLayout.addWidget(self.server_settings_group_box)
- self.android_app_group_box = QtGui.QGroupBox(self.rightColumn)
+ self.left_layout.addWidget(self.server_settings_group_box)
+ self.android_app_group_box = QtGui.QGroupBox(self.right_column)
self.android_app_group_box.setObjectName(u'android_app_group_box')
- self.rightLayout.addWidget(self.android_app_group_box)
+ self.right_layout.addWidget(self.android_app_group_box)
self.qr_layout = QtGui.QVBoxLayout(self.android_app_group_box)
self.qr_layout.setObjectName(u'qr_layout')
self.qr_code_label = QtGui.QLabel(self.android_app_group_box)
@@ -94,8 +94,8 @@
self.qr_description_label.setOpenExternalLinks(True)
self.qr_description_label.setWordWrap(True)
self.qr_layout.addWidget(self.qr_description_label)
- self.leftLayout.addStretch()
- self.rightLayout.addStretch()
+ self.left_layout.addStretch()
+ self.right_layout.addStretch()
self.twelve_hour_check_box.stateChanged.connect(self.onTwelveHourCheckBoxChanged)
self.address_edit.textChanged.connect(self.set_urls)
self.port_spin_box.valueChanged.connect(self.set_urls)
@@ -135,20 +135,20 @@
self.stage_url.setText(u'<a href="%s">%s</a>' % (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')
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2013-03-08 08:14:39 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2013-03-16 20:56:21 +0000
@@ -84,7 +84,7 @@
self.verse_delete_button.clicked.connect(self.on_verse_delete_button_clicked)
self.verse_list_widget.itemClicked.connect(self.on_verse_list_view_clicked)
self.verse_order_edit.textChanged.connect(self.on_verse_order_text_changed)
- self.theme_add_button.clicked.connect(self.theme_manager.onAddTheme)
+ self.theme_add_button.clicked.connect(self.theme_manager.on_add_theme)
self.maintenance_button.clicked.connect(self.on_maintenance_button_clicked)
self.from_file_button.clicked.connect(self.on_audio_add_from_file_button_clicked)
self.from_media_button.clicked.connect(self.on_audio_add_from_media_button_clicked)
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2013-03-08 08:14:39 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2013-03-16 20:56:21 +0000
@@ -366,7 +366,7 @@
QtGui.QMessageBox.Yes) == QtGui.QMessageBox.No:
return
self.application.set_busy_cursor()
- self.main_window.displayProgressBar(len(items))
+ self.main_window.display_progress_bar(len(items))
for item in items:
item_id = item.data(QtCore.Qt.UserRole)
media_files = self.plugin.manager.get_all_objects(MediaFile, MediaFile.song_id == item_id)
@@ -383,7 +383,7 @@
log.exception(u'Could not remove directory: %s', save_path)
self.plugin.manager.delete_object(Song, item_id)
self.main_window.increment_progress_bar()
- self.main_window.finishedProgressBar()
+ self.main_window.finished_progress_bar()
self.application.set_normal_cursor()
self.onSearchTextButtonClicked()
=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py 2013-03-07 11:01:06 +0000
+++ openlp/plugins/songs/lib/songstab.py 2013-03-16 20:56:21 +0000
@@ -42,67 +42,67 @@
"""
self.setObjectName(u'SongsTab')
SettingsTab.setupUi(self)
- self.modeGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.modeGroupBox.setObjectName(u'modeGroupBox')
- self.modeLayout = QtGui.QVBoxLayout(self.modeGroupBox)
- self.modeLayout.setObjectName(u'modeLayout')
- self.searchAsTypeCheckBox = QtGui.QCheckBox(self.modeGroupBox)
- self.searchAsTypeCheckBox.setObjectName(u'SearchAsTypeCheckBox')
- self.modeLayout.addWidget(self.searchAsTypeCheckBox)
- self.toolBarActiveCheckBox = QtGui.QCheckBox(self.modeGroupBox)
- self.toolBarActiveCheckBox.setObjectName(u'toolBarActiveCheckBox')
- self.modeLayout.addWidget(self.toolBarActiveCheckBox)
- self.updateOnEditCheckBox = QtGui.QCheckBox(self.modeGroupBox)
- self.updateOnEditCheckBox.setObjectName(u'updateOnEditCheckBox')
- self.modeLayout.addWidget(self.updateOnEditCheckBox)
- self.addFromServiceCheckBox = QtGui.QCheckBox(self.modeGroupBox)
- self.addFromServiceCheckBox.setObjectName(u'addFromServiceCheckBox')
- self.modeLayout.addWidget(self.addFromServiceCheckBox)
- self.leftLayout.addWidget(self.modeGroupBox)
- self.leftLayout.addStretch()
- self.rightLayout.addStretch()
- self.searchAsTypeCheckBox.stateChanged.connect(self.onSearchAsTypeCheckBoxChanged)
- self.toolBarActiveCheckBox.stateChanged.connect(self.onToolBarActiveCheckBoxChanged)
- self.updateOnEditCheckBox.stateChanged.connect(self.onUpdateOnEditCheckBoxChanged)
- self.addFromServiceCheckBox.stateChanged.connect(self.onAddFromServiceCheckBoxChanged)
+ self.mode_group_box = QtGui.QGroupBox(self.left_column)
+ self.mode_group_box.setObjectName(u'mode_group_box')
+ self.mode_layout = QtGui.QVBoxLayout(self.mode_group_box)
+ self.mode_layout.setObjectName(u'mode_layout')
+ self.search_as_type_check_box = QtGui.QCheckBox(self.mode_group_box)
+ self.search_as_type_check_box.setObjectName(u'SearchAsType_check_box')
+ self.mode_layout.addWidget(self.search_as_type_check_box)
+ self.tool_bar_active_check_box = QtGui.QCheckBox(self.mode_group_box)
+ self.tool_bar_active_check_box.setObjectName(u'tool_bar_active_check_box')
+ self.mode_layout.addWidget(self.tool_bar_active_check_box)
+ self.update_on_edit_check_box = QtGui.QCheckBox(self.mode_group_box)
+ self.update_on_edit_check_box.setObjectName(u'update_on_edit_check_box')
+ self.mode_layout.addWidget(self.update_on_edit_check_box)
+ self.add_from_service_check_box = QtGui.QCheckBox(self.mode_group_box)
+ self.add_from_service_check_box.setObjectName(u'add_from_service_check_box')
+ self.mode_layout.addWidget(self.add_from_service_check_box)
+ self.left_layout.addWidget(self.mode_group_box)
+ self.left_layout.addStretch()
+ self.right_layout.addStretch()
+ self.search_as_type_check_box.stateChanged.connect(self.on_search_as_type_check_box_changed)
+ self.tool_bar_active_check_box.stateChanged.connect(self.on_tool_bar_active_check_box_changed)
+ self.update_on_edit_check_box.stateChanged.connect(self.on_update_on_edit_check_box_changed)
+ self.add_from_service_check_box.stateChanged.connect(self.on_add_from_service_check_box_changed)
def retranslateUi(self):
- self.modeGroupBox.setTitle(translate('SongsPlugin.SongsTab', 'Songs Mode'))
- self.searchAsTypeCheckBox.setText(translate('SongsPlugin.SongsTab', 'Enable search as you type'))
- self.toolBarActiveCheckBox.setText(translate('SongsPlugin.SongsTab',
+ self.mode_group_box.setTitle(translate('SongsPlugin.SongsTab', 'Songs Mode'))
+ self.search_as_type_check_box.setText(translate('SongsPlugin.SongsTab', 'Enable search as you type'))
+ self.tool_bar_active_check_box.setText(translate('SongsPlugin.SongsTab',
'Display verses on live tool bar'))
- self.updateOnEditCheckBox.setText(translate('SongsPlugin.SongsTab', 'Update service from song edit'))
- self.addFromServiceCheckBox.setText(translate('SongsPlugin.SongsTab',
+ self.update_on_edit_check_box.setText(translate('SongsPlugin.SongsTab', 'Update service from song edit'))
+ self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab',
'Import missing songs from service files'))
- def onSearchAsTypeCheckBoxChanged(self, check_state):
+ def on_search_as_type_check_box_changed(self, check_state):
self.song_search = (check_state == QtCore.Qt.Checked)
- def onToolBarActiveCheckBoxChanged(self, check_state):
+ def on_tool_bar_active_check_box_changed(self, check_state):
self.tool_bar = (check_state == QtCore.Qt.Checked)
- def onUpdateOnEditCheckBoxChanged(self, check_state):
+ def on_update_on_edit_check_box_changed(self, check_state):
self.update_edit = (check_state == QtCore.Qt.Checked)
- def onAddFromServiceCheckBoxChanged(self, check_state):
+ def on_add_from_service_check_box_changed(self, check_state):
self.update_load = (check_state == QtCore.Qt.Checked)
def load(self):
settings = Settings()
- settings.beginGroup(self.settingsSection)
+ settings.beginGroup(self.settings_section)
self.song_search = settings.value(u'search as type')
self.tool_bar = settings.value(u'display songbar')
self.update_edit = settings.value(u'update service on edit')
self.update_load = settings.value(u'add song from service')
- self.searchAsTypeCheckBox.setChecked(self.song_search)
- self.toolBarActiveCheckBox.setChecked(self.tool_bar)
- self.updateOnEditCheckBox.setChecked(self.update_edit)
- self.addFromServiceCheckBox.setChecked(self.update_load)
+ self.search_as_type_check_box.setChecked(self.song_search)
+ self.tool_bar_active_check_box.setChecked(self.tool_bar)
+ self.update_on_edit_check_box.setChecked(self.update_edit)
+ self.add_from_service_check_box.setChecked(self.update_load)
settings.endGroup()
def save(self):
settings = Settings()
- settings.beginGroup(self.settingsSection)
+ settings.beginGroup(self.settings_section)
settings.setValue(u'search as type', self.song_search)
settings.setValue(u'display songbar', self.tool_bar)
settings.setValue(u'update service on edit', self.update_edit)
=== modified file 'openlp/plugins/songusage/songusageplugin.py'
--- openlp/plugins/songusage/songusageplugin.py 2013-03-01 17:36:43 +0000
+++ openlp/plugins/songusage/songusageplugin.py 2013-03-16 20:56:21 +0000
@@ -106,12 +106,12 @@
self.song_usage_menu.addSeparator()
self.song_usage_menu.addAction(self.song_usage_report)
self.song_usage_menu.addAction(self.song_usage_delete)
- self.song_usage_active_button = QtGui.QToolButton(self.main_window.statusBar)
+ self.song_usage_active_button = QtGui.QToolButton(self.main_window.status_bar)
self.song_usage_active_button.setCheckable(True)
self.song_usage_active_button.setAutoRaise(True)
self.song_usage_active_button.setStatusTip(translate('SongUsagePlugin', 'Toggle the tracking of song usage.'))
self.song_usage_active_button.setObjectName(u'song_usage_active_button')
- self.main_window.statusBar.insertPermanentWidget(1, self.song_usage_active_button)
+ self.main_window.status_bar.insertPermanentWidget(1, self.song_usage_active_button)
self.song_usage_active_button.hide()
# Signals and slots
QtCore.QObject.connect(self.song_usage_status, QtCore.SIGNAL(u'visibilityChanged(bool)'),
Follow ups