Python
@@ -26,7 +26,6 @@
-
@@ -48,7 +47,6 @@
-
@@ -122,6 +120,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -140,7 +149,8 @@
-
+
+
diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py
index 82bd7bea9..a149b42d8 100644
--- a/openlp/core/__init__.py
+++ b/openlp/core/__init__.py
@@ -17,9 +17,13 @@ You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
"""
+from PyQt4 import QtCore, QtGui
from render import Renderer
from settingsmanager import SettingsManager
from pluginmanager import PluginManager
-__all__ = ['Renderer', 'SettingsManager', 'PluginManager']
+__all__ = ['Renderer', 'SettingsManager', 'PluginManager', 'translate']
+
+def translate(context, text):
+ return QtGui.QApplication.translate(context, text, None, QtGui.QApplication.UnicodeUTF8)
diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py
index 4d43b3856..563b6d387 100644
--- a/openlp/core/lib/__init__.py
+++ b/openlp/core/lib/__init__.py
@@ -20,7 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
from pluginutils import PluginUtils
from pluginconfig import PluginConfig
from plugin import Plugin
-from settingstabitem import SettingsTabItem
+from settingstab import SettingsTab
from mediamanageritem import MediaManagerItem
from event import Event
from xmlrootclass import XmlRootClass
diff --git a/openlp/core/lib/settingstabitem.py b/openlp/core/lib/settingstab.py
similarity index 64%
rename from openlp/core/lib/settingstabitem.py
rename to openlp/core/lib/settingstab.py
index 5c56eea76..96323fb56 100644
--- a/openlp/core/lib/settingstabitem.py
+++ b/openlp/core/lib/settingstab.py
@@ -21,26 +21,27 @@ Place, Suite 330, Boston, MA 02111-1307 USA
from PyQt4 import QtCore, QtGui
from openlp.core.resources import *
-class SettingsTabItem(QtGui.QWidget):
+class SettingsTab(QtGui.QWidget):
"""
- SettingsTabItem 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):
+ def __init__(self, title=None):
"""
Constructor to create the Steetings tab item.
"""
QtGui.QWidget.__init__(self)
- self.TabLayout = QtGui.QVBoxLayout(self)
- self.TabLayout.setSpacing(0)
- self.TabLayout.setMargin(0)
- self.tabText = None
+ self.tabTitle = title
+ self.setupUi()
+ self.retranslateUi()
- def setTabText(self, text):
- self.tabText = text
-
- def add_items(self, items):
- if type(items).__name__ == "QWidget":
- self.TabLayout.addWidget(items)
- else:
- for item in items:
- self.TabLayout.addWidget(item)
+ def setTitle(self, title):
+ self.tabTitle = title
+
+ def title(self):
+ return self.tabTitle
+
+ def setupUi(self):
+ pass
+
+ def retranslateUi(self):
+ pass
diff --git a/openlp/core/pluginmanager.py b/openlp/core/pluginmanager.py
index c0439d799..85a33e39f 100644
--- a/openlp/core/pluginmanager.py
+++ b/openlp/core/pluginmanager.py
@@ -47,7 +47,7 @@ class PluginManager(object):
self.plugins = []
# this has to happen after the UI is sroted self.find_plugins(dir)
log.info("Plugin manager done init")
-
+
def find_plugins(self, dir, preview_controller, live_controller): # xxx shouldn't dir come from self.basepath
"""
Scan the directory dir for objects inheriting from openlp.plugin
@@ -56,7 +56,7 @@ class PluginManager(object):
self.live_controller=live_controller
startdepth=len(os.path.abspath(dir).split(os.sep))
log.debug("find plugins %s at depth %d" %( str(dir), startdepth))
-
+
for root, dirs, files in os.walk(dir):
for name in files:
if name.endswith(".py") and not name.startswith("__"):
@@ -82,7 +82,8 @@ class PluginManager(object):
try:
plugin = p(self.preview_controller, self.live_controller)
log.debug('loaded plugin' + str(p) + ' with controllers'+str(self.preview_controller)+str(self.live_controller))
- except TypeError: # TODO: need to get rid of this once all plugins are up to date
+ except TypeError:
+ # TODO: need to get rid of this once all plugins are up to date
plugin = p()
log.debug('loaded plugin' + str(p) + ' with no controllers')
log.debug("Plugin="+str(p))
@@ -104,23 +105,22 @@ class PluginManager(object):
if media_manager_item is not None:
log.debug('Inserting media manager item from %s' % plugin.name)
mediatoolbox.addItem(media_manager_item, plugin.icon, media_manager_item.title)
+ # TODO: These shouldn't be called here...
plugin.initialise()
plugin.load_settings()
-
- def hook_settings_tabs(self, mediatoolbox=None):
+
+ def hook_settings_tabs(self, settingsform=None):
"""
Loop through all the plugins. If a plugin has a valid settings tab item,
add it to the settings tab.
"""
- want_settings = []
for plugin in self.plugins:
- settings_tab_item = plugin.has_settings_tab_item()
- #print plugin , settings_tab_item
- if settings_tab_item:
+ settings_tab = plugin.get_settings_tab()
+ if settings_tab is not None:
log.debug('Inserting settings tab item from %s' % plugin.name)
- want_settings.append(plugin)
- #mediatoolbox.addItem(media_manager_item, plugin.icon, media_manager_item.title)
- return want_settings
+ settingsform.addTab(settings_tab)
+ else:
+ log.debug('No settings in %s' % plugin.name)
def hook_import_menu(self, import_menu):
"""
@@ -138,5 +138,5 @@ class PluginManager(object):
for plugin in self.plugins:
plugin.add_export_menu_item(export_menu)
- def hook_handle_event(self, event):
+ def hook_handle_event(self, event):
pass
diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py
index eede4d081..279bc1861 100644
--- a/openlp/core/ui/__init__.py
+++ b/openlp/core/ui/__init__.py
@@ -20,12 +20,15 @@ Place, Suite 330, Boston, MA 02111-1307 USA
from slidecontroller import SlideController
from splashscreen import SplashScreen
+from alertstab import AlertsTab
+from generaltab import GeneralTab
+from themestab import ThemesTab
from about import AboutForm
-from alertform import AlertForm
+#from alertform import AlertForm
from generalform import GeneralForm
from settingsform import SettingsForm
from servicemanager import ServiceManager
from mainwindow import MainWindow
-__all__ = ['SplashScreen', 'AboutForm', 'AlertForm', 'SettingsForm',
+__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm',
'MainWindow', 'SlideController', 'ServiceManager,GeneralForm']
diff --git a/openlp/core/ui/alertstab.py b/openlp/core/ui/alertstab.py
new file mode 100644
index 000000000..cbd5ea794
--- /dev/null
+++ b/openlp/core/ui/alertstab.py
@@ -0,0 +1,140 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+"""
+OpenLP - Open Source Lyrics Projection
+Copyright (c) 2008 Raoul Snyman
+Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+"""
+
+from PyQt4 import QtCore, QtGui
+
+from openlp.core import translate
+from openlp.core.lib import SettingsTab
+from openlp.core.resources import *
+
+class AlertsTab(SettingsTab):
+ """
+ AlertsTab is the alerts settings tab in the settings dialog.
+ """
+ def __init__(self):
+ SettingsTab.__init__(self, u'Alerts')
+
+ def setupUi(self):
+ self.setObjectName(u'AlertsTab')
+ self.AlertsLayout = QtGui.QHBoxLayout(self)
+ self.AlertsLayout.setSpacing(8)
+ self.AlertsLayout.setMargin(8)
+ self.AlertsLayout.setObjectName(u'AlertsLayout')
+ self.AlertLeftColumn = QtGui.QWidget(self)
+ self.AlertLeftColumn.setObjectName(u'AlertLeftColumn')
+ self.SlideLeftLayout = QtGui.QVBoxLayout(self.AlertLeftColumn)
+ self.SlideLeftLayout.setSpacing(8)
+ self.SlideLeftLayout.setMargin(0)
+ self.SlideLeftLayout.setObjectName(u'SlideLeftLayout')
+ self.FontGroupBox = QtGui.QGroupBox(self.AlertLeftColumn)
+ self.FontGroupBox.setObjectName(u'FontGroupBox')
+ self.FontLayout = QtGui.QVBoxLayout(self.FontGroupBox)
+ self.FontLayout.setSpacing(8)
+ self.FontLayout.setMargin(8)
+ self.FontLayout.setObjectName(u'FontLayout')
+ self.FontLabel = QtGui.QLabel(self.FontGroupBox)
+ self.FontLabel.setObjectName(u'FontLabel')
+ self.FontLayout.addWidget(self.FontLabel)
+ self.FontComboBox = QtGui.QFontComboBox(self.FontGroupBox)
+ self.FontComboBox.setObjectName(u'FontComboBox')
+ self.FontLayout.addWidget(self.FontComboBox)
+ self.ColorWidget = QtGui.QWidget(self.FontGroupBox)
+ self.ColorWidget.setObjectName(u'ColorWidget')
+ self.ColorLayout = QtGui.QHBoxLayout(self.ColorWidget)
+ self.ColorLayout.setSpacing(8)
+ self.ColorLayout.setMargin(0)
+ self.ColorLayout.setObjectName(u'ColorLayout')
+ self.FontColorLabel = QtGui.QLabel(self.ColorWidget)
+ self.FontColorLabel.setObjectName(u'FontColorLabel')
+ self.ColorLayout.addWidget(self.FontColorLabel)
+ self.FontColorPanel = QtGui.QGraphicsView(self.ColorWidget)
+ self.FontColorPanel.setMinimumSize(QtCore.QSize(24, 24))
+ self.FontColorPanel.setMaximumSize(QtCore.QSize(24, 24))
+ self.FontColorPanel.setObjectName(u'FontColorPanel')
+ self.ColorLayout.addWidget(self.FontColorPanel)
+ self.ColorSpacerItem = QtGui.QSpacerItem(40, 20,
+ QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.ColorLayout.addItem(self.ColorSpacerItem)
+ self.BackgroundColorLabel = QtGui.QLabel(self.ColorWidget)
+ self.BackgroundColorLabel.setObjectName(u'BackgroundColorLabel')
+ self.ColorLayout.addWidget(self.BackgroundColorLabel)
+ self.BackgroundColorPanel = QtGui.QGraphicsView(self.ColorWidget)
+ self.BackgroundColorPanel.setMinimumSize(QtCore.QSize(24, 24))
+ self.BackgroundColorPanel.setMaximumSize(QtCore.QSize(24, 24))
+ self.BackgroundColorPanel.setObjectName(u'BackgroundColorPanel')
+ self.ColorLayout.addWidget(self.BackgroundColorPanel)
+ self.FontLayout.addWidget(self.ColorWidget)
+ self.LengthWidget = QtGui.QWidget(self.FontGroupBox)
+ self.LengthWidget.setObjectName(u'LengthWidget')
+ self.LengthLayout = QtGui.QHBoxLayout(self.LengthWidget)
+ self.LengthLayout.setSpacing(8)
+ self.LengthLayout.setMargin(0)
+ self.LengthLayout.setObjectName(u'LengthLayout')
+ self.LengthLabel = QtGui.QLabel(self.LengthWidget)
+ self.LengthLabel.setObjectName(u'LengthLabel')
+ self.LengthLayout.addWidget(self.LengthLabel)
+ self.LengthSpinBox = QtGui.QSpinBox(self.LengthWidget)
+ self.LengthSpinBox.setMaximum(180)
+ self.LengthSpinBox.setProperty(u'value', QtCore.QVariant(5))
+ self.LengthSpinBox.setObjectName(u'LengthSpinBox')
+ self.LengthLayout.addWidget(self.LengthSpinBox)
+ self.LengthSpacer = QtGui.QSpacerItem(147, 20,
+ QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.LengthLayout.addItem(self.LengthSpacer)
+ self.FontLayout.addWidget(self.LengthWidget)
+ self.SlideLeftLayout.addWidget(self.FontGroupBox)
+ self.SlideLeftSpacer = QtGui.QSpacerItem(20, 94,
+ QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.SlideLeftLayout.addItem(self.SlideLeftSpacer)
+ self.AlertsLayout.addWidget(self.AlertLeftColumn)
+ self.SlideRightColumn = QtGui.QWidget(self)
+ self.SlideRightColumn.setObjectName(u'SlideRightColumn')
+ self.SlideRightLayout = QtGui.QVBoxLayout(self.SlideRightColumn)
+ self.SlideRightLayout.setSpacing(8)
+ self.SlideRightLayout.setMargin(0)
+ self.SlideRightLayout.setObjectName(u'SlideRightLayout')
+ self.PreviewGroupBox = QtGui.QGroupBox(self.SlideRightColumn)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.PreviewGroupBox.sizePolicy().hasHeightForWidth())
+ self.PreviewGroupBox.setSizePolicy(sizePolicy)
+ self.PreviewGroupBox.setObjectName(u'PreviewGroupBox')
+ self.PreviewLayout = QtGui.QVBoxLayout(self.PreviewGroupBox)
+ self.PreviewLayout.setSpacing(8)
+ self.PreviewLayout.setMargin(8)
+ self.PreviewLayout.setObjectName(u'PreviewLayout')
+ self.FontPreview = QtGui.QGraphicsView(self.PreviewGroupBox)
+ self.FontPreview.setMaximumSize(QtCore.QSize(16777215, 64))
+ self.FontPreview.setObjectName(u'FontPreview')
+ self.PreviewLayout.addWidget(self.FontPreview)
+ self.SlideRightLayout.addWidget(self.PreviewGroupBox)
+ self.SlideRightSpacer = QtGui.QSpacerItem(20, 40,
+ QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.SlideRightLayout.addItem(self.SlideRightSpacer)
+
+ def retranslateUi(self):
+ self.FontGroupBox.setTitle(translate(u'AlertsTab', u'Font'))
+ self.FontLabel.setText(translate(u'AlertsTab', u'Font Name:'))
+ self.FontColorLabel.setText(translate(u'AlertsTab', u'Font Color:'))
+ self.BackgroundColorLabel.setText(translate(u'AlertsTab', u'Background Color:'))
+ self.LengthLabel.setText(translate(u'AlertsTab', u'Display length:'))
+ self.LengthSpinBox.setSuffix(translate(u'AlertsTab', u's'))
+ self.PreviewGroupBox.setTitle(translate(u'AlertsTab', u'Preview'))
diff --git a/openlp/core/ui/generalform.py b/openlp/core/ui/generalform.py
index a3505538a..14b6649bb 100644
--- a/openlp/core/ui/generalform.py
+++ b/openlp/core/ui/generalform.py
@@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
from PyQt4 import QtCore, QtGui
from openlp.core.resources import *
-from openlp.core.lib import SettingsTabItem
+from openlp.core.lib import SettingsTab
class GeneralForm(object):
"""
@@ -32,9 +32,9 @@ class GeneralForm(object):
def __init__(self):
pass
def get_settings_tab_item(self):
-
+
self.SettingsTabItem= SettingsTabItem()
-
+
self.DisplayTab = QtGui.QWidget()
self.DisplayTab.setObjectName("DisplayTab")
self.DisplayTabLayout = QtGui.QHBoxLayout(self.DisplayTab)
@@ -122,22 +122,22 @@ class GeneralForm(object):
self.MonitorComboBox.setItemText(1, QtGui.QApplication.translate("SettingsForm", "Monitor 2 on X11 Windowing System", None, QtGui.QApplication.UnicodeUTF8))
self.FontSizeGroupBox.setTitle(QtGui.QApplication.translate("SettingsForm", "Font Size", None, QtGui.QApplication.UnicodeUTF8))
self.AutoResizeRadioButton.setText(QtGui.QApplication.translate("SettingsForm", "Automatically resize font to fit text to slide", None, QtGui.QApplication.UnicodeUTF8))
- self.WrapLinesRadioButton.setText(QtGui.QApplication.translate("SettingsForm", "Wrap long lines to keep desired font", None, QtGui.QApplication.UnicodeUTF8))
+ self.WrapLinesRadioButton.setText(QtGui.QApplication.translate("SettingsForm", "Wrap long lines to keep desired font", None, QtGui.QApplication.UnicodeUTF8))
self.SongDisplayGroupBox.setTitle(QtGui.QApplication.translate("SettingsForm", "Song Display", None, QtGui.QApplication.UnicodeUTF8))
self.EnableCreditsCheckBox.setText(QtGui.QApplication.translate("SettingsForm", "Enable displaying of song credits", None, QtGui.QApplication.UnicodeUTF8))
self.BlankScreenGroupBox.setTitle(QtGui.QApplication.translate("SettingsForm", "Blank Screen", None, QtGui.QApplication.UnicodeUTF8))
self.WarningCheckBox.setText(QtGui.QApplication.translate("SettingsForm", "Show warning on startup", None, QtGui.QApplication.UnicodeUTF8))
self.AutoOpenGroupBox.setTitle(QtGui.QApplication.translate("SettingsForm", "Auto Open Last Service", None, QtGui.QApplication.UnicodeUTF8))
self.AutoOpenCheckBox.setText(QtGui.QApplication.translate("SettingsForm", "Automatically open the last service at startup", None, QtGui.QApplication.UnicodeUTF8))
-
+
self.SettingsTabItem.setTabText(QtGui.QApplication.translate("SettingsForm", "General", None, QtGui.QApplication.UnicodeUTF8))
self.SettingsTabItem.add_items(self.DisplayTab)
return self.SettingsTabItem
-
+
def load_settings(self):
pass
-
+
def save_settings(self):
pass
diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py
new file mode 100644
index 000000000..4e5f1c09d
--- /dev/null
+++ b/openlp/core/ui/generaltab.py
@@ -0,0 +1,131 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+"""
+OpenLP - Open Source Lyrics Projection
+Copyright (c) 2008 Raoul Snyman
+Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+"""
+
+from PyQt4 import QtCore, QtGui
+
+from openlp.core import translate
+from openlp.core.lib import SettingsTab
+from openlp.core.resources import *
+
+class GeneralTab(SettingsTab):
+ """
+ GeneralTab is the general settings tab in the settings dialog.
+ """
+ def __init__(self):
+ SettingsTab.__init__(self, translate(u'GeneralTab', u'General'))
+
+ def setupUi(self):
+ self.setObjectName(u'GeneralTab')
+ self.GeneralLayout = QtGui.QHBoxLayout(self)
+ self.GeneralLayout.setSpacing(8)
+ self.GeneralLayout.setMargin(8)
+ self.GeneralLayout.setObjectName(u'GeneralLayout')
+ self.GeneralLeftWidget = QtGui.QWidget(self)
+ self.GeneralLeftWidget.setObjectName(u'GeneralLeftWidget')
+ self.GeneralLeftLayout = QtGui.QVBoxLayout(self.GeneralLeftWidget)
+ self.GeneralLeftLayout.setObjectName(u'GeneralLeftLayout')
+ self.MonitorGroupBox = QtGui.QGroupBox(self.GeneralLeftWidget)
+ self.MonitorGroupBox.setObjectName(u'MonitorGroupBox')
+ self.MonitorLayout = QtGui.QVBoxLayout(self.MonitorGroupBox)
+ self.MonitorLayout.setSpacing(8)
+ self.MonitorLayout.setMargin(8)
+ self.MonitorLayout.setObjectName(u'MonitorLayout')
+ self.MonitorLabel = QtGui.QLabel(self.MonitorGroupBox)
+ self.MonitorLabel.setObjectName(u'MonitorLabel')
+ self.MonitorLayout.addWidget(self.MonitorLabel)
+ self.MonitorComboBox = QtGui.QComboBox(self.MonitorGroupBox)
+ self.MonitorComboBox.setObjectName(u'MonitorComboBox')
+ self.MonitorComboBox.addItem(QtCore.QString())
+ self.MonitorComboBox.addItem(QtCore.QString())
+ self.MonitorLayout.addWidget(self.MonitorComboBox)
+ self.GeneralLeftLayout.addWidget(self.MonitorGroupBox)
+ self.BlankScreenGroupBox = QtGui.QGroupBox(self.GeneralLeftWidget)
+ self.BlankScreenGroupBox.setObjectName(u'BlankScreenGroupBox')
+ self.BlankScreenLayout = QtGui.QVBoxLayout(self.BlankScreenGroupBox)
+ self.BlankScreenLayout.setSpacing(8)
+ self.BlankScreenLayout.setMargin(8)
+ self.BlankScreenLayout.setObjectName(u'BlankScreenLayout')
+ self.WarningCheckBox = QtGui.QCheckBox(self.BlankScreenGroupBox)
+ self.WarningCheckBox.setObjectName(u'WarningCheckBox')
+ self.BlankScreenLayout.addWidget(self.WarningCheckBox)
+ self.GeneralLeftLayout.addWidget(self.BlankScreenGroupBox)
+ self.AutoOpenGroupBox = QtGui.QGroupBox(self.GeneralLeftWidget)
+ self.AutoOpenGroupBox.setObjectName(u'AutoOpenGroupBox')
+ self.AutoOpenLayout = QtGui.QVBoxLayout(self.AutoOpenGroupBox)
+ self.AutoOpenLayout.setObjectName(u'AutoOpenLayout')
+ self.AutoOpenCheckBox = QtGui.QCheckBox(self.AutoOpenGroupBox)
+ self.AutoOpenCheckBox.setObjectName(u'AutoOpenCheckBox')
+ self.AutoOpenLayout.addWidget(self.AutoOpenCheckBox)
+ self.GeneralLeftLayout.addWidget(self.AutoOpenGroupBox)
+ self.GeneralLeftSpacer = QtGui.QSpacerItem(20, 40,
+ QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.GeneralLeftLayout.addItem(self.GeneralLeftSpacer)
+ self.GeneralLayout.addWidget(self.GeneralLeftWidget)
+ self.GeneralRightWidget = QtGui.QWidget(self)
+ self.GeneralRightWidget.setObjectName(u'GeneralRightWidget')
+ self.GeneralRightLayout = QtGui.QVBoxLayout(self.GeneralRightWidget)
+ self.GeneralRightLayout.setSpacing(8)
+ self.GeneralRightLayout.setMargin(0)
+ self.GeneralRightLayout.setObjectName(u'GeneralRightLayout')
+ self.CCLIGroupBox = QtGui.QGroupBox(self.GeneralRightWidget)
+ self.CCLIGroupBox.setObjectName(u'CCLIGroupBox')
+ self.CCLILayout = QtGui.QGridLayout(self.CCLIGroupBox)
+ self.CCLILayout.setMargin(8)
+ self.CCLILayout.setSpacing(8)
+ self.CCLILayout.setObjectName(u'CCLILayout')
+ self.NumberLabel = QtGui.QLabel(self.CCLIGroupBox)
+ self.NumberLabel.setObjectName(u'NumberLabel')
+ self.CCLILayout.addWidget(self.NumberLabel, 0, 0, 1, 1)
+ self.NumberEdit = QtGui.QLineEdit(self.CCLIGroupBox)
+ self.NumberEdit.setObjectName(u'NumberEdit')
+ self.CCLILayout.addWidget(self.NumberEdit, 0, 1, 1, 1)
+ self.UsernameLabel = QtGui.QLabel(self.CCLIGroupBox)
+ self.UsernameLabel.setObjectName(u'UsernameLabel')
+ self.CCLILayout.addWidget(self.UsernameLabel, 1, 0, 1, 1)
+ self.UsernameEdit = QtGui.QLineEdit(self.CCLIGroupBox)
+ self.UsernameEdit.setObjectName(u'UsernameEdit')
+ self.CCLILayout.addWidget(self.UsernameEdit, 1, 1, 1, 1)
+ self.PasswordLabel = QtGui.QLabel(self.CCLIGroupBox)
+ self.PasswordLabel.setObjectName(u'PasswordLabel')
+ self.CCLILayout.addWidget(self.PasswordLabel, 2, 0, 1, 1)
+ self.PasswordEdit = QtGui.QLineEdit(self.CCLIGroupBox)
+ self.PasswordEdit.setEchoMode(QtGui.QLineEdit.Password)
+ self.PasswordEdit.setObjectName(u'PasswordEdit')
+ self.CCLILayout.addWidget(self.PasswordEdit, 2, 1, 1, 1)
+ self.GeneralRightLayout.addWidget(self.CCLIGroupBox)
+ self.GeneralRightSpacer = QtGui.QSpacerItem(20, 40,
+ QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.GeneralRightLayout.addItem(self.GeneralRightSpacer)
+ self.GeneralLayout.addWidget(self.GeneralRightWidget)
+
+ def retranslateUi(self):
+ self.MonitorGroupBox.setTitle(translate(u'GeneralTab', u'Monitors'))
+ self.MonitorLabel.setText(translate(u'GeneralTab', u'Select monitor for output display:'))
+ self.MonitorComboBox.setItemText(0, translate(u'GeneralTab', u'Monitor 1 on X11 Windowing System'))
+ self.MonitorComboBox.setItemText(1, translate(u'GeneralTab', u'Monitor 2 on X11 Windowing System'))
+ self.BlankScreenGroupBox.setTitle(translate(u'GeneralTab', u'Blank Screen'))
+ self.WarningCheckBox.setText(translate(u'GeneralTab', u'Show warning on startup'))
+ self.AutoOpenGroupBox.setTitle(translate(u'GeneralTab', u'Auto Open Last Service'))
+ self.AutoOpenCheckBox.setText(translate(u'GeneralTab', u'Automatically open the last service at startup'))
+ self.CCLIGroupBox.setTitle(translate(u'GeneralTab', u'CCLI Details'))
+ self.NumberLabel.setText(translate(u'GeneralTab', u'CCLI Number:'))
+ self.UsernameLabel.setText(translate(u'GeneralTab', u'SongSelect Username:'))
+ self.PasswordLabel.setText(translate(u'GeneralTab', u'SongSelect Password:'))
+
diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py
index f4deeeae4..5c72d5fc9 100644
--- a/openlp/core/ui/mainwindow.py
+++ b/openlp/core/ui/mainwindow.py
@@ -25,9 +25,9 @@ from PyQt4 import QtCore, QtGui
from openlp.core.resources import *
-from openlp.core.ui import SlideController, ServiceManager
-from openlp.core.ui import AboutForm, AlertForm, SettingsForm, SlideController, GeneralForm
-from openlp.core.lib import Plugin, MediaManagerItem, SettingsTabItem
+from openlp.core.ui import AboutForm, SettingsForm, \
+ SlideController, ServiceManager, GeneralForm
+from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab
from openlp.core import PluginManager
import logging
@@ -39,35 +39,33 @@ class MainWindow(object):
def __init__(self):
self.main_window = QtGui.QMainWindow()
self.about_form = AboutForm()
- self.alert_form = AlertForm()
+ #self.alert_form = AlertForm()
self.settings_form = SettingsForm()
- self.general_form = GeneralForm()
+ #self.general_form = GeneralForm()
pluginpath = os.path.split(os.path.abspath(__file__))[0]
pluginpath = os.path.abspath(os.path.join(pluginpath, '..', '..','plugins'))
self.plugin_manager = PluginManager(pluginpath)
self.setupUi()
-
+
+ log.info('')
self.plugin_manager.find_plugins(pluginpath, self.PreviewController, self.LiveController)
- log.info("hook Settings")
- #Add Core Componets who provide Settings tabs
- self.settings_form.add_virtual_plugin(self.general_form)
- self.settings_form.add_virtual_plugin(self.alert_form)
- #Call hook method to see which plugins have setting tabs.
- self.settings_form.receive_plugins(self.plugin_manager.hook_settings_tabs())
- self.settings_form.generateUi()
-
# hook methods have to happen after find_plugins. Find plugins needs the controllers
- # hence the hooks have moved front setupUI() to here
- # Call the hook method to pull in import menus.
- log.info("hook menus")
- self.plugin_manager.hook_import_menu(self.FileImportMenu)
- #
- # Call the hook method to pull in export menus.
- self.plugin_manager.hook_import_menu(self.FileExportMenu)
- #
+ # hence the hooks have moved from setupUI() to here
+
+ # Find and insert media manager items
log.info("hook media")
self.plugin_manager.hook_media_manager(self.MediaToolBox)
- # End adding media manager items.
+
+ # Find and insert settings tabs
+ log.info("hook settings")
+ self.plugin_manager.hook_settings_tabs(self.settings_form)
+
+ # Call the hook method to pull in import menus.
+ log.info("hook menus")
+ self.plugin_manager.hook_import_menu(self.FileImportMenu)
+
+ # Call the hook method to pull in export menus.
+ self.plugin_manager.hook_import_menu(self.FileExportMenu)
def setupUi(self):
self.main_window.setObjectName("main_window")
@@ -133,7 +131,7 @@ class MainWindow(object):
self.MediaManagerDock.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/system/system_mediamanager.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
-
+
self.MediaManagerDock.setWindowIcon(icon)
self.MediaManagerDock.setFloating(False)
self.MediaManagerDock.setObjectName("MediaManagerDock")
@@ -155,7 +153,7 @@ class MainWindow(object):
self.MediaManagerLayout.addWidget(self.MediaToolBox)
self.MediaManagerDock.setWidget(self.MediaManagerContents)
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
-
+
self.ServiceManagerDock = QtGui.QDockWidget(self.main_window)
ServiceManagerIcon = QtGui.QIcon()
ServiceManagerIcon.addPixmap(QtGui.QPixmap(":/system/system_servicemanager.png"),
@@ -428,10 +426,10 @@ class MainWindow(object):
self.main_window.showMaximized()
def onHelpAboutItemClicked(self):
- self.about_form.show()
+ self.about_form.exec_()
def onToolsAlertItemClicked(self):
- self.alert_form.show()
+ self.alert_form.exec_()
def onOptionsSettingsItemClicked(self):
self.settings_form.exec_()
diff --git a/openlp/core/ui/settingsdialog.py b/openlp/core/ui/settingsdialog.py
new file mode 100644
index 000000000..7dad3b6b5
--- /dev/null
+++ b/openlp/core/ui/settingsdialog.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file '/home/raoul/Projects/openlp-2/resources/forms/settings.ui'
+#
+# Created: Sat Feb 28 23:59:58 2009
+# by: PyQt4 UI code generator 4.4.4
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_SettingsDialog(object):
+ def setupUi(self, SettingsDialog):
+ SettingsDialog.setObjectName(u'SettingsDialog')
+ SettingsDialog.resize(724, 502)
+ #icon = QtGui.QIcon()
+ #icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ #SettingsDialog.setWindowIcon(icon)
+ self.SettingsLayout = QtGui.QVBoxLayout(SettingsDialog)
+ self.SettingsLayout.setSpacing(8)
+ self.SettingsLayout.setMargin(8)
+ self.SettingsLayout.setObjectName(u'SettingsLayout')
+ self.SettingsTabWidget = QtGui.QTabWidget(SettingsDialog)
+ self.SettingsTabWidget.setObjectName(u'SettingsTabWidget')
+ self.SettingsLayout.addWidget(self.SettingsTabWidget)
+ self.ButtonsBox = QtGui.QDialogButtonBox(SettingsDialog)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.ButtonsBox.sizePolicy().hasHeightForWidth())
+ self.ButtonsBox.setSizePolicy(sizePolicy)
+ self.ButtonsBox.setMaximumSize(QtCore.QSize(16777215, 16777215))
+ self.ButtonsBox.setOrientation(QtCore.Qt.Horizontal)
+ self.ButtonsBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
+ self.ButtonsBox.setObjectName("ButtonsBox")
+ self.SettingsLayout.addWidget(self.ButtonsBox)
+
+ self.retranslateUi(SettingsDialog)
+ self.SettingsTabWidget.setCurrentIndex(0)
+ QtCore.QObject.connect(self.ButtonsBox, QtCore.SIGNAL("accepted()"), SettingsDialog.accept)
+ QtCore.QObject.connect(self.ButtonsBox, QtCore.SIGNAL("rejected()"), SettingsDialog.reject)
+ QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
+
+ def retranslateUi(self, SettingsDialog):
+ SettingsDialog.setWindowTitle(QtGui.QApplication.translate("SettingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py
index 65fa1bf53..737180e66 100644
--- a/openlp/core/ui/settingsform.py
+++ b/openlp/core/ui/settingsform.py
@@ -17,62 +17,53 @@ You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
"""
+import logging
from PyQt4 import QtCore, QtGui
-from PyQt4.QtGui import QDialog
-from openlp.core.lib import SettingsTabItem
+from openlp.core.lib import SettingsTab
from openlp.core.resources import *
-from openlp.core.ui import AlertForm
+from openlp.core.ui import GeneralTab, ThemesTab, AlertsTab
-class SettingsForm(QDialog):
+from settingsdialog import Ui_SettingsDialog
+
+log = logging.getLogger('SettingsForm')
+
+class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
def __init__(self, parent=None):
- QDialog.__init__(self, parent)
- self.first_time = True
- self.plugin_list = []
-
- def add_virtual_plugin(self, plugin):
- """
- Method to allow Core to register screens to behave like plugins
- """
- self.plugin_list.append(plugin)
-
- def receive_plugins(self, plugins):
- """
- Method to allow Plugin Manager to add plugins which want settings
- """
- print "got plugins ", plugins
- for plugin in plugins:
- self.plugin_list.append(plugin)
- print plugins
-
- def generateUi(self):
- """
- Method build UI.
- Called by mainmenu AFTER all plugins have been installed.
- """
- if self.first_time:
- self.setupUi(self)
- self.first_time = False
+ QtGui.QDialog.__init__(self, parent)
+ self.setupUi(self)
+ # General tab
+ self.GeneralTab = GeneralTab()
+ self.addTab(self.GeneralTab)
+ # Themes tab
+ self.ThemesTab = ThemesTab()
+ self.addTab(self.ThemesTab)
+ # Alerts tab
+ self.AlertsTab = AlertsTab()
+ self.addTab(self.AlertsTab)
- def onSaveButton(self):
- pass
- def onResetButton(self):
+ def addTab(self, tab):
+ log.info(u'Inserting %s' % tab.title())
+ self.SettingsTabWidget.addTab(tab, tab.title())
+
+ def onSaveButtonClick(self):
pass
+ def onResetButtonClick(self):
+ pass
+
+ """
def setupUi(self, SettingsDialog):
SettingsDialog.setObjectName("SettingsDialog")
SettingsDialog.resize(602, 502)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
SettingsDialog.setWindowIcon(icon)
-
self.SettingsTabWidget = QtGui.QTabWidget(SettingsDialog)
self.SettingsTabWidget.setGeometry(QtCore.QRect(0, 0, 669, 500))
self.SettingsTabWidget.setObjectName("SettingsTabWidget")
-
-
self.ThemesTab = QtGui.QWidget()
self.ThemesTab.setObjectName("ThemesTab")
self.ThemesTabLayout = QtGui.QHBoxLayout(self.ThemesTab)
@@ -127,7 +118,7 @@ class SettingsForm(QDialog):
self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.GlobalLevelLabel)
self.ThemesTabLayout.addWidget(self.LevelGroupBox)
self.SettingsTabWidget.addTab(self.ThemesTab, "")
-
+
self.SlideTab = QtGui.QWidget()
self.SlideTab.setObjectName("SlideTab")
self.SlideLayout = QtGui.QHBoxLayout(self.SlideTab)
@@ -236,14 +227,14 @@ class SettingsForm(QDialog):
self.SlideRightLayout.addItem(spacerItem5)
self.SlideLayout.addWidget(self.widget)
self.SettingsTabWidget.addTab(self.SlideTab, "")
-
+
#### Core Code below here
-
+
for plugin in self.plugin_list:
settings_tab_item = plugin.get_settings_tab_item()
if settings_tab_item is not None:
self.SettingsTabWidget.addTab(settings_tab_item, settings_tab_item.tabText)
-
+
self.SaveButton = QtGui.QPushButton(SettingsDialog)
self.SaveButton.setGeometry(QtCore.QRect(490, 470, 81, 26))
self.SaveButton.setObjectName("SaveButton")
@@ -253,15 +244,15 @@ class SettingsForm(QDialog):
self.ResetButton = QtGui.QPushButton(SettingsDialog)
self.ResetButton.setGeometry(QtCore.QRect(310, 470, 81, 26))
self.ResetButton.setObjectName("ResetButton")
-
- QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL("clicked()"), self.close)
+
+ QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL("clicked()"), self.close)
self.retranslateUi(SettingsDialog)
self.SettingsTabWidget.setCurrentIndex(5)
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
def retranslateUi(self, SettingsDialog):
- SettingsDialog.setWindowTitle(QtGui.QApplication.translate("SettingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8))
+ SettingsDialog.setWindowTitle(QtGui.QApplication.translate("SettingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8))
self.GlobalGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Global theme", None, QtGui.QApplication.UnicodeUTF8))
self.DefaultComboBox.setItemText(0, QtGui.QApplication.translate("SettingsDialog", "African Sunset", None, QtGui.QApplication.UnicodeUTF8))
@@ -290,8 +281,8 @@ class SettingsForm(QDialog):
self.SearchGroupBox_3.setTitle(QtGui.QApplication.translate("SettingsDialog", "Search", None, QtGui.QApplication.UnicodeUTF8))
self.SearchCheckBox_3.setText(QtGui.QApplication.translate("SettingsDialog", "Enabled search-as-you-type", None, QtGui.QApplication.UnicodeUTF8))
self.SettingsTabWidget.setTabText(self.SettingsTabWidget.indexOf(self.SlideTab), QtGui.QApplication.translate("SettingsDialog", "Songs", None, QtGui.QApplication.UnicodeUTF8))
-
+
self.SaveButton.setText(QtGui.QApplication.translate("SettingsDialog", "Save", None, QtGui.QApplication.UnicodeUTF8))
self.CancelButton.setText(QtGui.QApplication.translate("SettingsDialog", "Cancel", None, QtGui.QApplication.UnicodeUTF8))
self.ResetButton.setText(QtGui.QApplication.translate("SettingsDialog", "Reset", None, QtGui.QApplication.UnicodeUTF8))
-
+ """
diff --git a/openlp/core/ui/themestab.py b/openlp/core/ui/themestab.py
new file mode 100644
index 000000000..98b3f0e73
--- /dev/null
+++ b/openlp/core/ui/themestab.py
@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+"""
+OpenLP - Open Source Lyrics Projection
+Copyright (c) 2008 Raoul Snyman
+Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+"""
+
+from PyQt4 import QtCore, QtGui
+
+from openlp.core import translate
+from openlp.core.lib import SettingsTab
+from openlp.core.resources import *
+
+class ThemesTab(SettingsTab):
+ """
+ ThemesTab is the theme settings tab in the settings dialog.
+ """
+ def __init__(self):
+ SettingsTab.__init__(self, u'Themes')
+
+ def setupUi(self):
+ self.setObjectName(u'ThemesTab')
+ self.ThemesTabLayout = QtGui.QHBoxLayout(self)
+ self.ThemesTabLayout.setSpacing(8)
+ self.ThemesTabLayout.setMargin(8)
+ self.ThemesTabLayout.setObjectName(u'ThemesTabLayout')
+ self.GlobalGroupBox = QtGui.QGroupBox(self)
+ self.GlobalGroupBox.setObjectName(u'GlobalGroupBox')
+ self.GlobalGroupBoxLayout = QtGui.QVBoxLayout(self.GlobalGroupBox)
+ self.GlobalGroupBoxLayout.setSpacing(8)
+ self.GlobalGroupBoxLayout.setMargin(8)
+ self.GlobalGroupBoxLayout.setObjectName(u'GlobalGroupBoxLayout')
+ self.DefaultComboBox = QtGui.QComboBox(self.GlobalGroupBox)
+ self.DefaultComboBox.setObjectName(u'DefaultComboBox')
+ self.DefaultComboBox.addItem(QtCore.QString())
+ self.DefaultComboBox.addItem(QtCore.QString())
+ self.DefaultComboBox.addItem(QtCore.QString())
+ self.GlobalGroupBoxLayout.addWidget(self.DefaultComboBox)
+ self.DefaultListView = QtGui.QListView(self.GlobalGroupBox)
+ self.DefaultListView.setObjectName(u'DefaultListView')
+ self.GlobalGroupBoxLayout.addWidget(self.DefaultListView)
+ self.ThemesTabLayout.addWidget(self.GlobalGroupBox)
+ self.LevelGroupBox = QtGui.QGroupBox(self)
+ self.LevelGroupBox.setObjectName(u'LevelGroupBox')
+ self.LevelLayout = QtGui.QFormLayout(self.LevelGroupBox)
+ self.LevelLayout.setLabelAlignment(
+ QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.LevelLayout.setFormAlignment(
+ QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.LevelLayout.setMargin(8)
+ self.LevelLayout.setSpacing(8)
+ self.LevelLayout.setObjectName(u'LevelLayout')
+ self.SongLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
+ self.SongLevelRadioButton.setObjectName(u'SongLevelRadioButton')
+ self.LevelLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.SongLevelRadioButton)
+ self.SongLevelLabel = QtGui.QLabel(self.LevelGroupBox)
+ self.SongLevelLabel.setWordWrap(True)
+ self.SongLevelLabel.setObjectName(u'SongLevelLabel')
+ self.LevelLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.SongLevelLabel)
+ self.ServiceLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
+ self.ServiceLevelRadioButton.setObjectName(u'ServiceLevelRadioButton')
+ self.LevelLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.ServiceLevelRadioButton)
+ self.ServiceLevelLabel = QtGui.QLabel(self.LevelGroupBox)
+ self.ServiceLevelLabel.setWordWrap(True)
+ self.ServiceLevelLabel.setObjectName(u'ServiceLevelLabel')
+ self.LevelLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.ServiceLevelLabel)
+ self.GlobalLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
+ self.GlobalLevelRadioButton.setChecked(True)
+ self.GlobalLevelRadioButton.setObjectName(u'GlobalLevelRadioButton')
+ self.LevelLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.GlobalLevelRadioButton)
+ self.GlobalLevelLabel = QtGui.QLabel(self.LevelGroupBox)
+ self.GlobalLevelLabel.setWordWrap(True)
+ self.GlobalLevelLabel.setObjectName(u'GlobalLevelLabel')
+ self.LevelLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.GlobalLevelLabel)
+ self.ThemesTabLayout.addWidget(self.LevelGroupBox)
+
+ def retranslateUi(self):
+ self.GlobalGroupBox.setTitle(translate(u'ThemesTab', u'Global theme'))
+ self.DefaultComboBox.setItemText(0, translate(u'ThemesTab', u'African Sunset'))
+ self.DefaultComboBox.setItemText(1, translate(u'ThemesTab', u'Snowy Mountains'))
+ self.DefaultComboBox.setItemText(2, translate(u'ThemesTab', u'Wilderness'))
+ self.LevelGroupBox.setTitle(translate(u'ThemesTab', u'Theme level'))
+ self.SongLevelRadioButton.setText(translate(u'ThemesTab', u'Song level'))
+ self.SongLevelLabel.setText(translate(u'ThemesTab', u'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(u'ThemesTab', u'Service level'))
+ self.ServiceLevelLabel.setText(translate(u'ThemesTab', u'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(u'ThemesTab', u'Global level'))
+ self.GlobalLevelLabel.setText(translate(u'ThemesTab', u'Use the global theme, overriding any themes associated wither either the service or the songs.'))
diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py
index 8c298c99b..dec6b9ecb 100644
--- a/openlp/plugins/bibles/bibleplugin.py
+++ b/openlp/plugins/bibles/bibleplugin.py
@@ -24,9 +24,9 @@ from PyQt4.QtCore import *
from PyQt4.QtGui import *
from openlp.core.resources import *
-from openlp.core.lib import Plugin,PluginUtils, MediaManagerItem, Receiver, SettingsTabItem
+from openlp.core.lib import Plugin,PluginUtils, MediaManagerItem, Receiver
-from openlp.plugins.bibles.lib import BibleManager
+from openlp.plugins.bibles.lib import BibleManager, BiblesTab
from openlp.plugins.bibles.forms import BibleImportForm
from openlp.plugins.bibles.lib.tables import *
@@ -47,15 +47,12 @@ class BiblePlugin(Plugin, PluginUtils):
#Register the bible Manager
self.biblemanager = BibleManager(self.config)
self.search_results = {} # place to store the search results
- QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL("openlpreloadbibles"),self.reload_bibles)
+ QtCore.QObject.connect(Receiver().get_receiver(),
+ QtCore.SIGNAL("openlpreloadbibles"), self.reload_bibles)
- def has_settings_tab_item(self):
- return True
-
- def get_settings_tab_item(self):
-
- self.SettingsTabItem= SettingsTabItem()
-
+ def get_settings_tab(self):
+ self.BiblesTab = BiblesTab()
+ """
self.Bibles = QtGui.QWidget()
self.Bibles.setObjectName("Bibles")
self.formLayout_3 = QtGui.QFormLayout(self.Bibles)
@@ -131,11 +128,11 @@ class BiblePlugin(Plugin, PluginUtils):
"Changes don\'t affect verses already in the service