diff --git a/openlp/core/ui/alertstab.py b/openlp/core/ui/alertstab.py index bde977940..706c4aa5f 100644 --- a/openlp/core/ui/alertstab.py +++ b/openlp/core/ui/alertstab.py @@ -19,6 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA """ from PyQt4 import QtCore, QtGui +from PyQt4.QtGui import QColor from openlp.core import translate from openlp.core.lib import SettingsTab @@ -30,6 +31,7 @@ class AlertsTab(SettingsTab): """ def __init__(self): SettingsTab.__init__(self, u'Alerts') + self.load() def setupUi(self): self.setObjectName(u'AlertsTab') @@ -64,22 +66,35 @@ class AlertsTab(SettingsTab): 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.FontColourButton = QtGui.QPushButton(self.ColorWidget) + self.FontColourButton.setObjectName("FontColourButton") + self.ColorLayout.addWidget(self.FontColourButton) + +# 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.BackgroundColourButton = QtGui.QPushButton(self.ColorWidget) + self.BackgroundColourButton.setObjectName("BackgroundColourButton") + self.ColorLayout.addWidget(self.BackgroundColourButton) + +# 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') @@ -131,7 +146,8 @@ class AlertsTab(SettingsTab): self.SlideRightLayout.addItem(self.SlideRightSpacer) self.AlertsLayout.addWidget(self.AlertRightColumn) - QtCore.QObject.connect(self.BackgroundColorPanel, QtCore.SIGNAL("pressed()"), self.onBackgroundColorPanelclicked) + QtCore.QObject.connect(self.BackgroundColourButton, QtCore.SIGNAL("pressed()"), self.onBackgroundColourButtonclicked) + QtCore.QObject.connect(self.FontColourButton, QtCore.SIGNAL("pressed()"), self.onFontColourButtonclicked) def retranslateUi(self): self.FontGroupBox.setTitle(translate(u'AlertsTab', u'Font')) @@ -142,5 +158,18 @@ class AlertsTab(SettingsTab): self.LengthSpinBox.setSuffix(translate(u'AlertsTab', u's')) self.PreviewGroupBox.setTitle(translate(u'AlertsTab', u'Preview')) - def onBackgroundColorPanelclicked(self): + def onBackgroundColourButtonclicked(self): print "pressed background" + + def onFontColourButtonclicked(self): + print "pressed font" + old_name = 0 + colour = QtGui.QColorDialog.getColor(QColor(old_name), self).name() + print colour + self.FontColourButton.setStyleSheet('background-color: %s' % colour) + + def load(self): + pass + + def save(self): + pass diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index be58c620e..fd478d1e9 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -30,6 +30,7 @@ class BiblesTab(SettingsTab): """ def __init__(self): SettingsTab.__init__(self, u'Bibles') + self.load() def setupUi(self): self.setObjectName(u'BiblesTab') @@ -128,28 +129,25 @@ class BiblesTab(SettingsTab): self.BibleSearchCheckBox.setText(translate("SettingsForm", "Search-as-you-type")) def load(self): - bible_output_style = self.config.get_config("bible_output_style", "Paragraph") - if bible_output_style == "Paragraph": - self.ParagraphRadioButton.setChecked() + bible_output_style = self.config.get_config("output style", "P") + if bible_output_style == "P": + self.ParagraphRadioButton.setChecked(True) + self.paragraph_format = True else: - self.VerseRadioButton.setChecked() - # self.SettingsOutputStyleComboBox.setCurrentIndex(int(self.config.get_config("bible_output_style", 0))) - # self.SettingsVerseStyleComboBox.setCurrentIndex(int(self.config.get_config("bible_verse_style", 0))) - # try: - # self.SettingsNewChapterCheck.setCheckState(int(self.config.get_config("bible_new_chapter", 0))) - #except: - # pass + self.VerseRadioButton.setChecked(True) + self.paragraph_format = False + display_new_chapters = self.config.get_config("display new chapters", "0") + #self.NewChaptersCheckBox.setState(display_new_chapters) + if display_new_chapters == 0: + self.display_new_chapters = True + def save(self): - print "VRB =- ", self.VerseRadioButton.isChecked() - print "PRB =- ", self.ParagraphRadioButton.isChecked() if self.ParagraphRadioButton.isChecked(): - self.config.set_config("bible_output_style", "Paragraph") + self.config.set_config("output style", "P") else: - self.config.set_config("bible_output_style", "Verse") - print "NCCB =- ", self.NewChaptersCheckBox.checkState() - print "DSCB =- ", self.DisplayStyleComboBox.currentIndex() - print "BSCB =- ",self.BibleSearchCheckBox.checkState() - #self.config.set_config("bible_output_style", str(self.SettingsOutputStyleComboBox.currentIndex())) - #self.config.set_config("bible_verse_style", str(self.SettingsVerseStyleComboBox.currentIndex())) - #self.config.set_config("bible_new_chapter", str(self.SettingsNewChapterCheck.checkState())) + self.config.set_config("output style", "V") + self.config.set_config("display new chapter", str(self.NewChaptersCheckBox.checkState())) + self.config.set_config("display brackets", str(self.DisplayStyleComboBox.currentIndex())) + self.config.set_config("search as type", str(self.BibleSearchCheckBox.checkState())) + diff --git a/resources/forms/settings.ui b/resources/forms/settings.ui index ea4b773b7..025aa46a1 100644 --- a/resources/forms/settings.ui +++ b/resources/forms/settings.ui @@ -1,7 +1,8 @@ - + + SettingsDialog - - + + 0 0 @@ -9,67 +10,67 @@ 502 - + Settings - - + + :/icon/openlp.org-icon-32.bmp:/icon/openlp.org-icon-32.bmp - - + + 8 - + 8 - - - 0 + + + 2 - - + + General - - + + 8 - + 8 - - + + - - + + Monitors - - + + 8 - + 8 - - + + Select monitor for output display: - + - + Monitor 1 on X11 Windowing System - + Monitor 2 on X11 Windowing System @@ -79,20 +80,20 @@ - - + + Blank Screen - - + + 8 - + 8 - - + + Show warning on startup @@ -101,14 +102,14 @@ - - + + Auto Open Last Service - + - - + + Automatically open the last service at startup @@ -117,11 +118,11 @@ - - + + Qt::Vertical - + 20 40 @@ -133,56 +134,56 @@ - - - + + + 8 - + 0 - - + + CCLI Details - - + + 8 - + 8 - - - + + + CCLI Number: - - + + - - - + + + SongSelect Username: - - + + - - - + + + SongSelect Password: - - - + + + QLineEdit::Password @@ -191,11 +192,11 @@ - - + + Qt::Vertical - + 20 40 @@ -208,125 +209,125 @@ - - + + Themes - - + + 8 - + 8 - - + + Global theme - - + + 8 - + 8 - + - + African Sunset - + Snowy Mountains - + Wilderness - + - - + + Theme level - - + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - + 8 - + 8 - + 8 - - - + + + Song level - - - + + + 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. - + true - - - + + + Service level - - - + + + 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. - + true - - - + + + + true + + Global level - - true - - - - + + + Use the global theme, overriding any themes associated wither either the service or the songs. - + true @@ -336,86 +337,71 @@ - - + + Alerts - - + + 8 - + 8 - - - + + + 8 - + 0 - - + + Font - - + + 8 - + 8 - - + + Font Name: - + - - - - 8 - - - 0 - + + - - + + Font Color: - - - - 24 - 24 - - - - - 24 - 24 - + + + - - + + Qt::Horizontal - + 40 20 @@ -424,25 +410,16 @@ - - + + Background Color: - - - - 24 - 24 - - - - - 24 - 24 - + + + @@ -450,40 +427,40 @@ - - - + + + 8 - + 0 - - + + Display length: - - + + + 5 + + s - + 180 - - 5 - - - + + Qt::Horizontal - + 147 20 @@ -498,11 +475,11 @@ - - + + Qt::Vertical - + 20 94 @@ -514,35 +491,35 @@ - - - + + + 8 - + 0 - - - + + + 0 0 - + Preview - - + + 8 - + 8 - - + + 16777215 64 @@ -554,11 +531,11 @@ - - + + Qt::Vertical - + 20 40 @@ -574,23 +551,23 @@ - - - + + + 0 0 - + 16777215 16777215 - + Qt::Horizontal - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -598,7 +575,7 @@ - + @@ -607,11 +584,11 @@ SettingsDialog accept() - + 248 254 - + 157 274 @@ -623,11 +600,11 @@ SettingsDialog reject() - + 316 260 - + 286 274